Update __init__.py
This commit is contained in:
parent
b40796211c
commit
670e503c6a
1 changed files with 4 additions and 4 deletions
|
@ -14,13 +14,13 @@ class channel: # Channel object
|
|||
self.is_init = True
|
||||
self.topic, self.modes = topic, modes
|
||||
class IRCSession: # Actual IRC session
|
||||
messages = None
|
||||
connecting = False
|
||||
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
messages = None # Cached messages
|
||||
connecting = False # Connection status
|
||||
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Socket
|
||||
def __init__(self, address:str, port:int, nick:str, user:str, *args, **kwargs): # Contains the configuration
|
||||
self.server, self.port, self.nick, self.user = address,port,nick,user
|
||||
print("Defined IRC session with server " + address + " port " + str(port))
|
||||
def connect(self): # Attempt to connect
|
||||
print("Connecting to " + self.server + ":" + str(self.port) + "...")
|
||||
self.socket.connect((self.server, self.port))
|
||||
self.connecting = True
|
||||
return False
|
||||
|
|
Loading…
Add table
Reference in a new issue