SourceMod now handles steamid's internally without the STEAM_*: part (bug 3428)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user