diff --git a/modules/channel_save.py b/modules/channel_save.py index e434c878..d32fb26c 100644 --- a/modules/channel_save.py +++ b/modules/channel_save.py @@ -20,8 +20,7 @@ class Module(ModuleManager.BaseModule): key = None if len(keys_sorted) <= i else keys_sorted[i] event["server"].attempted_join[channel] = key - event["server"].send_join( - ",".join(channels_sorted), keys_sorted) + event["server"].send_joins(channels_sorted, keys_sorted) @utils.hook("self.join") def on_join(self, event): diff --git a/src/IRCServer.py b/src/IRCServer.py index 3f545c58..484a2892 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -309,6 +309,10 @@ class Server(IRCObject.Object): def send_join(self, channel_name: str, keys: typing.List[str]=None ) -> IRCLine.Line: return self.send(utils.irc.protocol.join(channel_name, keys)) + def send_joins(self, channel_names: typing.List[str], + keys: typing.List[str]=None): + return self.send(utils.irc.protocol.join(",".join(channel_names), + keys)) def send_part(self, channel_name: str, reason: str=None) -> IRCLine.Line: return self.send(utils.irc.protocol.part(channel_name, reason)) def send_quit(self, reason: str="Leaving") -> IRCLine.Line: