mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Fix for bug #1019392.
This commit is contained in:
parent
bb4d3cda49
commit
ed71df8655
@ -143,7 +143,10 @@ def makeNewAlias(name, alias):
|
||||
return False
|
||||
everythingReplace(tokens)
|
||||
Owner = irc.getCallback('Owner')
|
||||
Owner.disambiguate(irc, tokens)
|
||||
d = Owner.disambiguate(irc, tokens)
|
||||
if d:
|
||||
Owner.ambiguousError(irc, msg, d)
|
||||
else:
|
||||
self.Proxy(irc.irc, msg, tokens)
|
||||
doc ='<an alias, %s>\n\nAlias for %r' % \
|
||||
(utils.nItems('argument', biggestDollar), alias)
|
||||
|
@ -320,9 +320,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
self.disambiguate(irc, elt, ambiguousCommands)
|
||||
return ambiguousCommands
|
||||
|
||||
def processTokens(self, irc, msg, tokens):
|
||||
ambiguousCommands = self.disambiguate(irc, tokens)
|
||||
if ambiguousCommands:
|
||||
def ambiguousError(self, irc, msg, ambiguousCommands):
|
||||
if len(ambiguousCommands) == 1: # Common case.
|
||||
(command, names) = ambiguousCommands.popitem()
|
||||
names.sort()
|
||||
@ -341,6 +339,11 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
s = '%s; please specify from which plugins to ' \
|
||||
'call these commands.' % '; '.join(L)
|
||||
irc.queueMsg(callbacks.error(msg, s))
|
||||
|
||||
def processTokens(self, irc, msg, tokens):
|
||||
ambiguousCommands = self.disambiguate(irc, tokens)
|
||||
if ambiguousCommands:
|
||||
self.ambiguousError(irc, msg, ambiguousCommands)
|
||||
else:
|
||||
callbacks.IrcObjectProxy(irc, msg, tokens)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user