Exemple #1
0
def thread(nick, channels):
	irc = IrcServer(nick)
	irc.autojoin = channels
	while True:
		try:
			irc.loop()
			break
		except socket.timeout:
			irc.disconnect()
			irc.connect()
		except KeyboardInterrupt:
			sys.exit(0)
		except Exception as e:
			type, value, tb = sys.exc_info()
			print(nick + " ===============")
			traceback.print_tb(tb)
			print(repr(e))
			print(nick + " ===============")
	irc.disconnect()
Exemple #2
0
def thread(nick, channels):
    irc = IrcServer(nick)
    irc.autojoin = channels
    while True:
        try:
            irc.loop()
            break
        except Exception as e:
            type, value, tb = sys.exc_info()
            print(nick + " ===============")
            traceback.print_tb(tb)
            print(repr(e))
            print(nick + " ===============")
    irc.disconnect()
def thread(nick, channels):
	irc = IrcServer(nick)
	irc.autojoin = channels
	while True:
		try:
			irc.loop()
			break
		except Exception as e:
			type, value, tb = sys.exc_info()
			print(nick + " ===============")
			traceback.print_tb(tb)
			print(repr(e))
			print(nick + " ===============")
	irc.disconnect()