mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Merge pull request #2 from GameHerobrine/master
@everyone, @here and all @ fix(port of johnymuffin's one)
This commit is contained in:
commit
c278ee633d
2 changed files with 2 additions and 1 deletions
|
|
@ -110,6 +110,7 @@ class PlayerAPI{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->server->api->chat->broadcast($data["player"]->username . $message);
|
$this->server->api->chat->broadcast($data["player"]->username . $message);
|
||||||
|
$this->server->send2Discord($data["player"]->username . $message);
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -716,7 +716,7 @@ class PocketMinecraftServer{
|
||||||
$url = $this->extraprops->get("discord-webhook-url");
|
$url = $this->extraprops->get("discord-webhook-url");
|
||||||
$name = $this->extraprops->get("discord-bot-name");
|
$name = $this->extraprops->get("discord-bot-name");
|
||||||
$headers = [ 'Content-Type: application/json; charset=utf-8' ];
|
$headers = [ 'Content-Type: application/json; charset=utf-8' ];
|
||||||
$POST = [ 'username' => $name, 'content' => $msg];
|
$POST = [ 'username' => $name, 'content' => str_replace("@"," ",$msg)];
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue