Convert CPlayer::m_AuthID to ke::AString.
This commit is contained in:
parent
5a814c40b3
commit
de12f64c14
@ -405,7 +405,7 @@ void PlayerManager::RunAuthChecks()
|
||||
pPlayer = &m_Players[m_AuthQueue[i]];
|
||||
pPlayer->UpdateAuthIds();
|
||||
|
||||
authstr = pPlayer->m_AuthID.c_str();
|
||||
authstr = pPlayer->m_AuthID.chars();
|
||||
|
||||
if (!pPlayer->IsAuthStringValidated())
|
||||
{
|
||||
@ -717,14 +717,14 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
for (iter=m_hooks.begin(); iter!=m_hooks.end(); iter++)
|
||||
{
|
||||
pListener = (*iter);
|
||||
pListener->OnClientAuthorized(client, steamId ? steamId : pPlayer->m_AuthID.c_str());
|
||||
pListener->OnClientAuthorized(client, steamId ? steamId : pPlayer->m_AuthID.chars());
|
||||
}
|
||||
/* Finally, tell plugins */
|
||||
if (m_clauth->GetFunctionCount())
|
||||
{
|
||||
m_clauth->PushCell(client);
|
||||
/* For legacy reasons, people are expecting the Steam2 id here if using Steam auth */
|
||||
m_clauth->PushString(steamId ? steamId : pPlayer->m_AuthID.c_str());
|
||||
m_clauth->PushString(steamId ? steamId : pPlayer->m_AuthID.chars());
|
||||
m_clauth->Execute(NULL);
|
||||
}
|
||||
pPlayer->Authorize_Post();
|
||||
@ -2001,7 +2001,7 @@ void CPlayer::UpdateAuthIds()
|
||||
#else
|
||||
authstr = engine->GetPlayerNetworkIDString(m_pEdict);
|
||||
#endif
|
||||
m_AuthID.assign(authstr);
|
||||
m_AuthID = authstr;
|
||||
|
||||
// Then, cache SteamId
|
||||
if (IsFakeClient())
|
||||
@ -2097,7 +2097,7 @@ void CPlayer::Disconnect()
|
||||
m_IsAuthorized = false;
|
||||
m_Name.clear();
|
||||
m_Ip.clear();
|
||||
m_AuthID.clear();
|
||||
m_AuthID = "";
|
||||
m_SteamId = k_steamIDNil;
|
||||
m_Steam2Id = "";
|
||||
m_Steam3Id = "";
|
||||
@ -2142,7 +2142,7 @@ const char *CPlayer::GetAuthString(bool validated)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return m_AuthID.c_str();
|
||||
return m_AuthID.chars();
|
||||
}
|
||||
|
||||
const CSteamID &CPlayer::GetSteamId(bool validated)
|
||||
@ -2451,7 +2451,7 @@ void CPlayer::DoBasicAdminChecks()
|
||||
}
|
||||
|
||||
/* Check steam id */
|
||||
if ((id = adminsys->FindAdminByIdentity("steam", m_AuthID.c_str())) != INVALID_ADMIN_ID)
|
||||
if ((id = adminsys->FindAdminByIdentity("steam", m_AuthID.chars())) != INVALID_ADMIN_ID)
|
||||
{
|
||||
if (g_Players.CheckSetAdmin(client, this, id))
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
String m_Name;
|
||||
String m_Ip;
|
||||
String m_IpNoPort;
|
||||
String m_AuthID;
|
||||
ke::AString m_AuthID;
|
||||
ke::AString m_Steam2Id;
|
||||
ke::AString m_Steam3Id;
|
||||
AdminId m_Admin;
|
||||
|
Loading…
Reference in New Issue
Block a user