aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
authorGravatar jesopo2016-04-04 18:41:07 +0100
committerGravatar jesopo2016-04-04 18:41:07 +0100
commit436db4b9a81f1ef678b100cf82f0a16a0a3fd45d (patch)
treef3d12650ce7d196b88e832222c58f053e6b24cdd /modules/commands.py
parentadded code to youtube.py to prevent a crash when a video has likes/dislikes d... (diff)
added a way for command event hooks to ask to only be fired from private messages.
Diffstat (limited to 'modules/commands.py')
-rw-r--r--modules/commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/commands.py b/modules/commands.py
index cfdfc5a6..db80c289 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -86,6 +86,8 @@ class Module(object):
target = event["user"]
if not is_channel and hook.kwargs.get("channel_only"):
return
+ if is_channel and hooks.kwargs.get("private_only"):
+ return
log = target.log