diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 85d4f36..6dc4432 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -2011,7 +2011,7 @@ int EXT_FUNC SV_FinishCertificateCheck_internal(netadr_t *adr, int nAuthProtocol const char *val = Info_ValueForKey(userinfo, "*hltv"); - if (val[0] == 0 || Q_atoi(val) != 1) + if (val[0] == 0 || Q_atoi(val) != TYPE_PROXY) { SV_RejectConnection(adr, "Invalid CD Key.\n"); return 0; @@ -2254,10 +2254,10 @@ int SV_CheckUserInfo(netadr_t *adr, char *userinfo, qboolean bIsReconnecting, in switch (Q_atoi(s)) { - case 0: + case TYPE_CLIENT: return 1; - case 1: + case TYPE_PROXY: SV_CountProxies(&proxies); if (proxies >= sv_proxies.value && !bIsReconnecting) { @@ -2266,7 +2266,7 @@ int SV_CheckUserInfo(netadr_t *adr, char *userinfo, qboolean bIsReconnecting, in } return 1; - case 3: + case TYPE_COMMENTATOR: SV_RejectConnection(adr, "Please connect to HLTV master proxy.\n"); return 0; @@ -2470,7 +2470,7 @@ void EXT_FUNC SV_ConnectClient_internal(void) SV_RejectConnection(&adr, "Invalid validation type\n"); return; } - if (Q_atoi(val) != 1) + if (Q_atoi(val) != TYPE_PROXY) { SV_RejectConnection(&adr, "Invalid validation type\n"); return; @@ -5051,7 +5051,7 @@ void SV_ExtractFromUserinfo(client_t *cl) cl->lc = val[0] != 0 ? Q_atoi(val) != 0 : 0; val = Info_ValueForKey(userinfo, "*hltv"); - cl->proxy = val[0] != 0 ? Q_atoi(val) == 1 : 0; + cl->proxy = val[0] != 0 ? Q_atoi(val) == TYPE_PROXY : 0; SV_CheckUpdateRate(&cl->next_messageinterval); SV_CheckRate(cl); diff --git a/rehlds/rehlds/precompiled.h b/rehlds/rehlds/precompiled.h index 645f9e7..7c05286 100644 --- a/rehlds/rehlds/precompiled.h +++ b/rehlds/rehlds/precompiled.h @@ -59,3 +59,4 @@ #include "rehlds_security.h" #include "dlls/cdll_dll.h" +#include "hltv.h"