Allow commands to be the same name as callbacks.

This commit is contained in:
Jeremy Fincher 2004-07-23 19:55:13 +00:00
parent 4352cfde5f
commit 53b29f1bf8
2 changed files with 3 additions and 1 deletions

View File

@ -251,6 +251,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
ambiguous commands, mapping the command to the plugins it's
available in."""
if ambiguousCommands is None:
print '***', tokens
ambiguousCommands = {}
if tokens:
command = callbacks.canonicalName(tokens[0])
@ -267,7 +268,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
srcs = [name for name in names if name in self._srcPlugins]
if len(srcs) == 1:
tokens.insert(0, srcs[0])
else:
elif command not in map(callbacks.canonicalName, names):
ambiguousCommands[command] = names
for elt in tokens:
if isinstance(elt, list):

View File

@ -539,6 +539,7 @@ class IrcObjectProxy(RichReplyMethods):
if len(cbs) > 1:
for cb in cbs:
if canonicalName(cb.name()) == name:
del self.args[0]
break
else:
# This should've been caught earlier, that's why we