Update server.py
This commit is contained in:
parent
6b901a42fb
commit
5ed13ba891
1 changed files with 3 additions and 2 deletions
|
@ -218,10 +218,11 @@ def session(connection, client):
|
||||||
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
cause = str(ex)
|
cause = "Read error: " + str(ex)
|
||||||
break
|
break
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
|
cause = "Remote host closed the connection"
|
||||||
break
|
break
|
||||||
finally:
|
finally:
|
||||||
connection.close()
|
connection.close()
|
||||||
|
@ -234,7 +235,7 @@ def session(connection, client):
|
||||||
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} QUIT :Read error: {cause}\r\n","UTF-8"))
|
nickname_list[j].sendall(bytes(f":{pending}!~{username}@{hostname} QUIT :{cause}\r\n","UTF-8"))
|
||||||
done.append(j)
|
done.append(j)
|
||||||
# Remove the quitting user from the channel.
|
# Remove the quitting user from the channel.
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue