Update server.py
All checks were successful
Check syntax / check (push) Successful in 5s

This commit is contained in:
Nova Cat 2024-12-26 16:15:51 -08:00
parent 65e6c4344e
commit 3a56573e9d

View file

@ -374,14 +374,15 @@ def session(connection, client):
elif command == "QUIT": elif command == "QUIT":
# Parse the quit message. # Parse the quit message.
done = [] done = []
msg = text.split(" ")[1:] if len(text.split(" ")) == 1:
if msg[0] == ":": msg = "Client Quit"
msg=msg[1:]
if len(msg) > 0:
mse = " ".join(msg)
msg = f"Quit: {mse}"
else: else:
msg = "Quit: " + pending msg = text.split(" ")[1:]
if msg[0] == ":":
msg=msg[1:]
if len(msg) > 0:
mse = " ".join(msg)
msg = f"Quit: {mse}"
text = f"QUIT :{msg}" text = f"QUIT :{msg}"
# Broadcast all users in the joined channels that the person quit. # Broadcast all users in the joined channels that the person quit.
for i, users in channels_list.items(): for i, users in channels_list.items():