From 542d3d345e27afd3aa337937bb14c8bc18ea1c56 Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Sat, 21 Mar 2015 15:45:29 +0100 Subject: [PATCH] Do not use deprecated GetClientAuthString native. --- src/zr/playerclasses/classevents.inc | 6 ++---- src/zr/steamidcache.inc | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/zr/playerclasses/classevents.inc b/src/zr/playerclasses/classevents.inc index fec762b..d6fccf9 100644 --- a/src/zr/playerclasses/classevents.inc +++ b/src/zr/playerclasses/classevents.inc @@ -199,7 +199,6 @@ ClassOnClientDisconnect(client) ClassOnClientSpawn(client) { decl String:originalmodel[PLATFORM_MAX_PATH]; - decl String:steamid[16]; decl String:classname[64]; new filter[ClassFilter]; @@ -241,12 +240,11 @@ ClassOnClientSpawn(client) // Mark player as not in admin mode. ClassPlayerInAdminMode[client] = false; - // Get random class setting and steam id. + // Get random class setting. new bool:randomclass = GetConVarBool(g_hCvarsList[CVAR_CLASSES_RANDOM]); - GetClientAuthString(client, steamid, sizeof(steamid)); // Assign random classes if enabled. Always do it for bots. - if (randomclass || StrEqual(steamid, "BOT")) + if (randomclass || IsFakeClient(client)) { // Setup filtering // --------------- diff --git a/src/zr/steamidcache.inc b/src/zr/steamidcache.inc index 2bfaf42..7ecab65 100644 --- a/src/zr/steamidcache.inc +++ b/src/zr/steamidcache.inc @@ -57,8 +57,8 @@ stock bool:SteamidCacheAddClient(Handle:steamidcache, client) } // Get client's SteamID. - decl String:steamid[STEAMIDCACHE_MAX_LENGTH]; - GetClientAuthString(client, steamid, sizeof(steamid)); + new String:steamid[STEAMIDCACHE_MAX_LENGTH]; + GetClientAuthId(client, AuthId_SteamID64, steamid, sizeof(steamid), true); // Push SteamID into the SteamID cache. PushArrayString(steamidcache, steamid); @@ -78,7 +78,7 @@ stock bool:SteamidCacheClientExists(Handle:steamidcache, client) { // Get client's SteamID. decl String:steamid[STEAMIDCACHE_MAX_LENGTH]; - GetClientAuthString(client, steamid, sizeof(steamid)); + GetClientAuthId(client, AuthId_SteamID64, steamid, sizeof(steamid), true); // Return true if client was found, false otherwise. return (FindStringInArray(steamidcache, steamid) != -1);