mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Bad usernames.
This commit is contained in:
parent
a09610b53f
commit
e0e8fbc8c4
1 changed files with 1 additions and 4 deletions
|
|
@ -1283,10 +1283,7 @@ class Player{
|
|||
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
||||
break;
|
||||
}
|
||||
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) == 0 and $data["username"] != ""){
|
||||
$this->username = $data["username"];
|
||||
$this->iusername = strtolower($this->username);
|
||||
}else{
|
||||
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) > 0 or $data["username"] === "" or strtolower($data["username"]) === "rcon" or strtolower($data["username"]) === "console"){
|
||||
$this->close("Bad username", false);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue