data_parse_commands(): fix argv offsets

This commit is contained in:
urlbot
2014-12-02 17:09:46 +01:00
parent 01ea2d3d6c
commit 417e55e52b

View File

@@ -481,7 +481,11 @@ def data_parse_commands(msg):
return None return None
reply_user = msg['mucnick'] 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']: for p in plugins['command']:
if ratelimit_exceeded(p['ratelimit_class']): if ratelimit_exceeded(p['ratelimit_class']):