James Lu
e250409b46
utils: add a new TS6SIDGenerator() class, for generating SIDs based on ranges
2015-07-11 20:21:10 -07:00
James Lu
8d4a06b60e
Initial PyLink-Relay stub, with CREATE and DESTROY commands using a pickle database.
...
ref #37 .
2015-07-10 20:26:46 -07:00
James Lu
11e27b9f36
main.Irc: only load plugins after the IRC object is initialized in utils.networkobjects
...
PyLink-Relay (#37 ) needs this in order to fetch the IRC objects of various networks at start.
2015-07-10 20:24:08 -07:00
James Lu
3156d83ec3
plugins/admin: rename quitclient -> quit
2015-07-10 16:43:16 -07:00
James Lu
7a6c32e0c4
utils: add isOper() function
2015-07-10 16:43:16 -07:00
James Lu
1b4ec414cf
Fix config format for multinet
2015-07-10 14:17:43 -07:00
James Lu
dba20d4efc
Merge pull request #38 from GLolol/multinet-v2
...
Multinet support
2015-07-10 11:21:28 -07:00
James Lu
eae0aa5aa8
pr/insp: Add missing killServer/killClient functions
2015-07-09 19:05:37 -07:00
James Lu
ffec80ee45
tests/: update for new multi-net config format
2015-07-09 18:42:38 -07:00
James Lu
652d53c29e
pr/insp: drop tests for validing channel names
2015-07-09 18:40:32 -07:00
James Lu
eec024bf9a
Second attempt at multinet support, by wrapping threading.Thread around Irc.run()
...
Closes #15 .
2015-07-09 18:29:00 -07:00
James Lu
e54e17a0ea
Irc.send: safeguard against newlines in input!
2015-07-09 17:25:10 -07:00
James Lu
070bba77cb
admin.py: check to see if queried channels exist; sort output fields
2015-07-09 17:05:23 -07:00
James Lu
08a187aee6
pr/insp: add updateClient() and FIDENT/FHOST/FNAME handlers
...
updateClient: Changes the <field> field of <target> PyLink PseudoClient <client numeric>.
2015-07-09 17:04:24 -07:00
James Lu
96c3ea2d82
pr/insp: add topic/invite/knockClient commands
...
Closes #34 .
2015-07-09 16:32:29 -07:00
James Lu
c8f12f2ab1
move messaging functions to protocol ( #35 )
...
Closes #36 .
2015-07-09 16:23:20 -07:00
James Lu
e7922be9fb
plugins/commands.py: warn on failed login attempts
2015-07-08 23:21:01 -07:00
James Lu
1c7f2f6a83
utils.applyModes: fix logging output; only remove delete modes with args if new args are different
...
Previously, you'd get interesting messages where in sequential FJOINs, PyLink would remove param-modes like ('f', '6:5') and then add it right back, thinking that it was a duplicate.
2015-07-08 23:13:23 -07:00
James Lu
b27fcc7f8f
utils.applyModes: operate on a copy of the original modelist
...
This prevents bugs where mode changes are applied to the wrong users (possibly due to the scope not clearing).
2015-07-08 23:11:44 -07:00
James Lu
27bb6af7f6
plugins/admin.py: add 'mode' and 'showchan' commands
2015-07-08 23:01:09 -07:00
James Lu
f01269287e
pr/insp: remove checks for valid nick/channel; they're done in plugins now
2015-07-08 23:00:50 -07:00
James Lu
edfcacfdd1
plugins/admin.py: remove -client suffixes from commands, and fix argument checking
2015-07-08 22:50:19 -07:00
James Lu
35f8a0e25f
utils.parseModes: be a bit more fault-tolerant
...
- Log "mode requires an argument but none was found" errors to warning, and skip the mode instead of failing completely.
- Assign a fallback value for 'prefix', checking to make sure it exists and raising ValueError (not UnboundLocalError) when it doesn't.
2015-07-08 22:42:04 -07:00
James Lu
20772e5429
inspircd.nickClient: allow nick 0 to equal the target user's UID
2015-07-08 21:17:34 -07:00
James Lu
049b7f5049
pr/insp: add modeServer, modeClient commands
...
Closes #32 .
2015-07-08 18:23:32 -07:00
James Lu
cbfabb2ba1
pr/insp: add OPERTYPE command handler
...
This is sent by InspIRCd for oper ups; there is no MODE command for it.
2015-07-08 18:03:08 -07:00
James Lu
7a37f50a1a
utils.joinModes: support joining modes with prefixes
2015-07-08 16:58:59 -07:00
James Lu
b92a9ce950
pr/insp: fix handle_mode setting modes on the wrong client
2015-07-08 15:10:09 -07:00
James Lu
5989f11ec0
pr/insp: tests for SERVER, SAVE, NICK, and INVITE
2015-07-08 13:56:28 -07:00
James Lu
8576778ddc
Make the 'bot' conf block available in Irc() as irc.botdata
...
Protocol modules shouldn't read conf directly, so that we can override the config in testing.
2015-07-08 13:56:17 -07:00
James Lu
2d4d8dd247
tests and stuff
2015-07-08 13:35:20 -07:00
James Lu
85e6a1aea2
pr/insp: more tests for hooks, etc
2015-07-07 20:59:35 -07:00
James Lu
0f03a2398b
Updates to test_proto_inspircd.py
...
New tests: testFjoinResetsTS, testHandleTopic, and testHandleFTopic
2015-07-07 18:30:42 -07:00
James Lu
8f75c5363c
Move all the FakeIRC stuff to classes.py, update FakeIRC with the ability to get hook data
2015-07-07 18:07:20 -07:00
James Lu
a177a58ae7
pr/insp: fix some bugs in spawnClient
2015-07-07 17:46:56 -07:00
James Lu
7fb60c1ffa
pr/inspircd: finish off handlers (add KNOCK, INVITE, NOTICE)
...
Closes #18 .
Closes #31 .
2015-07-07 15:31:12 -07:00
James Lu
098b29ae2d
Correction: it is legal for a server name to end with '.', but it can't start with it
2015-07-07 14:31:47 -07:00
James Lu
cfc840ebb3
Actually implement 'nick', 'ident', and 'loglevel' config options
2015-07-07 12:14:55 -07:00
James Lu
087a4e7e5c
Drop "prefix" config entry, it's not being used
...
Closes #26 . Plugins can implement their own fantasy-style triggers via message hooks, so I'm not sure this really needs a place in the core.
2015-07-07 12:03:30 -07:00
James Lu
7f6c8b0e52
pr/inspircd: enforce minimum protocol version of 1202
...
We're using InspIRCd 2.0+ specific features (SAVE, CAPAB CHAN/USERMODES), so this is required.
Source: https://wiki.inspircd.org/List_of_protocol_changes_between_versions#Version_1202
2015-07-07 10:55:14 -07:00
James Lu
4cc7781f0d
pr/insp: send oldnick in handle_nick hook
...
Since hooks are only called after processing is done by the protocol module, plugins would have no way of knowing what the old nick of the user was.
2015-07-06 19:44:55 -07:00
James Lu
d833be5f4b
pr/insp: smarter spawnClient() with kwargs; implement conf['bot']['prefix']
...
Red #26 .
2015-07-06 19:42:09 -07:00
James Lu
33d23893f8
pr/inspircd: update channel TS when receiving remote FJOIN with lower TS
2015-07-06 19:00:20 -07:00
James Lu
8bed47e7bb
pr/inspircd: handlers for FTOPIC and TOPIC (ref #31 ); make handle_nick return 'newnick' instead of 'target' as arg
2015-07-06 15:33:23 -07:00
James Lu
fe1f90bcd1
FakeIRC: swap arrows in debug output
...
This is for more consistency with the real protocol debug output:
-> is protocol OUTBOUND - irc.send()
<- is protocol INBOUND - irc.run()
2015-07-06 12:54:30 -07:00
James Lu
b3f369aa81
tests for utils.joinModes so I don't break it in the future
2015-07-06 12:38:45 -07:00
James Lu
74339d1038
Fix joinModes, and use it in protocol/inspircd's joinClient
...
In short, PyLink should be sending FJOINs to channels with the modes that it already has (or what we believe it has). This prevents clearing mode lists when PyLink's channel TS is slightly earlier than the IRCd's.
2015-07-06 12:28:10 -07:00
James Lu
170620c410
applyModes: remove old modepairs when setting non-list modes that require params
...
Closes #30 .
2015-07-05 23:15:17 -07:00
James Lu
48c3b4b2e9
applyModes: chop off the +/- part of each mode tuple when storing mode lists
...
Also update these tests accordingly.
2015-07-05 23:00:14 -07:00
James Lu
f1e26b6c55
Fix tests for FakeIRC and update comment style
2015-07-05 22:59:55 -07:00