Update __init__.py
This commit is contained in:
parent
9bcacd6631
commit
a29c2b05ac
1 changed files with 7 additions and 1 deletions
|
@ -51,7 +51,13 @@ class IRCSession: # Actual IRC session
|
|||
else:
|
||||
self.socket.connect((self.server, self.port))
|
||||
self.connecting = True
|
||||
return False
|
||||
self.send("USER " + self.user + " " + self.user + " " + self.nick + " :SugarCaneIRC user\n")
|
||||
self.send(f"NICK {self.nick}\n")
|
||||
def send(self, content:str): # Attempt to send raw data to the socket
|
||||
if self.ssl:
|
||||
self.wsocket.send(bytes(content,"UTF-8"))
|
||||
else:
|
||||
self.socket.send(bytes(content,"UTF-8"))
|
||||
def get(self): # Attempt to get the raw data and parse it.
|
||||
# The code is copied from sweeBotIRC btw
|
||||
if self.ssl:
|
||||
|
|
Loading…
Add table
Reference in a new issue