Player count stuffs
This commit is contained in:
parent
1520688256
commit
fc735ba829
3 changed files with 7 additions and 5 deletions
|
|
@ -245,12 +245,12 @@ namespace TShockAPI
|
|||
if (code == "A1")
|
||||
if (TShock.Config.KickProxyUsers)
|
||||
TShock.Utils.Kick(args.Player, "Proxies are not allowed");
|
||||
Log.Info(string.Format("{0} ({1}) from '{2}' group from '{3}' joined.", args.Player.Name, args.Player.IP, args.Player.Group.Name, args.Player.Country));
|
||||
Log.Info(string.Format("{0} ({1}) from '{2}' group from '{3}' joined. ({3}/{4})", args.Player.Name, args.Player.IP, args.Player.Group.Name, args.Player.Country, TShock.Utils.ActivePlayers(), TShock.Config.MaxSlots));
|
||||
TShock.Utils.Broadcast(args.Player.Name + " has joined from the " + args.Player.Country, Color.Yellow);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Info(string.Format("{0} ({1}) from '{2}' group joined.", args.Player.Name, args.Player.IP, args.Player.Group.Name));
|
||||
Log.Info(string.Format("{0} ({1}) from '{2}' group joined. ({3}/{4})", args.Player.Name, args.Player.IP, args.Player.Group.Name, TShock.Utils.ActivePlayers(), TShock.Config.MaxSlots));
|
||||
TShock.Utils.Broadcast(args.Player.Name + " has joined", Color.Yellow);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace TShockAPI
|
|||
}
|
||||
else
|
||||
{
|
||||
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 + "&port=" + Netplay.serverPort + "&plcount=" + TShock.Utils.ActivePlayers());
|
||||
}
|
||||
Log.ConsoleInfo("Stat Tracker: " + response + "\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ namespace TShockAPI
|
|||
if (Config.EnableGeoIP && File.Exists(geoippath))
|
||||
Geo = new MaxMind.GeoIPCountry(geoippath);
|
||||
|
||||
Console.Title = string.Format("TerrariaShock Version {0} ({1})", Version, VersionCodename);
|
||||
Log.ConsoleInfo(string.Format("TerrariaShock Version {0} ({1}) now running.", Version, VersionCodename));
|
||||
|
||||
GameHooks.PostInitialize += OnPostInit;
|
||||
|
|
@ -431,10 +432,12 @@ namespace TShockAPI
|
|||
if ((DateTime.UtcNow - LastCheck).TotalSeconds >= 1)
|
||||
{
|
||||
LastCheck = DateTime.UtcNow;
|
||||
int count = 0;
|
||||
foreach (TSPlayer player in Players)
|
||||
{
|
||||
if (player != null && player.Active)
|
||||
{
|
||||
count++;
|
||||
if (player.TilesDestroyed != null)
|
||||
{
|
||||
if (player.TileThreshold >= Config.TileThreshold)
|
||||
|
|
@ -447,8 +450,6 @@ namespace TShockAPI
|
|||
player.TilesDestroyed.Clear();
|
||||
}
|
||||
}
|
||||
/*if (CheckPlayerCollision(player.TileX, player.TileY))
|
||||
player.SendMessage("You are currently nocliping!", Color.Red);*/
|
||||
if (player.ForceSpawn && (DateTime.Now - player.LastDeath).Seconds >= 3)
|
||||
{
|
||||
player.Spawn();
|
||||
|
|
@ -456,6 +457,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
}
|
||||
Console.Title = string.Format("TerrariaShock Version {0} ({1}) ({2}/{3})", Version, VersionCodename, count, Config.MaxSlots);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue