Aka: Make sure the length of the 'args' list is always strictly decreasing when making a recursive call.

This commit is contained in:
Valentin Lorentz 2013-12-05 12:35:02 +00:00
parent 583b1baf64
commit 56570b3c9c

View File

@ -271,7 +271,7 @@ class Aka(callbacks.Plugin):
first = args[0] first = args[0]
for cb in self.cbs: for cb in self.cbs:
if first == cb.canonicalName(): if first == cb.canonicalName():
return cb.getCommand(args) return cb.getCommand(args[1:])
if first == self.canonicalName() and len(args) > 1: if first == self.canonicalName() and len(args) > 1:
ret = self.getCommand(args[1:]) ret = self.getCommand(args[1:])
if ret: if ret: