From c775f1908dd8c7df3c7e2679f503eba674acc8cf Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 30 Aug 2012 22:08:23 +0100 Subject: [PATCH] Hopefully fixed blocking SourceTV clients. --- extension.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/extension.cpp b/extension.cpp index fa3e3ba..d5594c1 100644 --- a/extension.cpp +++ b/extension.cpp @@ -39,6 +39,13 @@ class CBaseClient; class CBaseServer; +typedef enum EAuthProtocol +{ + k_EAuthProtocolWONCertificate = 1, + k_EAuthProtocolHashedCDKey = 2, + k_EAuthProtocolSteam = 3, +} EAuthProtocol; + typedef enum EBeginAuthSessionResult { k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID. @@ -210,6 +217,12 @@ bool g_bSuppressCheckChallengeType = false; char passwordBuffer[255]; DETOUR_DECL_MEMBER9(CBaseServer__ConnectClient, IClient *, netadr_t &, address, int, nProtocol, int, iChallenge, int, iClientChallenge, int, nAuthProtocol, const char *, pchName, const char *, pchPassword, const char *, pCookie, int, cbCookie) { + if (nAuthProtocol != k_EAuthProtocolSteam) + { + // This is likely a SourceTV client, we don't want to interfere here. + return DETOUR_MEMBER_CALL(CBaseServer__ConnectClient)(address, nProtocol, iChallenge, iClientChallenge, nAuthProtocol, pchName, pchPassword, pCookie, cbCookie); + } + g_pBaseServer = (CBaseServer *)this; if (pCookie == NULL || cbCookie < sizeof(uint64))