SourceMod now handles steamid's internally without the STEAM_*: part (bug 3428)

This commit is contained in:
Matt Woodrow
2008-11-25 19:13:08 +13:00
parent c2756c731f
commit f85bb7e490
3 changed files with 14 additions and 2 deletions
+12
View File
@@ -1182,6 +1182,12 @@ bool AdminCache::BindAdminIdentity(AdminId id, const char *auth, const char *ide
return false;
}
/* If the id was a steam id strip off the STEAM_*: part */
if (strcmp(auth, "steam") == 0 && strncmp(ident, "STEAM_", 6) == 0)
{
ident += 8;
}
if (sm_trie_retrieve(pTable, ident, NULL))
{
return false;
@@ -1204,6 +1210,12 @@ AdminId AdminCache::FindAdminByIdentity(const char *auth, const char *identity)
return INVALID_ADMIN_ID;
}
/* If the id was a steam id strip off the STEAM_*: part */
if (strcmp(auth, "steam") == 0 && strncmp(identity, "STEAM_", 6) == 0)
{
identity += 8;
}
void *object;
if (!sm_trie_retrieve(pTable, identity, &object))
{
+1 -1
View File
@@ -1615,7 +1615,7 @@ void CPlayer::DoBasicAdminChecks()
}
}
/* Check IP address */
/* Check steam id */
if ((id = g_Admins.FindAdminByIdentity("steam", m_AuthID.c_str())) != INVALID_ADMIN_ID)
{
if (g_Players.CheckSetAdmin(client, this, id))