James Lu
10f3cd1fb8
bots: limit most commands to non-protected internal PyLink clients
2015-09-17 19:07:16 -07:00
James Lu
069cd62865
core: allow marking spawned clients as manipulatable or protected
...
This flag determines whether the client should be manipulated by commands like bots.py's MODE/QUIT/JOIN commands, or protected from them (services).
2015-09-17 19:01:54 -07:00
James Lu
b87e34efa2
Slightly more consistent logging format...
2015-09-16 21:32:27 -07:00
James Lu
7011aa3b36
relay: send kick rejoins from CLAIM from the main relay server
2015-09-16 21:23:09 -07:00
James Lu
f92c2f731c
relay: CLAIM command! Closes #51 .
2015-09-16 20:59:32 -07:00
James Lu
04ca322154
relay: skip claim checks when claim list is empty for a channel
2015-09-16 20:59:08 -07:00
James Lu
b531a180dc
commands: add a "showchan" command
2015-09-14 18:43:19 -07:00
James Lu
7ced47e9b3
bots: don't allow setting umode +o on InspIRCd users (forbidden and causes desync)
2015-09-14 18:09:39 -07:00
James Lu
b8d6e1e2ef
bots: still allow setting modes on internal clients
2015-09-14 18:03:39 -07:00
James Lu
48573b6033
utils.parseModes: autoconvert nicks->UIDs for prefix modes, skipping if the target doesn't exist.
2015-09-14 17:57:20 -07:00
James Lu
b0b9138720
Merge branch 'master' into devel
2015-09-14 17:56:53 -07:00
James Lu
2e0a5e52e2
utils.parseModes: fix IndexError on empty query
2015-09-14 17:56:33 -07:00
James Lu
c5b6658200
bots: more validation in "MODE" to prevent bad things from happening
...
This adds a new "allow_forceset_usermodes" attribute to protocol modules, which determines whether the IRCd allows us to force usermode changes on other servers' clients.
Also, make sure our target is a valid nick/UID/channel, and that the parsed modes are not empty!
2015-09-14 17:46:20 -07:00
James Lu
78080bde6b
relay: don't fail if oldchan is not given in MODE
2015-09-14 17:36:41 -07:00
James Lu
81628f9a6d
relay: rename some internal functions to make more sense
...
getLocalUser => getOrigUser
findRemoteChan => getRemoteChan
findRelay => getRelay
2015-09-14 17:29:37 -07:00
James Lu
75de9c6be6
relay: sort code and document most internal functions
2015-09-14 17:25:17 -07:00
James Lu
6476aefb5f
Merge branch 'master' into devel
...
Conflicts:
protocols/inspircd.py
2015-09-14 16:55:35 -07:00
James Lu
207a6ea31d
Various README fixes
2015-09-13 22:36:50 -07:00
James Lu
fd16a42708
Irc: log the offending line when an error is caught in handle_events
2015-09-13 17:58:59 -07:00
James Lu
1e6c5a231e
relay.handle_topic: don't fail if we're bursting and no old topic exists
2015-09-13 17:58:39 -07:00
James Lu
4a4c9395d6
relay: remove broken logging line
2015-09-13 17:50:59 -07:00
James Lu
1f95774131
inspircd: add proper fallback value for OPERTYPE?
2015-09-13 17:04:17 -07:00
James Lu
19530107d7
relay: enforce CLAIM checks in TOPIC too.
2015-09-13 14:23:27 -07:00
James Lu
9c4e0107f3
ts6_common: make old topic retrievable in handle_topic
2015-09-13 14:23:09 -07:00
James Lu
31aa624a94
tests/inspircd: remove checks for FMODE hook data, they change too often
2015-09-13 14:06:20 -07:00
James Lu
9cd176b846
utils.reverseModes: don't reverse prefix/list modes that were never set
...
Charybdis/TS6 doesn't check this IRCd-side, so we don't want people to abuse this by say, overriding -b *!*@* in a relay channel and having the PyLink client set +b *!*@* in response,
2015-09-13 14:05:07 -07:00
James Lu
9a139212dd
relay/utils: make mode reversals work with mode changes that affect op statuses.
2015-09-13 13:48:14 -07:00
James Lu
c82a0a771c
protocols: return an "oldchan" IrcChannel object with the previous state of a channel when processing channel mode changes
...
This allows plugins to check for op statuses, etc. before the mode change is processed.
2015-09-13 13:47:18 -07:00
James Lu
a28715c2c6
IrcChannel: allow .deepcopy()
2015-09-13 13:47:04 -07:00
James Lu
fa4583c272
relay: basic CLAIM checking when setting modes ( #51 )
...
There's still some desyncs with checking op statuses, because hooks are only called AFTER the internal state updates. Fix for this will come soon.
2015-09-12 23:36:52 -07:00
James Lu
17282aa049
protocols: fix typo and ts6._sendModes when input is a set()
2015-09-12 23:35:20 -07:00
James Lu
945306af34
relay: make CLAIM checking a shared function
2015-09-12 22:50:53 -07:00
James Lu
dfaa5036ab
Fix test cases
...
- conf: add sidrange server config variable (needed by TS6SIDGenerator)
- protocols: stop hardcoding various UIDs that may or may not exist.
2015-09-12 22:34:55 -07:00
James Lu
dab29cfc19
utils: add a proper reverseModes() with tests
...
Closes #107 .
2015-09-12 22:31:20 -07:00
James Lu
f23cff845c
utils: Documentation and cleanup
2015-09-12 22:31:19 -07:00
James Lu
4b7ef44925
runtests: allow specifying files to test
2015-09-12 22:31:19 -07:00
James Lu
46fab1cab7
classes.FakeProto: store UIDs as strings
2015-09-12 22:26:38 -07:00
James Lu
b3902c7711
relay: KILL war protection ( #23 )
...
TODO: possibly integrate this into core?
2015-09-12 17:41:49 -07:00
James Lu
1fcacd0d7c
relay: more compact "showuser" output
2015-09-12 16:03:59 -07:00
James Lu
1c97927b5d
relay: monitor SAVE floods by network, not by target nick
2015-09-12 16:03:47 -07:00
James Lu
3a8d3d146c
protocols: make "uidgen" a protocol instance attribute
2015-09-12 16:02:51 -07:00
James Lu
95b70f3ebf
relay: spawn a server for every linked network ( Closes #105 )
2015-09-12 12:08:02 -07:00
James Lu
0cbdefcab1
ts6/inspircd: fix TS6SIDGenerator not actually incrementing...
...
It was being replaced on every call... It was only supposed to do that if sidgen hadn't been set yet!
2015-09-12 12:08:02 -07:00
James Lu
36b0a08368
ts6_common: return server name in SQUIT handler too
2015-09-12 12:08:02 -07:00
James Lu
df42a81191
classes/protocols: store server descriptions internally
...
Closes #106 .
2015-09-12 12:07:59 -07:00
James Lu
d6cb9d45c7
Merge commit '320de2079a78202e99c7b6aeb53c28c13f43ba47'
...
Many things here, including:
- New 'exec' plugin
- INVITE, umode +H (hideoper) support for relay
- New and improved 'showuser' command, now with internals that support multiple binds to one command name.
- relay: bug fixes, like not sending empty user mode changes.
2015-09-12 09:11:52 -07:00
James Lu
7f526267ec
relay: minor typo in error message
2015-09-09 20:53:04 -07:00
James Lu
29065fdd04
protocols/: remove unused imports & various documentation improvements
2015-09-08 19:51:14 -07:00
James Lu
983acd5adc
Move MODE handling back from ts6_common->inspircd, now that ts6.py does different handling
2015-09-08 19:50:46 -07:00
James Lu
3217f726f8
Fix those test cases again.
2015-09-06 23:39:10 -07:00