aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-23 16:10:31 +0100
committerGravatar jesopo2019-05-23 16:10:31 +0100
commit61af81c9decaa8277a83cb23ad8568ca986a3b76 (patch)
treea362666724d7860f752724cf260792a0080584d7 /modules
parentForgot `not` so it was stripping alnum chars, not non-almun chars (diff)
signature
Add comment about why we strip non-alnum chars from private commands
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/__init__.py4
1 files changed, 4 insertions, 0 deletions
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,