Added Plugin List on sendUsage()

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-23 13:14:14 +01:00
parent f07cd21dd1
commit 23a7847350

View File

@ -222,6 +222,10 @@ class ServerAPI{
public function sendUsage(){
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(
"serverid" => $this->server->serverID,
"os" => Utils::getOS(),
@ -229,6 +233,7 @@ class ServerAPI{
"protocol" => CURRENT_PROTOCOL,
"online" => count($this->server->clients),
"max" => $this->server->maxClients,
"plugins" => $plist,
), 10);
}