From 23a7847350aa615f80e41a28dc88f049a6934ea4 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 23 Mar 2013 13:14:14 +0100 Subject: [PATCH] Added Plugin List on sendUsage() --- src/API/ServerAPI.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index e73d49ef3..6598b9f2e 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -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); }