示例#1
0
文件: aim.py 项目: gipi/Richie
 def receiveMessage(self, user, multiparts, flags):
     req = Request(message=stripHTML(multiparts[0][0]))
     req.nick = user.name
     req.channel = 'AIM'
     req.private = True
     req.addressed = True
     req.aim = self
     log.info('[AIM] <%s> %s' % (req.nick, req.message))
     self.bot.checkAddressing(req)
     self.bot.process_message(req)
示例#2
0
文件: aim.py 项目: gipi/Richie
 def receiveMessage(self, user, multiparts, flags):
     req = Request(message=stripHTML(multiparts[0][0]))
     req.nick = user.name
     req.channel = 'AIM'
     req.private = True
     req.addressed = True
     req.aim = self
     log.info('[AIM] <%s> %s' % (req.nick, req.message))
     self.bot.checkAddressing(req)
     self.bot.process_message(req)
示例#3
0
文件: aim.py 项目: ToxicFrog/lancow
 def on_message(self, user, message, private, addressed, chat=None):
     """Process incoming messages and dispatch to main bot"""
     if user.name == self.bot.botname():
         return
     message = strip_html(message)
     req = Request(message=message)
     req.nick = user.name
     req.channel = u'AIM'
     req.aim = self
     req.private = private
     req.addressed = addressed
     req.chat = chat
     self.bot.log.info(u'[AIM] <%s> %s' % (req.nick, req.message))
     self.bot.check_addressing(req)
     self.bot.process_message(req)
示例#4
0
文件: aim.py 项目: sempernex/madcow
 def on_message(self, user, message, private, addressed, chat=None):
     """Process incoming messages and dispatch to main bot"""
     if user.name == self.bot.botname():
         return
     message = strip_html(message)
     req = Request(message=message)
     req.nick = user.name
     req.channel = u'AIM'
     req.aim = self
     req.private = private
     req.addressed = addressed
     req.chat = chat
     self.bot.log.info(u'[AIM] <%s> %s' % (req.nick, req.message))
     self.bot.check_addressing(req)
     self.bot.process_message(req)
示例#5
0
文件: aim.py 项目: compbrain/madcow
    def on_message(self, user, message, private, addressed, chat=None):
        """Process incoming messages and dispatch to main bot"""
        if user.name == self.bot.botname():
            return
        message = stripHTML(message)
        req = Request(message=message)

        # lines that start with ^ will have their output rainbowed
        #if req.message.startswith(u'^'):
        #    req.message = req.message[1:]
        #    req.colorize = True
        #else:
        #    req.colorize = False

        req.nick = user.name
        req.channel = u'AIM'
        req.aim = self
        req.private = private
        req.addressed = addressed
        req.chat = chat
        log.info(u'[AIM] <%s> %s' % (req.nick, req.message))
        self.bot.check_addressing(req)
        self.bot.process_message(req)