mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Merge branch 'master' into pr
This commit is contained in:
commit
b003448ac5
16 changed files with 427 additions and 262 deletions
|
|
@ -35,6 +35,7 @@ class ChatAPI{
|
|||
break;
|
||||
}
|
||||
$sender = ($issuer instanceof Player) ? "Server" : ucfirst($issuer);
|
||||
if(Utils::hasEmoji($s)) return "Your message contains illegal characters!";
|
||||
$this->server->api->chat->broadcast("[$sender] " . $s);
|
||||
break;
|
||||
case "me":
|
||||
|
|
@ -52,7 +53,9 @@ class ChatAPI{
|
|||
}else{
|
||||
$sender = $issuer->username;
|
||||
}
|
||||
$this->broadcast("* $sender " . implode(" ", $params));
|
||||
$msg = implode(" ", $params);
|
||||
if(Utils::hasEmoji($msg)) return "Your message contains illegal characters!";
|
||||
$this->broadcast("* $sender $msg");
|
||||
break;
|
||||
case "tell":
|
||||
if(!isset($params[0]) or !isset($params[1])){
|
||||
|
|
@ -80,6 +83,7 @@ class ChatAPI{
|
|||
return "You can't send message to yourself.";
|
||||
}
|
||||
$mes = implode(" ", $params);
|
||||
if(Utils::hasEmoji($mes)) return "Your message contains illegal characters!";
|
||||
$output .= "You're whispering to " . $target . ": " . $mes . "\n";
|
||||
if($target !== "Console" and $target !== "Rcon"){
|
||||
$this->sendTo(false, $sender . " whispers to you: " . $mes, $target);
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ class ConsoleAPI{
|
|||
if(!defined("NO_THREADS")){
|
||||
self::$loop->stop();
|
||||
self::$loop->notify();
|
||||
//@fclose($this->loop->fp);
|
||||
usleep(50000);
|
||||
//$this->loop->join();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue