Don't parse '/me's as commands

This commit is contained in:
jesopo 2019-05-06 23:26:13 +01:00
parent 3e3e39e054
commit 543a01882b

View file

@ -213,6 +213,9 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.message.channel", priority=EventManager.PRIORITY_LOW) @utils.hook("received.message.channel", priority=EventManager.PRIORITY_LOW)
def channel_message(self, event): def channel_message(self, event):
if event["action"]:
return
commands_enabled = event["channel"].get_setting("commands", True) commands_enabled = event["channel"].get_setting("commands", True)
if not commands_enabled: if not commands_enabled:
return return
@ -232,7 +235,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.message.private", priority=EventManager.PRIORITY_LOW) @utils.hook("received.message.private", priority=EventManager.PRIORITY_LOW)
def private_message(self, event): def private_message(self, event):
if event["message_split"]: if event["message_split"] and not event["action"]:
command = event["message_split"][0].lower() command = event["message_split"][0].lower()
self.message(event, command) self.message(event, command)