Skip to content

Commit

Permalink
fixed issue handling challenge/response for A2S_PLAYERS and A2S_RULES
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatH0r committed Sep 4, 2024
1 parent 25b849f commit 0a968eb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
20 changes: 8 additions & 12 deletions QueryMaster/QueryMaster/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,12 @@ protected virtual ReadOnlyCollection<Player> 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
{
Expand Down Expand Up @@ -340,14 +338,12 @@ protected virtual ReadOnlyCollection<Rule> 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
{
Expand Down
2 changes: 1 addition & 1 deletion ServerBrowser/Games/Toxikk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ServerBrowser/ServerBrowserForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<Steam Web API>";
private const string CustomDetailColumnPrefix = "ServerInfo.";
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 0a968eb

Please sign in to comment.