trigger firstrun metric still.

This commit is contained in:
Sleaker 2012-02-01 07:11:58 -08:00
parent 53613cd0f9
commit fb33f6af6d

View File

@ -101,6 +101,8 @@ public class Metrics {
private final String pluginVersion;
private boolean firstRun = true;
public Metrics(String version) throws IOException {
this.pluginVersion = version;
@ -210,7 +212,8 @@ public class Metrics {
plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
public void run() {
try {
postPlugin(plugin, true);
postPlugin(plugin);
firstRun = false;
} catch (IOException e) {
//Ignore exceptions - otherwise we freak server admins out
}
@ -225,7 +228,7 @@ public class Metrics {
*
* @param plugin
*/
private void postPlugin(Plugin plugin, boolean isPing) throws IOException {
private void postPlugin(Plugin plugin) throws IOException {
// Construct the post data
String response = "ERR No response";
String data = encode("guid") + '=' + encode(guid)
@ -235,7 +238,7 @@ public class Metrics {
+ '&' + encode("revision") + '=' + encode(REVISION + "");
// If we're pinging, append it
if (isPing) {
if (firstRun) {
data += '&' + encode("ping") + '=' + encode("true");
}