only set autojoin when we've joined a channel not in our autojoin list
This commit is contained in:
parent
38a518f1fa
commit
1af821123b
1 changed files with 4 additions and 3 deletions
|
@ -26,9 +26,10 @@ class Module(object):
|
||||||
",".join(channels_sorted), ",".join(keys_sorted))
|
",".join(channels_sorted), ",".join(keys_sorted))
|
||||||
|
|
||||||
def on_join(self, event):
|
def on_join(self, event):
|
||||||
channels = set(event["server"].get_setting("autojoin", []))
|
channels = event["server"].get_setting("autojoin", [])
|
||||||
|
if not event["channel"].name in channels:
|
||||||
channels.add(event["channel"].name)
|
channels.add(event["channel"].name)
|
||||||
event["server"].set_setting("autojoin", list(channels))
|
event["server"].set_setting("autojoin", channels)
|
||||||
|
|
||||||
def on_kick(self, event):
|
def on_kick(self, event):
|
||||||
channels = event["server"].get_setting("autojoin", [])
|
channels = event["server"].get_setting("autojoin", [])
|
||||||
|
|
Loading…
Reference in a new issue