Update server.py
This commit is contained in:
parent
eda5a0e3da
commit
309d50ec5e
1 changed files with 6 additions and 1 deletions
|
@ -169,6 +169,8 @@ def pinger(nick, connection):
|
||||||
break
|
break
|
||||||
def session(connection, client, ip, ssl=False):
|
def session(connection, client, ip, ssl=False):
|
||||||
global property_list
|
global property_list
|
||||||
|
global channels_list
|
||||||
|
global nickname_list
|
||||||
pending = "*" # The nickname of the client
|
pending = "*" # The nickname of the client
|
||||||
already_set = False # If the client gave the server a NICK packet
|
already_set = False # If the client gave the server a NICK packet
|
||||||
ready = False # If the client gave the server a USER packet
|
ready = False # If the client gave the server a USER packet
|
||||||
|
@ -577,14 +579,17 @@ def session(connection, client, ip, ssl=False):
|
||||||
if target in channels_list:
|
if target in channels_list:
|
||||||
print("Sending to "+ target + " Channel")
|
print("Sending to "+ target + " Channel")
|
||||||
if pending in channels_list[target]:
|
if pending in channels_list[target]:
|
||||||
|
print(channels_list[target])
|
||||||
for i in channels_list[channel]:
|
for i in channels_list[channel]:
|
||||||
try:
|
try:
|
||||||
if i != pending:
|
if i != pending:
|
||||||
print(i)
|
print(i)
|
||||||
print(f":{pending}!~{username}@{hostname} {text}\r\n")
|
print(f":{pending}!~{username}@{hostname} {text}\r\n")
|
||||||
nickname_list[i].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
nickname_list[i].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
|
else:
|
||||||
|
print(i + " Is the current user!")
|
||||||
except:
|
except:
|
||||||
pass
|
print(traceback.format_exc)
|
||||||
elif target in nickname_list:
|
elif target in nickname_list:
|
||||||
nickname_list[target].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
nickname_list[target].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue