3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 17:29:21 +01:00
Commit Graph

1738 Commits

Author SHA1 Message Date
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
7625268732 docs/: Start work on writing-plugins.md, improvements to example plugin 2015-08-24 12:10:14 -07:00
James Lu
0610783479 Merge branch 'devel' into wip/document-everything 2015-08-24 10:09:41 -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
James Lu
834136e848 Merge branch 'devel' into wip/document-everything 2015-08-20 08:14:22 -07:00
James Lu
dde9539e77 relay: fix incorrect logging in normalizeNick 2015-08-20 03:04:40 -07:00
James Lu
1d245bf001 protoocols.sjoinServer: only add prefix modes to channel state if our TS < theirs 2015-08-20 01:32:30 -07:00
James Lu
3fc5896f82 Strip leading/trailing spaces when handling PM commands 2015-08-18 05:49:27 -07:00
James Lu
821f546f12 Make sure the PyLink client rejoins all relay channels on KILL
This adds a new internal hook, 'PYLINK_SPAWNMAIN', which is triggered whenever Irc().spawnMain() is called.
2015-08-18 05:44:36 -07:00
James Lu
f93349ae1f relay: when restoring a user after KICK, join them to the *right* channel 2015-08-18 02:59:56 -07:00
James Lu
5704fddfb4 relay: ignore internal clients for CLAIM checks 2015-08-18 02:57:40 -07:00
James Lu
0d2fbc330d relay: fix "Left all shared channels" quits for KICK handling 2015-08-18 02:44:27 -07:00
James Lu
f967f7a479 relay: hotfix to fix KILL handling of relay clients
(cherry picked from commit d6e6e56e03)
2015-08-17 21:18:55 -07:00
James Lu
d6e6e56e03 relay: hotfix to fix KILL handling of relay clients 2015-08-17 21:15:44 -07:00
James Lu
de36c7a62a Merge branch 'wip/admin-commands-loopback' into devel
Conflicts:
	plugins/relay.py
2015-08-17 07:52:45 -07:00
James Lu
8b77956ab9 Merge branch 'devel'
Closes #71.
Closes #91.
Closes #92.
Closes #93.
2015-08-17 03:48:35 -07:00
James Lu
e7f187c672 relay: send modes once at init, not on every JOIN 2015-08-15 23:31:54 -07:00
James Lu
61d95c19cc protocols: delete empty non-permanent channels 2015-08-15 23:29:40 -07:00
James Lu
3b83c3d567 relay: fix TOPIC relaying when the source and target channels have different names 2015-08-15 23:05:09 -07:00