Fixed some bugs introduced in my earlier commit, uncovered by the Note tests.

This commit is contained in:
Jeremy Fincher 2005-03-09 10:42:16 +00:00
parent 69a83e8530
commit bd6aa8fda8

View File

@ -1025,12 +1025,12 @@ class Commands(BasePlugin):
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)
if self.isCommandMethod(first): if first == self.canonicalName() and len(args) > 1:
return [first]
elif first == self.canonicalName():
ret = self.getCommand(args[1:]) ret = self.getCommand(args[1:])
if ret: if ret:
return [first] + ret return [first] + ret
if self.isCommandMethod(first):
return [first]
return [] return []
def getCommandMethod(self, command): def getCommandMethod(self, command):