From 359e977d18a4b5b8bab1b4f030c18c434d9db5a2 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 14 Jun 2019 16:34:48 +0100 Subject: Don't let users change settings for other channels when they have +o in the current channel --- modules/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/config.py b/modules/config.py index 665a9986..7917479b 100644 --- a/modules/config.py +++ b/modules/config.py @@ -142,9 +142,9 @@ class Module(ModuleManager.BaseModule): else: target = event["user"] elif context == "channelset": - yield utils.Check("channel-mode", "o")|permission_check if name: + yield permission_check if name in event["server"].channels: target = event["server"].channels.get(name) else: @@ -152,6 +152,7 @@ class Module(ModuleManager.BaseModule): name) else: if event["is_channel"]: + yield utils.Check("channel-mode", "o")|permission_check target = event["target"] else: raise utils.EventError( -- cgit v1.3.1-10-gc9f91