示例#1
0
文件: bot.py 项目: ohaz/TeamspeakIRC
 def start(self):
     log.info('Mainloop started!')
     self.start_loop_threads()
     try:
         for line in self.recieve_line():
             log.debug('<<' + line)
             self.parse_line(line)
     except KeyboardInterrupt:
         self.stop_loop_threads()
         self.disconnect('Interrupted')
     except ConnectionResetError:
         self.stop_loop_threads()
         log.critical('connection reset by peer')
示例#2
0
文件: bot.py 项目: ohaz/TeamspeakIRC
 def join(self, channel):
     Basic.join(self, channel)
     self.current_channel = channel
     log.info('Joined {}'.format(channel))