Option to send player IPs to admins.

This commit is contained in:
Deathmax 2011-12-04 17:38:30 +08:00
parent e6f06ab567
commit 85123a4db3
2 changed files with 5 additions and 0 deletions

View file

@ -202,6 +202,9 @@ namespace TShockAPI
[Description("Disable tombstones for all players.")]
public bool DisableTombstones = true;
[Description("Displays a player's IP on join to everyone who has the log permission")]
public bool DisplayIPToAdmins = false;
public static ConfigFile Read(string path)
{
if (!File.Exists(path))

View file

@ -693,6 +693,8 @@ namespace TShockAPI
player.Teleport((int)pos.X, (int)pos.Y);
player.SendTileSquare((int)pos.X, (int)pos.Y);
}
if (Config.DisplayIPToAdmins)
Utils.SendLogs(string.Format("{0} has joined. IP: {1}", player.Name, player.IP), Color.Blue);
e.Handled = true;
}