Example #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()
Example #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()
Example #3
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()