From eee7c783428f8688801eb86cfbe8ec281bc5bb7b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 8 Jun 2007 16:14:22 +0000 Subject: [PATCH] fixed ipaddr lookup not working for admins fixed a bug where steam-based auth could override ip auth --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40937 --- core/PlayerManager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index b01af11d..25c7c52a 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -156,10 +156,13 @@ void PlayerManager::RunAuthChecks() removed++; /* Do admin lookups */ - AdminId id = g_Admins.FindAdminByIdentity("steam", authstr); - if (id != INVALID_ADMIN_ID) + if (pPlayer->GetAdminId() == INVALID_ADMIN_ID) { - CheckSetAdmin(client, pPlayer, id); + AdminId id = g_Admins.FindAdminByIdentity("steam", authstr); + if (id != INVALID_ADMIN_ID) + { + CheckSetAdmin(client, pPlayer, id); + } } /* Send to extensions */ @@ -285,7 +288,7 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName, *ptr = '\0'; } - AdminId id = g_Admins.FindAdminByIdentity("ip", pPlayer->GetIPAddress()); + AdminId id = g_Admins.FindAdminByIdentity("ip", ip); if (id != INVALID_ADMIN_ID) { CheckSetAdmin(client, pPlayer, id);