mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Added Plugin List on sendUsage()
This commit is contained in:
parent
f07cd21dd1
commit
23a7847350
1 changed files with 5 additions and 0 deletions
|
|
@ -222,6 +222,10 @@ class ServerAPI{
|
||||||
|
|
||||||
public function sendUsage(){
|
public function sendUsage(){
|
||||||
console("[INTERNAL] Sending usage data...", true, true, 3);
|
console("[INTERNAL] Sending usage data...", true, true, 3);
|
||||||
|
$plist = "";
|
||||||
|
foreach($this->plugin->getList() as $p){
|
||||||
|
$plist .= str_replace(array(";", ":"), "", $p["name"]).":".str_replace(array(";", ":"), "", $p["version"]).";";
|
||||||
|
}
|
||||||
Utils::curl_post("http://stats.pocketmine.net/usage.php", array(
|
Utils::curl_post("http://stats.pocketmine.net/usage.php", array(
|
||||||
"serverid" => $this->server->serverID,
|
"serverid" => $this->server->serverID,
|
||||||
"os" => Utils::getOS(),
|
"os" => Utils::getOS(),
|
||||||
|
|
@ -229,6 +233,7 @@ class ServerAPI{
|
||||||
"protocol" => CURRENT_PROTOCOL,
|
"protocol" => CURRENT_PROTOCOL,
|
||||||
"online" => count($this->server->clients),
|
"online" => count($this->server->clients),
|
||||||
"max" => $this->server->maxClients,
|
"max" => $this->server->maxClients,
|
||||||
|
"plugins" => $plist,
|
||||||
), 10);
|
), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue