Exemplo n.º 1
0
    def on_ctcp(self, c, e):
        print "ctcp"
        print e.arguments()

        if not e.arguments()[0]=='ACTION':
            SingleServerIRCBot.on_ctcp(self, c,e)
        else:
            if nm_to_n( e.source() ) not in self.komconn.bot.keys():
                #send_message( self.komconn, self.komconn.confs[ e.target() ],
                # str(e.source()) + " " + str( e.arguments()[0] ))
                send_comment( self.komconn, self.komconn.confs[ e.target().lower() ],
                              str(e.source())+" gör något",
                              nm_to_n(e.source()) + " " + str( e.arguments()[1] ),
                              nm_to_n(e.source()), nm_to_uh(e.source()), 1)
Exemplo n.º 2
0
 def on_ctcp(self, c, e):
     args = e.arguments()
     type = args[0]
     
     if type == 'ACTION':
         channel = e.target()            
         nick = nm_to_n(e.source())
         msg = args[1]
         self.sendSL("%s %s" % (nick, msg))
     else:
         return SingleServerIRCBot.on_ctcp(self, c, e)                          
Exemplo n.º 3
0
 def on_ctcp(self, c, e):
     args = e.arguments()
     type = args[0]
     
     if type == 'ACTION':
         nick = nm_to_n(e.source())
         channel = e.target()
         if self.is_listening(channel):
             if len(args) > 1:
                 msg = nick + " " + args[1]
             else:
                 msg = nick
             self.writeLog("action", e.source(), channel, msg)
     else:
         return SingleServerIRCBot.on_ctcp(self, c, e)                          
Exemplo n.º 4
0
    def on_ctcp(self, c, e):
        args = e.arguments()
        type = args[0]
        
        source = nm_to_n(e.source())
        channel = e.target()            

        if type == 'ACTION':
            if len(args) > 1:
                msg = args[1]
            else:
                msg = ""
            if self.i_am_mentioned(c, msg) and self.is_listening(channel):
                if not self.nick_is_voiced(channel, source):
                    self.privmsg_multiline(c, channel, random.choice(self.deepthoughts))
        else:
            return SingleServerIRCBot.on_ctcp(self, c, e)                          
Exemplo n.º 5
0
    def on_ctcp(self, c, e):
        args = e.arguments()
        type = args[0]

        source = nm_to_n(e.source())
        channel = e.target()

        if type == 'ACTION':
            if len(args) > 1:
                msg = args[1]
            else:
                msg = ""
            if self.i_am_mentioned(c, msg) and self.is_listening(channel):
                if not self.nick_is_voiced(channel, source):
                    self.privmsg_multiline(c, channel,
                                           random.choice(self.deepthoughts))
        else:
            return SingleServerIRCBot.on_ctcp(self, c, e)
Exemplo n.º 6
0
	def on_ctcp(self, c, e):
		""" Executed on CTCP events."""
		self.on_other(c, e)
		SingleServerIRCBot.on_ctcp(self, c, e)
Exemplo n.º 7
0
 def on_ctcp(self, c, e):
     """ Executed on CTCP events."""
     self.on_other(c, e)
     SingleServerIRCBot.on_ctcp(self, c, e)
Exemplo n.º 8
0
 def on_ctcp(self, c, e): # We don't want to handle ACTIONs
     SingleServerIRCBot.on_ctcp(self, c,e)