Update server.py
All checks were successful
Check syntax / check (push) Successful in 5s
All checks were successful
Check syntax / check (push) Successful in 5s
This commit is contained in:
parent
65e6c4344e
commit
3a56573e9d
1 changed files with 8 additions and 7 deletions
15
server.py
15
server.py
|
@ -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():
|
||||||
|
|
Loading…
Reference in a new issue