import socket from threading import Thread from irc import IRC from v5 import V5 from secrets import USER, PASSWORD class Bot(object): def __init__(self, irc, v5, channels): self.irc = IRC(*irc) self.channels = channels self.v5 = V5(v5, self.irc) def start(self): # Start IRC self.irc.start(USER, PASSWORD) # Join channels for c in self.channels: self.irc.join(c) # Start v5 handler self.v5.start() # Run IRC self.irc.run()