Update server.py

This commit is contained in:
Nova Cat 2024-12-09 13:53:01 -08:00
parent 4ebae2a9e5
commit ed080afaa2

View file

@ -191,10 +191,11 @@ def session(connection, client):
except:
print(traceback.format_exc())
# Confirm QUIT and close the socket.
if connection.recv(2048):
try:
connection.sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
if connection.recv(2048):
connection.sendall(bytes(f"ERROR :Closing Link: {hostname} ({msg})\r\n","UTF-8"))
except:
pass
connection.close()
safe_quit = True
break
@ -215,6 +216,7 @@ def session(connection, client):
except:
print(traceback.format_exc())
break
if not data:
break