mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
username is now limited by 16
This commit is contained in:
parent
747d87a3a7
commit
8a4ebcc907
1 changed files with 1 additions and 1 deletions
|
|
@ -1332,7 +1332,7 @@ class Player{
|
||||||
$this->close("Incorrect protocol #" . $packet->protocol1, false);
|
$this->close("Incorrect protocol #" . $packet->protocol1, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(preg_match('#[^a-zA-Z0-9_]#', $this->username) > 0 or $this->username === "" or $this->iusername === "rcon" or $this->iusername === "console" or $this->iusername === "server"){
|
if(preg_match('#[^a-zA-Z0-9_]#', $this->username) > 0 || $this->username === "" || $this->iusername === "rcon" || $this->iusername === "console" || $this->iusername === "server" || strlen($this->iusername) > 16){
|
||||||
$this->close("Bad username", false);
|
$this->close("Bad username", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue