From c8470260f083d32466398c80149e3c271ec17c07 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Fri, 3 Jul 2015 23:10:36 +0100 Subject: [PATCH] Add a message event --- tipbot/modules/irc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tipbot/modules/irc.py b/tipbot/modules/irc.py index 183862f..b420aad 100644 --- a/tipbot/modules/irc.py +++ b/tipbot/modules/irc.py @@ -314,6 +314,8 @@ class IRCNetwork(Network): self.update_last_active_time(chan,GetNick(who)) # resplit to avoid splitting text that contains ':' text = data.split(' :',1)[1] + if self.on_event: + self.on_event('message',link=Link(self,User(self,GetNick(who)),Group(self,chan)),message=text) exidx = text.find('!') if exidx != -1 and len(text)>exidx+1 and text[exidx+1] in string.ascii_letters and self.is_acceptable_command_prefix(text[:exidx]): cmd = text.split('!')[1]