From 9ac2fe96fec40b93ce5c4e49bb84513e28b3c927 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 23 Jan 2020 11:45:51 +0000 Subject: [PATCH] changed failed list modes after ENDOFWHO, not when our mode changes --- src/core_modules/mode_lists.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/core_modules/mode_lists.py b/src/core_modules/mode_lists.py index cb01da72..d1bc3a14 100644 --- a/src/core_modules/mode_lists.py +++ b/src/core_modules/mode_lists.py @@ -75,12 +75,16 @@ class Module(ModuleManager.BaseModule): self._mask_add(event["channel"], mode[1], arg) else: self._mask_remove(event["channel"], mode[1], arg) - elif mode[1] in dict(event["server"].prefix_modes): - if event["server"].irc_equals(event["server"].nickname, arg): - missed = set(event["server"].channel_list_modes)-set( - event["channel"].mode_lists.keys()) - if missed: - event["channel"].send_mode("+%s" % "".join(missed)) + + @utils.hook("received.315") + def who_end(self, event): + channel = self._channel(event) + + if channel: + missed = set(event["server"].channel_list_modes)-set( + channel.mode_lists.keys()) + if missed: + channel.send_mode("+%s" % "".join(missed)) @utils.hook("self.join") def self_join(self, event):