From 417e55e52b9bed61d7507af52ab104d0ddf258a7 Mon Sep 17 00:00:00 2001 From: urlbot Date: Tue, 2 Dec 2014 17:09:46 +0100 Subject: [PATCH] data_parse_commands(): fix argv offsets --- plugins.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins.py b/plugins.py index a86704d..e0d1a25 100644 --- a/plugins.py +++ b/plugins.py @@ -481,7 +481,11 @@ def data_parse_commands(msg): return None reply_user = msg['mucnick'] - (argv0, argv1) = (words[0], words[1]) + (argv0, argv1) = (None, None) + if 1 < len(words): + argv0 = words[1] + if 2 < len(words): + argv1 = words[2] for p in plugins['command']: if ratelimit_exceeded(p['ratelimit_class']):