From 3fc5896f825b6ea4b8cf9e29c987349ef6d0915c Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 18 Aug 2015 05:49:27 -0700 Subject: [PATCH] Strip leading/trailing spaces when handling PM commands --- coreplugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreplugin.py b/coreplugin.py index d51a7d6..4872723 100644 --- a/coreplugin.py +++ b/coreplugin.py @@ -20,7 +20,8 @@ utils.add_hook(handle_kick, 'KICK') # Handle commands sent to the PyLink client (PRIVMSG) def handle_commands(irc, source, command, args): if args['target'] == irc.pseudoclient.uid: - cmd_args = args['text'].split(' ') + text = args['text'].strip() + cmd_args = text.split(' ') cmd = cmd_args[0].lower() cmd_args = cmd_args[1:] try: