Update __init__.py
This commit is contained in:
parent
f22f004b4e
commit
9bcacd6631
1 changed files with 4 additions and 1 deletions
|
@ -32,10 +32,13 @@ class IRCSession: # Actual IRC session
|
|||
connecting = False # Connection status
|
||||
is_ssl = False # Wether the connection uses TLS/SSL
|
||||
ssl_accept_invalid = False # If SSL is enabled, do not fail to connect if the certificate is invalid.
|
||||
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Socket
|
||||
socket = socket.socket() # Socket
|
||||
wsocket = None # Wrapped socket (if SSL is enabled)
|
||||
context = ssl_module.create_default_context() # Context of the SSL module, not to be changed by the client.
|
||||
def __init__(self, address:str="irc.libera.chat", port:int=6697, nick:str="sweetAsSugar", user:str="sugarCaneIRC", ssl:bool=True, ssl_igninvalid:bool=False, **kwargs): # Contains the configuration
|
||||
self.irc_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.context = ssl_module.create_default_context()
|
||||
self.wsocket = None
|
||||
self.server, self.port, self.nick, self.user, self.ssl, self.ssl_accept_invalid = address,port,nick,user,ssl,ssl_igninvalid
|
||||
if ssl:
|
||||
if ssl_igninvalid:
|
||||
|
|
Loading…
Add table
Reference in a new issue