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')
def join(self, channel): Basic.join(self, channel) self.current_channel = channel log.info('Joined {}'.format(channel))