Better fix for #1201 (case-insensitive)

This commit is contained in:
Shoghi Cervantes 2014-02-11 16:57:45 +01:00
parent 89a0e84404
commit a373a581c5

View File

@ -1311,7 +1311,7 @@ class Player{
$this->close("Incorrect protocol #".$packet->protocol1, false);
return;
}
if(preg_match('#[^a-zA-Z0-9_]#', $packet->username) > 0 or $packet->username === ""){
if(preg_match('#[^a-zA-Z0-9_]#', $this->username) > 0 or $this->username === "" or $this->iusername === "rcon" or $this->iusername === "console"){
$this->close("Bad username", false);
return;
}