From 6ae41c5511acbaff66a1f8a5dd8bc78dd8ca396e Mon Sep 17 00:00:00 2001 From: Max Gurela Date: Tue, 21 Jun 2016 18:33:11 -0400 Subject: [PATCH] module: ignore privilege requirement in privmsg Resolves #1087 --- sopel/module.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sopel/module.py b/sopel/module.py index bd5d748431..fa83cf806a 100644 --- a/sopel/module.py +++ b/sopel/module.py @@ -320,6 +320,9 @@ def require_privilege(level, message=None): def actual_decorator(function): @functools.wraps(function) def guarded(bot, trigger, *args, **kwargs): + # If this is a privmsg, ignore permissions + if trigger.is_privmsg: + return function(bot, trigger, *args, **kwargs) channel_privs = bot.privileges[trigger.sender] allowed = channel_privs.get(trigger.nick, 0) >= level if not trigger.is_privmsg and not allowed: