Update server.py
Some checks are pending
Check syntax / check (push) Waiting to run
Some checks are pending
Check syntax / check (push) Waiting to run
This commit is contained in:
parent
2133b6de68
commit
a89a10705c
1 changed files with 1 additions and 2 deletions
|
@ -158,9 +158,8 @@ def session(connection, client, ip, ssl=False):
|
|||
if client[0] in banlist:
|
||||
print("Specified IP is banned, killing now.")
|
||||
reason = banlist[client[0]]
|
||||
connection.sendall(bytes(f":{server} NOTICE * :{reason}\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f":{server} 465 * :You are banned from this server\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f"ERROR :Closing Link: {hostname} (K-Lined)\r\n","UTF-8"))
|
||||
connection.sendall(bytes(f"ERROR :Closing Link: {hostname} (K-Lined: {reason})\r\n","UTF-8"))
|
||||
time.sleep(3)
|
||||
raise Exception("Killed connection, IP is banned.")
|
||||
while True:
|
||||
|
|
Loading…
Reference in a new issue