Check automode when BitBot joins a channel

This commit is contained in:
jesopo 2018-10-13 22:21:51 +01:00
parent f40db7c9d2
commit 403227b6df

View file

@ -49,11 +49,16 @@ class Module(ModuleManager.BaseModule):
:require_mode: o
"""
self._check_channel(event["target"])
@utils.hook("set.channelset.automode")
def on_automode_set(self, event):
if event["value"]:
self._check_channel(event["target"])
@utils.hook("self.join")
def self_join(self, event):
self._check_channel(event["channel"])
def _add_mode(self, event, mode, mode_name):
target_user = event["server"].get_user(event["args_split"][0])
automodes = event["target"].get_user_setting(target_user.get_id(),