mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
Added fix so players aren't targeted by name completion by default
This commit is contained in:
parent
fd8166c836
commit
26c2f61da0
1 changed files with 4 additions and 1 deletions
|
|
@ -232,7 +232,10 @@ class PlayerAPI{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get($name, $alike = true){
|
public function get($name, $alike = true){
|
||||||
$name = strtolower($name);
|
$name = trim(strtolower($name));
|
||||||
|
if($name === ""){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$CID = $this->server->query("SELECT ip,port FROM players WHERE name ".($alike === true ? "LIKE '%".$name."%'":"= '".$name."'").";", true);
|
$CID = $this->server->query("SELECT ip,port FROM players WHERE name ".($alike === true ? "LIKE '%".$name."%'":"= '".$name."'").";", true);
|
||||||
$CID = $this->server->clientID($CID["ip"], $CID["port"]);
|
$CID = $this->server->clientID($CID["ip"], $CID["port"]);
|
||||||
if(isset($this->server->clients[$CID])){
|
if(isset($this->server->clients[$CID])){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue