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
This commit is contained in:
Brian S. Stephan 2010-09-04 10:45:18 -05:00
parent 1f27078f82
commit bf8fe46522
1 changed files with 9 additions and 0 deletions

View File

@ -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.