utils.irc.lower channel names when adding them to the autojoin list

This commit is contained in:
jesopo 2018-12-05 15:46:51 +00:00
parent d60c441ce2
commit a8cb500784

View file

@ -23,8 +23,10 @@ class Module(ModuleManager.BaseModule):
@utils.hook("self.join")
def on_join(self, event):
channels = event["server"].get_setting("autojoin", [])
if not event["channel"].name in channels:
channels.append(event["channel"].name)
channel_name = utils.irc.lower(event["server"].case_mapping,
event["channel"].name)
if not channel_name in channels:
channels.append(channel_name)
event["server"].set_setting("autojoin", channels)
def _remove_channel(self, server, channel_name):