mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 05:32:51 +01:00
Fixed introduced bug in that callbacks.Privmsg.handled wasn't set appropriately when a command was called.
This commit is contained in:
parent
6ae0a0b8c4
commit
1d95410f91
@ -358,6 +358,7 @@ class IrcObjectProxy:
|
||||
self.error(self.msg, s, private=True)
|
||||
return
|
||||
command = getattr(cb, name)
|
||||
Privmsg.handled = True
|
||||
if cb.threaded:
|
||||
t = CommandThread(cb.callCommand, command,
|
||||
self, self.msg, self.args)
|
||||
@ -738,26 +739,22 @@ class PrivmsgCommandAndRegexp(Privmsg):
|
||||
raise
|
||||
|
||||
def doPrivmsg(self, irc, msg):
|
||||
handled = False
|
||||
for (r, method) in self.res:
|
||||
name = method.__name__
|
||||
if handled and name not in self.alwaysCall:
|
||||
continue
|
||||
for m in r.finditer(msg.args[1]):
|
||||
proxy = IrcObjectProxyRegexp(irc)
|
||||
self.callCommand(method, proxy, msg, m, catchErrors=True)
|
||||
handled = True
|
||||
if not Privmsg.handled:
|
||||
s = addressed(irc.nick, msg)
|
||||
if s:
|
||||
for (r, method) in self.addressedRes:
|
||||
name = method.__name__
|
||||
if handled and name not in self.alwaysCall:
|
||||
if Privmsg.handled and name not in self.alwaysCall:
|
||||
continue
|
||||
for m in r.finditer(s):
|
||||
proxy = IrcObjectProxyRegexp(irc)
|
||||
self.callCommand(method,proxy,msg,m,catchErrors=True)
|
||||
handled = True
|
||||
Privmsg.handled = True
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user