Merge pull request #472 from alliedmodders/more-stv-detect-fix
Fix SourceTV bot detection on Source SDK 2013 mods and BM:S.
This commit is contained in:
commit
148943dad6
@ -683,7 +683,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
int newCount = m_PlayersSinceActive + 1;
|
int newCount = m_PlayersSinceActive + 1;
|
||||||
|
|
||||||
int userId = GetPlayerUserId(pEntity);
|
int userId = GetPlayerUserId(pEntity);
|
||||||
#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \
|
||||||
|
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
static ConVar *tv_name = icvar->FindVar("tv_name");
|
static ConVar *tv_name = icvar->FindVar("tv_name");
|
||||||
#endif
|
#endif
|
||||||
#if SOURCE_ENGINE == SE_TF2
|
#if SOURCE_ENGINE == SE_TF2
|
||||||
@ -708,7 +709,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
&& (m_SourceTVUserId == userId
|
&& (m_SourceTVUserId == userId
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO
|
||||||
|| strcmp(playername, "GOTV") == 0
|
|| strcmp(playername, "GOTV") == 0
|
||||||
#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN)
|
#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \
|
||||||
|
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||||
|| (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
|
|| (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
|
||||||
#else
|
#else
|
||||||
|| strcmp(playername, "SourceTV") == 0
|
|| strcmp(playername, "SourceTV") == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user