From 61af81c9decaa8277a83cb23ad8568ca986a3b76 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 23 May 2019 16:10:31 +0100 Subject: [PATCH] Add comment about why we strip non-alnum chars from private commands --- modules/commands/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index d352c256..a90f287f 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -263,7 +263,11 @@ class Module(ModuleManager.BaseModule): def private_message(self, event): if event["message_split"] and not event["action"]: command = event["message_split"][0].lower() + + # this should help catch commands when people try to do prefixed + # commands ('!help' rather than 'help') in PM command = command.lstrip("".join(NON_ALPHANUMERIC)) + args_split = event["message_split"][1:] hook, args_split = self._find_command_hook(event["server"], command,