notice
This commit is contained in:
parent
c15cf04f89
commit
923ae1cbcf
1 changed files with 14 additions and 0 deletions
14
server.py
14
server.py
|
@ -207,6 +207,20 @@ def session(connection, client):
|
||||||
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:
|
||||||
connection.sendall(bytes(f":{server} 401 {pending} {target} :No such nick/channel\r\n","UTF-8"))
|
connection.sendall(bytes(f":{server} 401 {pending} {target} :No such nick/channel\r\n","UTF-8"))
|
||||||
|
elif command == "NOTICE":
|
||||||
|
target = text.split(" ")[1]
|
||||||
|
if target in channels_list:
|
||||||
|
if pending in channels_list[target]:
|
||||||
|
for i in channels_list[channel]:
|
||||||
|
try:
|
||||||
|
if i != pending:
|
||||||
|
nickname_list[i].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
elif target in nickname_list:
|
||||||
|
nickname_list[target].sendall(bytes(f":{pending}!~{username}@{hostname} {text}\r\n","UTF-8"))
|
||||||
|
else:
|
||||||
|
connection.sendall(bytes(f":{server} 401 {pending} {target} :No such nick/channel\r\n","UTF-8"))
|
||||||
elif command == "QUIT":
|
elif command == "QUIT":
|
||||||
# Parse the quit message.
|
# Parse the quit message.
|
||||||
done = []
|
done = []
|
||||||
|
|
Loading…
Reference in a new issue