allow for multiple modules to respond to recursion text
This commit is contained in:
parent
f4d69c90d4
commit
fca716af9e
@ -123,11 +123,15 @@ class DrBotIRC(irclib.IRC):
|
||||
"""
|
||||
|
||||
h = self.handlers
|
||||
replies = []
|
||||
|
||||
event._target = None
|
||||
for handler in h.get("all_events", []) + h.get(event.eventtype(), []):
|
||||
ret = handler[1](connection, event)
|
||||
if ret:
|
||||
event.arguments()[0] = ret
|
||||
replies.append(ret)
|
||||
if len(replies):
|
||||
event.arguments()[0] = '\n'.join(replies)
|
||||
|
||||
def on_pubmsg(self, connection, event):
|
||||
"""See if there is an alias ("!command") in the text, and if so, translate it into
|
||||
|
Loading…
Reference in New Issue
Block a user