mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Allow commands to be the same name as callbacks.
This commit is contained in:
parent
4352cfde5f
commit
53b29f1bf8
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user