From 543a01882b74cbe82244b453d6abf74112dfbe81 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 6 May 2019 23:26:13 +0100 Subject: [PATCH] Don't parse '/me's as commands --- modules/commands/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 46860bf3..d738fbf3 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -213,6 +213,9 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.message.channel", priority=EventManager.PRIORITY_LOW) def channel_message(self, event): + if event["action"]: + return + commands_enabled = event["channel"].get_setting("commands", True) if not commands_enabled: return @@ -232,7 +235,7 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.message.private", priority=EventManager.PRIORITY_LOW) def private_message(self, event): - if event["message_split"]: + if event["message_split"] and not event["action"]: command = event["message_split"][0].lower() self.message(event, command)