Set +o/+v on a user if they're in the channel at the time of !addop/!addvoice

This commit is contained in:
jesopo 2018-09-06 18:13:02 +01:00
parent dee26c45be
commit 9be8c1d90c

View file

@ -51,6 +51,9 @@ class Module(object):
automodes.append(mode) automodes.append(mode)
event["target"].set_user_setting(target_user.get_id(), "automodes", event["target"].set_user_setting(target_user.get_id(), "automodes",
automodes) automodes)
if event["target"] in target_user.channels:
self._check_modes(event["target"], target_user)
event["stdout"].write("Added automode %s for '%s'" % ( event["stdout"].write("Added automode %s for '%s'" % (
mode_name, target_user.nickname)) mode_name, target_user.nickname))
def _remove_mode(self, event, mode, mode_name): def _remove_mode(self, event, mode, mode_name):