James Lu
4f40faeaf0
relay: in logs, be a bit more specific why we're blocking KILLs and KICKs
2015-09-01 22:02:34 -07:00
James Lu
0b590d6ab3
relay/protocols: use utils.toLower() for channel names, respecting IRCd casemappings
...
Closes #102 .
2015-09-01 22:01:22 -07:00
James Lu
4525b8117e
relay.handle_kill: prevent yet another RuntimeError
2015-08-31 15:04:06 -07:00
James Lu
26e102f01a
Show oper types on WHOIS
2015-08-31 14:52:56 -07:00
James Lu
8d19057118
relay: set umode +H (hideoper) on all remote opered clients
2015-08-31 14:23:42 -07:00
James Lu
5480ae14c4
classes: Remove "opertype" IrcUser() argument
...
This is useless and should've never been here, oops.
2015-08-31 14:11:12 -07:00
James Lu
531ebbba0a
Merge branch 'master' into devel
2015-08-31 13:33:30 -07:00
James Lu
f9b4457ced
Decorate relay clients, etc. with custom OPERTYPEs
...
New PyLink internal hook: PYLINK_CLIENT_OPERED, called (supposedly) when a client opers up.
2015-08-31 13:31:20 -07:00
James Lu
c8e7b72065
protocols: lowercase channel names in PRIVMSG handling
...
Merge NOTICE and PRIVMSG handlers together; they're essentially the same thing.
2015-08-31 11:45:00 -07:00
James Lu
4a964b1595
Merge branch 'master' into devel
2015-08-31 10:58:47 -07:00
James Lu
37eecd7d69
pr/inspircd: use OPERTYPE to oper up clients correctly, and handle the metadata accordingly
2015-08-31 10:31:50 -07:00
James Lu
9f0f4cb124
relay: burst the right set of modes
...
It's moments like this where I wonder what I'm even doing with my life...
2015-08-31 09:28:14 -07:00
James Lu
1062e47b72
classes.IrcChannel: default modes to +nt on join
...
This may have regressions; who knows...
2015-08-31 09:09:03 -07:00
James Lu
7620cd7433
pr/inspircd: fix compatibility with channel mode +q (~)
...
InspIRCd's defaults use "founder" as the mode name for cmode +q, not "owner". My config was different, so I overlooked this.
2015-08-30 23:16:39 -07:00
James Lu
d270a18285
Remove unused imports
2015-08-30 12:53:30 -07:00
James Lu
94f83eb33b
relay.showuser: show home network/nick, and relay nicks regardless of oper status
2015-08-29 19:49:37 -07:00
James Lu
5503477646
commands: distinguish commands with multiple binds in 'list'
2015-08-29 19:29:49 -07:00
James Lu
8976322273
Replace admin.showuser with prettier whois-style cmds in 'commands' and 'relay'
2015-08-29 19:29:05 -07:00
James Lu
e1e31f64ad
Allow multiple plugins to bind to one command name!
...
They will get called in a list, one after the other. The "help" command is able to distinguish with this too.
2015-08-29 19:25:07 -07:00
James Lu
3523f8f766
LINKACL support
...
Merge commit '51389b96e26224aab262b7b090032d0b745e9590'
2015-08-29 15:20:19 -07:00
James Lu
afd6d8c20d
Refactor conf loading; skip the file-loading parts entirely for tests ( #56 )
2015-08-29 14:20:20 -07:00
James Lu
cda54c71a5
main: Fix b71e508acc
.
2015-08-29 14:18:00 -07:00
James Lu
a58bee7355
Modularize tests using common classes, add our custom test runner ( #56 )
2015-08-29 14:06:07 -07:00
James Lu
549a1d1ba4
classes: IrcServer.users is now a set()
2015-08-29 12:35:06 -07:00
James Lu
adb9ef13a6
classes: fixes for the test API
...
- fakeirc: drop dummyhook, call hooks in run() - the protocol module doesn't do this for us anymore
- Irc: don't thread if we're in test mode (temp. hack for now)
2015-08-29 10:10:45 -07:00
James Lu
973aba6de7
Move utils' global variables to world.py
2015-08-29 09:39:33 -07:00
James Lu
b71e508acc
classes.Irc no longer needs a conf argument; tweak tests again
2015-08-28 19:38:16 -07:00
James Lu
ad5fc97e21
Many fixes to test API, utils.reverseModes stub
2015-08-28 19:28:06 -07:00
James Lu
ab4cb4d895
Merge branch 'master' into devel
2015-08-26 14:59:22 -07:00
James Lu
80bebe3827
protocols: also validate TS on incoming SJOIN
2015-08-26 14:59:05 -07:00
James Lu
977b69b8e9
protocols/: Fix args parsing when the sender UID == the last argument
...
args.index() would return 0 instead of the index of the current argument.
2015-08-26 14:57:46 -07:00
James Lu
2fe9b624e7
Consistently capitalize errors and other messages
2015-08-25 20:55:39 -07:00
James Lu
bc7765b241
Let's use consistent "Unknown command" errors, right?
2015-08-25 20:51:13 -07:00
James Lu
d059bd4ff1
Move 'exec' command into its separate plugin
2015-08-25 20:47:21 -07:00
James Lu
3d621b00df
Move checkAuthenticated() to utils, and give it and isOper() toggles for allowing oper/PyLink logins
2015-08-25 20:47:21 -07:00
James Lu
090fa85a46
Move Irc() from main.py to classes.py
...
This prevents import loops (main->utils->classes->main) from the changes in the next commit.
2015-08-25 20:37:47 -07:00
James Lu
51389b96e2
relay: LINKACL command ( Closes #88 )
2015-08-25 20:18:14 -07:00
James Lu
da0101e750
Merge branch 'devel'
2015-08-25 19:54:05 -07:00
James Lu
7e449aaada
coreplugin: Don't stop iterating if one WHOIS handler errors
2015-08-24 18:40:31 -07:00
James Lu
0d497a8f72
coreplugin: show channel prefixes in WHOIS reply
2015-08-24 18:37:46 -07:00
James Lu
05be3e6c17
pr/: add prefixmodes in sjoinServer if TS <= theirs
...
The old comparison of our TS < theirs was wrong, because modes are merged (not dropped) when two channels of the same TS join.
2015-08-24 18:37:39 -07:00
James Lu
af02af6b4a
coreplugin: send WHOIS lines in a more standard order
2015-08-24 18:27:18 -07:00
James Lu
694e7b87f6
various: make the server description configurable
...
Two options for this: bot::serverdesc, and server::<network>::serverdesc, with the latter taking precedence if present.
2015-08-24 18:14:35 -07:00
James Lu
8f09c35672
Revert "example conf: remove unused sidrange option"
...
This reverts commit d533ce3d28
.
2015-08-23 21:15:49 -07:00
James Lu
94ed46fdba
Merge branch 'devel'
2015-08-23 11:52:18 -07:00
James Lu
713ba1469b
relay: log blocked KILLs/KICKs ( Closes #95 )
2015-08-22 21:43:25 -07:00
James Lu
20474dabac
relay: fix many bugs with nick collision handling, and add flood prevention for fixing nicks
...
Closes #85 . Nick collisions caused by internal clients are handled fine now, including the following cases:
- Abusing spawnClient to create a user with the same nick as a relay client, but with a lower TS.
- When both an UID (e.g. 42XAAAAAA) and a tagged UID (_42XAAAAAA) exist on the same network (the two will both try to take the same nick of _42XAAAAAA/net over the relay).
The case where changing NICK from a long cut-off nick to another long cut-off nick is also mitigated. somelongnick/net won't show nick changes to somelongnic//net if the old and new nicks have give the same normalized relay nick.
This introduces a new dependency, expiringdict, from https://pypi.python.org/pypi/expiringdict/1.1.2 , which is used as a cache for flood prevention.
2015-08-22 21:01:51 -07:00
James Lu
1e95f4b3df
main: Fix ImportError logging if a required library, and not the actual module is missing
...
The old message showed "the plugin/file could not be found" even if it's a library that couldn't be imported. "No module named X" is too broad to check for here!
2015-08-22 21:01:51 -07:00
James Lu
c1d98838d7
plugins/admin: allow sending KICK from servers ( #90 )
2015-08-21 00:39:58 -07:00
James Lu
bd2bd55e89
relay: fix mode relaying when sender is a client but isn't in any shared channels
2015-08-20 22:13:28 -07:00