Update server.py
This commit is contained in:
parent
cd10e8ae90
commit
282818f5dc
1 changed files with 2 additions and 12 deletions
14
server.py
14
server.py
|
@ -520,24 +520,14 @@ def session(connection, client):
|
||||||
pass
|
pass
|
||||||
cleanup_manual()
|
cleanup_manual()
|
||||||
def cleanup():
|
def cleanup():
|
||||||
global channels_list
|
|
||||||
global property_list
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
print("Cleaning up...")
|
cleanup_manual()
|
||||||
for i, j in channels_list.items():
|
|
||||||
for h in i:
|
|
||||||
if not h in property_list:
|
|
||||||
print("Found a detached connection: " + h)
|
|
||||||
i.remove(h)
|
|
||||||
for k in channels_list[j]:
|
|
||||||
if k != h and k in nickname_list:
|
|
||||||
nickname[k].sendall(f":{h}!~DISCONNECTED@DISCONNECTED PART {j} :IRCat Cleanup: Found missing connection!!\r\n")
|
|
||||||
def cleanup_manual():
|
def cleanup_manual():
|
||||||
global channels_list
|
global channels_list
|
||||||
global property_list
|
global property_list
|
||||||
print("Cleaning up...")
|
print("Cleaning up...")
|
||||||
for i, j in channels_list.items():
|
for j, i in channels_list.items():
|
||||||
for h in i:
|
for h in i:
|
||||||
if not h in property_list:
|
if not h in property_list:
|
||||||
print("Found a detached connection: " + h)
|
print("Found a detached connection: " + h)
|
||||||
|
|
Loading…
Reference in a new issue