Remove Utils.GetPlayerIP()
This commit is contained in:
parent
70c8ef548f
commit
a5a3aae599
2 changed files with 1 additions and 19 deletions
|
|
@ -71,6 +71,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Removed `Utils.ActivePlayers()` -- use `TShock.Players.Length` instead. (@hakusaro)
|
* Removed `Utils.ActivePlayers()` -- use `TShock.Players.Length` instead. (@hakusaro)
|
||||||
* Moved `Utils.Kick()` to `TSPlayer` since its first argument was a `TSPlayer` object. (@hakusaro)
|
* Moved `Utils.Kick()` to `TSPlayer` since its first argument was a `TSPlayer` object. (@hakusaro)
|
||||||
* Removed `Utils.ForceKick()`. (@hakusaro)
|
* Removed `Utils.ForceKick()`. (@hakusaro)
|
||||||
|
* removed `Utils.GetPlayerIP()`. (@hakusaro)
|
||||||
|
|
||||||
## TShock 4.3.25
|
## TShock 4.3.25
|
||||||
* Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6.
|
* Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6.
|
||||||
|
|
|
||||||
|
|
@ -96,25 +96,6 @@ namespace TShockAPI
|
||||||
return players;
|
return players;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds a player and gets IP as string
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="playername">string playername</param>
|
|
||||||
public string GetPlayerIP(string playername)
|
|
||||||
{
|
|
||||||
foreach (TSPlayer player in TShock.Players)
|
|
||||||
{
|
|
||||||
if (player != null && player.Active)
|
|
||||||
{
|
|
||||||
if (playername.ToLower() == player.Name.ToLower())
|
|
||||||
{
|
|
||||||
return player.IP;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// It's a clamp function
|
/// It's a clamp function
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue