예제 #1
0
 def notify(self, client, event):
     if event.command == 'PRIVMSG':
         response = self.expand_links(event.message)
         if response:
             if event.target.startswith('#'):
                 client.send_message(event.target, response)
             else:
                 client.send_message(event.source, response)
예제 #2
0
 def notify(self, client, event):
     if event.command == 'PRIVMSG' and event.message.startswith('!ping'):
         response = '!pong'
         if response:
             if event.target.startswith('#'):
                 client.send_message(event.target, response)
             else:
                 client.send_message(event.source, response)
예제 #3
0
 def notify(self, client, event):
     if event.command == 'PRIVMSG' and self.commandRE.search(event.message):
         command = self.commandRE.search(event.message).group(1)
         response = None
         if command == 'cake':
             response = self.cake(event.source, event.message)
         if response:
             if event.target.startswith('#'):
                 client.send_message(event.target, response)
             else:
                 client.send_message(event.source, response)