From 9be8c1d90cd72abc5ebfa9020928bc4390b21824 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 6 Sep 2018 18:13:02 +0100 Subject: [PATCH] Set +o/+v on a user if they're in the channel at the time of !addop/!addvoice --- modules/auto_mode.py | 3 +++ 1 file changed, 3 insertions(+) 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):