From bf8fe46522f1a36e42bf273925d781b8884b7e51 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 4 Sep 2010 10:45:18 -0500 Subject: [PATCH] retransmit_event takes an Event and re-runs it through normal event handling. i wrote this for something and then realized i didn't need it, but it may be interesting for some reason in the future --- Module.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Module.py b/Module.py index 51ddaaf..914f42d 100644 --- a/Module.py +++ b/Module.py @@ -236,6 +236,15 @@ class Module(object): list.remove('meta.pubmsg_needs_bot_prefix') except NoOptionError: pass + def retransmit_event(self, event): + """ + Pretend that some event the bot has generated is rather an incoming IRC + event. Why one would do this is unclear, but I wrote it and then realized + I didn't need it. + """ + + self.server._handle_event(event) + def do(self, connection, event, nick, userhost, replypath, what, admin_unlocked): """ Do the primary thing this module was intended to do.