From fca716af9e5c6b5b92bd0a97f790dc6f1788260e Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 17 Feb 2011 12:01:32 -0600 Subject: [PATCH] allow for multiple modules to respond to recursion text --- DrBotIRC.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DrBotIRC.py b/DrBotIRC.py index c302845..d634ca4 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -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