Exemplo n.º 1
0
Arquivo: bot.py Projeto: s3/spiffy
 def lineReceived(self, line):
     self.lastmsg = time.mktime(time.gmtime())
     line = lowDequote(line)
     line = tounicode(line)
     try:
         prefix, command, params, text = self.parsemsg(line)
         if numeric_to_symbolic.has_key(command):
             command = numeric_to_symbolic[command]
         self.handleCommand(command, prefix, params, text, line)
     except Exception, e:
         self._print("Error: %s" % e, 'err')
         print traceback.format_exc()
Exemplo n.º 2
0
 def send():
     self.say('\x02[PP]\x02[%s ago] <%s> %s' % (time, input.nick, cmd))
     prefix, command, params, text = self.parsemsg(line)
     if numeric_to_symbolic.has_key(command):
         command = numeric_to_symbolic[command]
     self.bot.handleCommand(command, prefix, params, text, line)