fix npe11(send message to yourself) & nc168

This commit is contained in:
GameHerobrine 2023-02-20 11:29:01 +03:00
parent 104244365b
commit efca0f8398

View file

@ -72,8 +72,13 @@ class ChatAPI{
$target = strtolower($n);
if($target === "server" or $target === "console" or $target === "rcon"){
$target = "Console";
}else{
return "The player is offline.";
}
}
if(strtolower($target) === strtolower($issuer)){
return "You can't send message to yourself.";
}
$mes = implode(" ", $params);
$output .= "You're whispering to " . $target . ": " . $mes . "\n";
if($target !== "Console" and $target !== "Rcon"){