mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Added a finished variable so we don't have to rely on return values from invalidCommand.
This commit is contained in:
parent
7703e3f4d7
commit
86a3746994
@ -377,11 +377,12 @@ class IrcObjectProxy:
|
|||||||
self.msg = msg
|
self.msg = msg
|
||||||
self.args = args
|
self.args = args
|
||||||
self.counter = 0
|
self.counter = 0
|
||||||
self.finalEvaled = False
|
|
||||||
self.action = False
|
self.action = False
|
||||||
self.private = False
|
|
||||||
self.notice = False
|
self.notice = False
|
||||||
|
self.private = False
|
||||||
|
self.finished = False
|
||||||
self.prefixName = True
|
self.prefixName = True
|
||||||
|
self.finalEvaled = False
|
||||||
self.noLengthCheck = False
|
self.noLengthCheck = False
|
||||||
world.commandsProcessed += 1
|
world.commandsProcessed += 1
|
||||||
self.evalArgs()
|
self.evalArgs()
|
||||||
@ -415,6 +416,8 @@ class IrcObjectProxy:
|
|||||||
return
|
return
|
||||||
# Ok, no regexp-based things matched.
|
# Ok, no regexp-based things matched.
|
||||||
for cb in self.irc.callbacks:
|
for cb in self.irc.callbacks:
|
||||||
|
if self.finished:
|
||||||
|
break
|
||||||
if hasattr(cb, 'invalidCommand'):
|
if hasattr(cb, 'invalidCommand'):
|
||||||
cb.invalidCommand(self, self.msg, self.args)
|
cb.invalidCommand(self, self.msg, self.args)
|
||||||
else:
|
else:
|
||||||
@ -508,6 +511,7 @@ class IrcObjectProxy:
|
|||||||
else:
|
else:
|
||||||
self.irc.queueMsg(reply(msg, response, self.prefixName,
|
self.irc.queueMsg(reply(msg, response, self.prefixName,
|
||||||
notice=self.notice))
|
notice=self.notice))
|
||||||
|
self.finished = True
|
||||||
else:
|
else:
|
||||||
self.args[self.counter] = s
|
self.args[self.counter] = s
|
||||||
self.evalArgs()
|
self.evalArgs()
|
||||||
@ -526,6 +530,7 @@ class IrcObjectProxy:
|
|||||||
self.irc.queueMsg(ircmsgs.privmsg(msg.nick, s))
|
self.irc.queueMsg(ircmsgs.privmsg(msg.nick, s))
|
||||||
else:
|
else:
|
||||||
self.irc.queueMsg(reply(msg, s))
|
self.irc.queueMsg(reply(msg, s))
|
||||||
|
self.finished = True
|
||||||
|
|
||||||
def killProxy(self):
|
def killProxy(self):
|
||||||
"""Kills this proxy object and all its parents."""
|
"""Kills this proxy object and all its parents."""
|
||||||
|
Loading…
Reference in New Issue
Block a user