From 0a968eb9bfd17dcc01bb467afeb79969b47976d9 Mon Sep 17 00:00:00 2001 From: Horst Beham Date: Wed, 4 Sep 2024 16:37:26 +0200 Subject: [PATCH] fixed issue handling challenge/response for A2S_PLAYERS and A2S_RULES --- QueryMaster/QueryMaster/Server.cs | 20 ++++++++------------ ServerBrowser/Games/Toxikk.cs | 2 +- ServerBrowser/ServerBrowserForm.cs | 2 +- changelog.md | 4 ++++ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/QueryMaster/QueryMaster/Server.cs b/QueryMaster/QueryMaster/Server.cs index 7b104b0..981182e 100644 --- a/QueryMaster/QueryMaster/Server.cs +++ b/QueryMaster/QueryMaster/Server.cs @@ -284,14 +284,12 @@ protected virtual ReadOnlyCollection GetPlayersCore(Stopwatch sw = null) } else { - if (PlayerChallengeId == null) - { - recvData = GetPlayerChallengeId(sw); - if (IsPlayerChallengeId) - PlayerChallengeId = recvData; - } + recvData = GetPlayerChallengeId(sw); if (IsPlayerChallengeId) + { + PlayerChallengeId = recvData; recvData = socket.GetResponse(Util.MergeByteArrays(QueryMsg.PlayerQuery, PlayerChallengeId), Type); + } } try { @@ -340,14 +338,12 @@ protected virtual ReadOnlyCollection GetRulesCore() } else { - if (RuleChallengeId == null) - { - recvData = GetRuleChallengeId(); - if (IsRuleChallengeId) - RuleChallengeId = recvData; - } + recvData = GetRuleChallengeId(); if (IsRuleChallengeId) + { + RuleChallengeId = recvData; recvData = socket.GetResponse(Util.MergeByteArrays(QueryMsg.RuleQuery, RuleChallengeId), Type); + } } try { diff --git a/ServerBrowser/Games/Toxikk.cs b/ServerBrowser/Games/Toxikk.cs index 4047d2e..a3005ca 100644 --- a/ServerBrowser/Games/Toxikk.cs +++ b/ServerBrowser/Games/Toxikk.cs @@ -380,7 +380,7 @@ private void ConnectInBackground(ServerRow server, string password, bool spectat // send the command string var msg = "open "; bool steamSockets = server.Rules == null || !string.IsNullOrEmpty(server.GetRule("SteamServerId")); - if ((useSteamIdToConnect && steamSockets || server.Rules == null || server.Players == null) && server.ServerInfo.Extra.SteamID != 0) + if ((useSteamIdToConnect && steamSockets /* || server.Rules == null || server.Players == null */) && server.ServerInfo.Extra.SteamID != 0) msg += "steam." + server.ServerInfo.Extra.SteamID; else msg += server.EndPoint.Address + ":" + server.ServerInfo.Extra.Port; diff --git a/ServerBrowser/ServerBrowserForm.cs b/ServerBrowser/ServerBrowserForm.cs index 6a3cee9..0d927fb 100644 --- a/ServerBrowser/ServerBrowserForm.cs +++ b/ServerBrowser/ServerBrowserForm.cs @@ -33,7 +33,7 @@ namespace ServerBrowser { public partial class ServerBrowserForm : XtraForm { - private const string Version = "2.67"; + private const string Version = "2.68"; private const string DevExpressVersion = "v23.2"; private const string OldSteamWebApiText = ""; private const string CustomDetailColumnPrefix = "ServerInfo."; diff --git a/changelog.md b/changelog.md index bd0af83..fa73305 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +2.68 +--- +- fixed issues with missing Rules and Players information due to bad challenge/response handling + 2.67 --- - fixed typo in "throtteling"