From 5dc97672385001991e86b3bfe8d43e8fbaddc961 Mon Sep 17 00:00:00 2001 From: Virx Date: Tue, 10 Feb 2026 22:58:39 -0500 Subject: [PATCH] Trim agent ids --- RLBotCS/ManagerTools/ConfigValidator.cs | 2 ++ RLBotCS/Server/FlatBuffersSession.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RLBotCS/ManagerTools/ConfigValidator.cs b/RLBotCS/ManagerTools/ConfigValidator.cs index e0f9a20..147bbdf 100644 --- a/RLBotCS/ManagerTools/ConfigValidator.cs +++ b/RLBotCS/ManagerTools/ConfigValidator.cs @@ -87,6 +87,7 @@ bool surpressWarnings { case CustomBotT bot: bot.AgentId ??= ""; + bot.AgentId = bot.AgentId.Trim(); if (bot.AgentId == "") { Logger.LogError( @@ -225,6 +226,7 @@ private static bool ValidateScripts( var script = scripts[i]; script.AgentId ??= ""; + script.AgentId = script.AgentId.Trim(); if (script.AgentId == "") { Logger.LogError( diff --git a/RLBotCS/Server/FlatBuffersSession.cs b/RLBotCS/Server/FlatBuffersSession.cs index 15fdc49..e7a7697 100644 --- a/RLBotCS/Server/FlatBuffersSession.cs +++ b/RLBotCS/Server/FlatBuffersSession.cs @@ -126,7 +126,7 @@ private async Task ParseClientMessage(InterfacePacket msg) case InterfaceMessage.ConnectionSettings when !_connectionEstablished: var readyMsg = msg.MessageAsConnectionSettings(); - _agentId = readyMsg.AgentId ?? ""; + _agentId = (readyMsg.AgentId ?? "").Trim(); _wantsBallPredictions = readyMsg.WantsBallPredictions; _wantsComms = readyMsg.WantsComms; _closeBetweenMatches = readyMsg.CloseBetweenMatches;