1.1 --- a/core/PlayerManager.cpp Fri Jun 08 20:31:42 2012 -0400
1.2 +++ b/core/PlayerManager.cpp Sat Jun 09 20:00:55 2012 -0400
1.3 @@ -884,6 +884,20 @@
1.4 const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name");
1.5 const char *old_name = pPlayer->m_Name.c_str();
1.6
1.7 +#if SOURCE_ENGINE >= SE_LEFT4DEAD
1.8 + const char *networkid_force;
1.9 + if ((networkid_force = engine->GetClientConVarValue(client, "networkid_force")) && networkid_force[0] != '\0')
1.10 + {
1.11 + unsigned long long *steamId = (unsigned long long *)engine->GetClientSteamID(pEntity);
1.12 + unsigned int accountId = steamId ? (*steamId & 0xFFFFFFFF) : 0;
1.13 + g_Logger.LogMessage("\"%s<%d><STEAM_1:%d:%d><>\" has bad networkid (id \"%s\") (ip \"%s\")",
1.14 + new_name, pPlayer->GetUserId(), accountId & 1, accountId >> 1, networkid_force, pPlayer->GetIPAddress());
1.15 +
1.16 + pPlayer->Kick("NetworkID spoofing detected.");
1.17 + RETURN_META(MRES_IGNORED);
1.18 + }
1.19 +#endif
1.20 +
1.21 if (strcmp(old_name, new_name) != 0)
1.22 {
1.23 AdminId id = g_Admins.FindAdminByIdentity("name", new_name);