def __init__(self, addrInfo, nicks, realname, username): self.addrInfo = addrInfo # [address - str, port - int, PASS - str, ssl - bool] self.nicks = nicks # Nicks to use self.realname = realname # Your realname self.username = username # Your username # The following three variables are None, if not connected to a server self.address = None # Address of the server, if connected self.port = None # port, if connected self.socket = None # this servers socket object, if connected self.autojoinchans = [] # These will be joined when the 001 command is received. self.nick = nicks[0] # Each server has it's own events import events self.events = events.events_manager() # And also the serverEvents, stuff like, when you get disconnected etc. self.serverEvents = events.events_manager() # pinger self.pinger = self.server_pinger(self) self.gen_eol = gen_eol
def __init__(self, addresses, nicks, realname, username): self.addresses = addresses # Addresses of which to connect to. self.nicks = nicks # Nicks to use self.realname = realname # Self explanatory... self.username = username # Self explanatory... #If connected to a server, it's the servers address self.address = None #This is none if not connected self.port = None #This is none if not connected self.socket = None #This is none if not connected self.autojoinchans = [] #These will be joined when the 001 command is received. self.nick = nicks[0] #Each server has it's own events import events self.events = events.events_manager() #And also the serverEvents, stuff like, when you get disconnected etc. self.serverEvents = events.events_manager() #pinger self.pinger = self.server_pinger(self) self.gen_eol = gen_eol