mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Bad usernames
This commit is contained in:
parent
f1eec90080
commit
ff153c1db5
1 changed files with 1 additions and 1 deletions
|
|
@ -1311,7 +1311,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_]#', $packet->username) > 0 or $packet->username === "" or strtolower($packet->username) === "rcon" or strtolower($packet->username) === "console" or strtolower($packet->username) === "server"){
|
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"){
|
||||||
$this->close("Bad username", false);
|
$this->close("Bad username", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue