diff --git a/modules/line_handler/__init__.py b/modules/line_handler/__init__.py index 3f18c891..1213de10 100644 --- a/modules/line_handler/__init__.py +++ b/modules/line_handler/__init__.py @@ -97,11 +97,12 @@ class Module(ModuleManager.BaseModule): def handle_366(self, event): channel.handle_366(event) - @utils.hook("raw.received.375") + @utils.hook("raw.received.375", priority=EventManager.PRIORITY_HIGH) def motd_start(self, event): core.motd_start(event) @utils.hook("raw.received.372") + @utils.hook("raw.received.375") def motd_line(self, event): core.motd_line(event) diff --git a/modules/line_handler/channel.py b/modules/line_handler/channel.py index 487dcbd1..bcc66757 100644 --- a/modules/line_handler/channel.py +++ b/modules/line_handler/channel.py @@ -18,8 +18,7 @@ def topic(events, event): def handle_333(events, event): channel = event["server"].channels.get(event["args"][1]) - topic_setter_hostmask = event["args"][2] - topic_setter = utils.irc.seperate_hostmask(topic_setter_hostmask) + topic_setter = utils.irc.seperate_hostmask(event["args"][2]) topic_time = int(event["args"][3]) if event["args"][3].isdigit() else None channel.set_topic_setter(topic_setter.nickname, topic_setter.username, @@ -113,10 +112,9 @@ def part(events, event): def handle_324(event): channel = event["server"].channels.get(event["args"][1]) modes = event["args"][2] - if modes[0] == "+" and modes[1:]: - for mode in modes[1:]: - if mode in event["server"].channel_modes: - channel.add_mode(mode) + for mode in modes[1:]: + if mode in event["server"].channel_modes: + channel.add_mode(mode) def handle_329(event): channel = event["server"].channels.get(event["args"][1]) diff --git a/modules/line_handler/core.py b/modules/line_handler/core.py index 6ffc447f..0a5b93ae 100644 --- a/modules/line_handler/core.py +++ b/modules/line_handler/core.py @@ -57,7 +57,6 @@ def handle_005(events, event): def motd_start(event): event["server"].motd_lines.clear() - event["server"].motd_lines.append(event["args"][1]) def motd_line(event): event["server"].motd_lines.append(event["args"][1]) @@ -67,7 +66,6 @@ def mode(events, event): is_channel = target[0] in event["server"].channel_types if is_channel: channel = event["server"].channels.get(target) - remove = False args = event["args"][2:] _args = args[:] modes = RE_MODES.findall(event["args"][1])