diff options
| author | 2018-09-02 22:40:41 +0100 | |
|---|---|---|
| committer | 2018-09-02 22:40:41 +0100 | |
| commit | 3f79154e2bb0439ae2875ccd1f79f93fcd25cfea (patch) | |
| tree | bd9af5316d9538df66c61d8f6927e7500a2063d4 | |
| parent | up min/max duck show time in ducks.py (diff) | |
| signature | ||
received.mode -> received.mode.channel (and bugfixes!)
| -rw-r--r-- | IRCLineHandler.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py index dd926101..6129b42e 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -276,14 +276,15 @@ class LineHandler(object): def mode(self, event): nickname, username, hostname = Utils.seperate_hostmask( event["prefix"]) + user = event["server"].get_user(nickname) target = event["args"][0] is_channel = target[0] in event["server"].channel_types if is_channel: channel = event["server"].get_channel(target) remove = False args = event["args"][2:] + _args = args[:] modes = RE_MODES.findall(event["args"][1]) - for chunk in modes: remove = chunk[0] == "-" for mode in chunk[1:]: @@ -294,8 +295,9 @@ class LineHandler(object): channel.change_mode(remove, mode, args.pop(0)) else: args.pop(0) - self.events.on("received").on("mode").call(modes=modes, - mode_args=args, channel=channel, server=event["server"]) + self.events.on("received").on("mode").on("channel").call( + modes=modes, mode_args=_args, channel=channel, + server=event["server"], user=user) elif event["server"].is_own_nickname(target): modes = RE_MODES.findall(event["arbitrary"] or args[1]) for chunk in modes: |
