Update server.py
This commit is contained in:
parent
c8d2b34339
commit
8d73dda78b
1 changed files with 3 additions and 4 deletions
|
@ -116,7 +116,7 @@ def session(connection, client):
|
||||||
args = text.split(" ")[1:]
|
args = text.split(" ")[1:]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if command == "NICK":
|
if command == "NICK" and not already_set:
|
||||||
pending = text.split(" ")[1]
|
pending = text.split(" ")[1]
|
||||||
if pending[0] == ":": pending[1:]
|
if pending[0] == ":": pending[1:]
|
||||||
if "!" in pending or ":" in pending or "#" in pending or "*" in pending:
|
if "!" in pending or ":" in pending or "#" in pending or "*" in pending:
|
||||||
|
@ -126,9 +126,8 @@ def session(connection, client):
|
||||||
connection.sendall(bytes(f":{server} 433 * {pending} :Nickname is already in use.\r\n","UTF-8"))
|
connection.sendall(bytes(f":{server} 433 * {pending} :Nickname is already in use.\r\n","UTF-8"))
|
||||||
pending = "*"
|
pending = "*"
|
||||||
else:
|
else:
|
||||||
if not already_set:
|
already_set = True
|
||||||
already_set = True
|
print(f"User {pending} set nick")
|
||||||
print(f"User {pending} set nick")
|
|
||||||
elif command == "USER":
|
elif command == "USER":
|
||||||
if not ready:
|
if not ready:
|
||||||
username = text.split(" ")[1]
|
username = text.split(" ")[1]
|
||||||
|
|
Loading…
Reference in a new issue