Update server.py
This commit is contained in:
parent
9bb062445c
commit
d8b8e0079b
1 changed files with 12 additions and 11 deletions
23
server.py
23
server.py
|
@ -197,17 +197,18 @@ def session(connection, client):
|
||||||
# Broadcast the nickname change
|
# Broadcast the nickname change
|
||||||
done = []
|
done = []
|
||||||
for i, users in channels_list.items():
|
for i, users in channels_list.items():
|
||||||
if pending in users:
|
if pending in users:
|
||||||
for j in users:
|
for j in users:
|
||||||
if j != pending and not j in done:
|
if j != pending and not j in done:
|
||||||
nickname_list[j].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
nickname_list[j].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
done.append(j)
|
done.append(j)
|
||||||
# Replace the nickname
|
# Replace the nickname
|
||||||
try:
|
try:
|
||||||
channels_list[i].remove(pending)
|
channels_list[i].remove(pending)
|
||||||
channels_list[i].append(pending2)
|
channels_list[i].append(pending2)
|
||||||
except:
|
except:
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
conection.sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
property_list[pending2] = property_list.pop(pending)
|
property_list[pending2] = property_list.pop(pending)
|
||||||
nickname_list[pending2] = nickname_list.pop(pending)
|
nickname_list[pending2] = nickname_list.pop(pending)
|
||||||
pending = pending2
|
pending = pending2
|
||||||
|
|
Loading…
Reference in a new issue