Add OS and Mono tracking to statistics system.
This commit is contained in:
parent
9b0a8d4c6e
commit
23ddd4e891
1 changed files with 6 additions and 2 deletions
|
|
@ -51,6 +51,10 @@ namespace TShockAPI
|
||||||
tr.Close();
|
tr.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string mono = "false";
|
||||||
|
if (Type.GetType("Mono.Runtime") != null)
|
||||||
|
mono = "true";
|
||||||
|
|
||||||
using (var client = new WebClient())
|
using (var client = new WebClient())
|
||||||
{
|
{
|
||||||
client.Headers.Add("user-agent",
|
client.Headers.Add("user-agent",
|
||||||
|
|
@ -60,11 +64,11 @@ namespace TShockAPI
|
||||||
string response;
|
string response;
|
||||||
if (TShock.Config.DisablePlayerCountReporting)
|
if (TShock.Config.DisablePlayerCountReporting)
|
||||||
{
|
{
|
||||||
response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&port=" + Netplay.serverPort + "&plcount=0");
|
response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + mono + "&port=" + Netplay.serverPort + "&plcount=0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&port=" + Netplay.serverPort + "&plcount=" + TShock.Utils.ActivePlayers());
|
response = client.DownloadString("http://tshock.co/tickto.php?do=log&fp=" + fp + "&ver=" + TShock.VersionNum + "&os=" + System.Environment.OSVersion.ToString() + "&mono=" + mono + "&port=" + Netplay.serverPort + "&plcount=" + TShock.Utils.ActivePlayers());
|
||||||
}
|
}
|
||||||
Log.ConsoleInfo("Stat Tracker: " + response + "\n");
|
Log.ConsoleInfo("Stat Tracker: " + response + "\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue