aboutsummaryrefslogtreecommitdiff
path: root/modules/auto_mode.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-06 18:13:02 +0100
committerGravatar jesopo2018-09-06 18:13:02 +0100
commit9be8c1d90cd72abc5ebfa9020928bc4390b21824 (patch)
tree1f18fba7dad85053c22eac93bb46a5ae9377b7f4 /modules/auto_mode.py
parentaddvoice/removevoice should use "v" not "o" (diff)
signature
Set +o/+v on a user if they're in the channel at the time of !addop/!addvoice
Diffstat (limited to 'modules/auto_mode.py')
-rw-r--r--modules/auto_mode.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/auto_mode.py b/modules/auto_mode.py
index dc785adb..cfb7af94 100644
--- a/modules/auto_mode.py
+++ b/modules/auto_mode.py
@@ -51,6 +51,9 @@ class Module(object):
automodes.append(mode)
event["target"].set_user_setting(target_user.get_id(), "automodes",
automodes)
+ if event["target"] in target_user.channels:
+ self._check_modes(event["target"], target_user)
+
event["stdout"].write("Added automode %s for '%s'" % (
mode_name, target_user.nickname))
def _remove_mode(self, event, mode, mode_name):