Caching IsAdmin as to optimize load on file system

This commit is contained in:
Maverick Motherfucker 2011-06-02 21:59:33 -07:00
parent 79c0bddf5e
commit 818348a445
4 changed files with 22 additions and 9 deletions

View file

@ -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));