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.is_init = True
|
||||||
self.topic, self.modes = topic, modes
|
self.topic, self.modes = topic, modes
|
||||||
class IRCSession: # Actual IRC session
|
class IRCSession: # Actual IRC session
|
||||||
messages = None
|
messages = None # Cached messages
|
||||||
connecting = False
|
connecting = False # Connection status
|
||||||
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
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
|
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
|
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
|
def connect(self): # Attempt to connect
|
||||||
|
print("Connecting to " + self.server + ":" + str(self.port) + "...")
|
||||||
self.socket.connect((self.server, self.port))
|
self.socket.connect((self.server, self.port))
|
||||||
self.connecting = True
|
self.connecting = True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Reference in a new issue