Caching IsAdmin as to optimize load on file system
This commit is contained in:
parent
79c0bddf5e
commit
818348a445
4 changed files with 22 additions and 9 deletions
|
|
@ -224,7 +224,7 @@ namespace TShockAPI
|
|||
/// <param name="ply">int player</param>
|
||||
public static void HandleCheater(int ply)
|
||||
{
|
||||
if (!Tools.IsAdmin(ply))
|
||||
if (!TShock.players[ply].IsAdmin())
|
||||
{
|
||||
string cheater = Tools.FindPlayer(ply);
|
||||
string ip = Tools.GetRealIP(Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue