Skip to content

Commit

Permalink
Set the "connecting to: xyz" message on early engine load
Browse files Browse the repository at this point in the history
Right now it says the IP:port of the server, like

> Connecting to: [12.34.56.78]:12345

This looks scary, apparently some streamers think it's their own IP that just got broadcast public. The patch changes it to room title, like

> Connecting to: Teams All Welcome

It only works on fresh engines but should be harmless otherwise. See beyond-all-reason/spring#1282
  • Loading branch information
sprunk authored Feb 17, 2024
1 parent 9242fbe commit 6bd136d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Shared/LobbyClient/ScriptGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public static string GenerateHostScript(SpringBattleContext context, int loopbac
// send desync to server
script.AppendFormat(" DumpGameStateOnDesync=1;\n");

// set the "connecting to: xyz" message during early engine load
script.AppendFormat(" ShowServerName={0};\n", context.LobbyStartContext.Title.Replace(';', ' '));

if (loopbackListenPort >0) script.AppendFormat(" AutohostPort={0};\n", loopbackListenPort);
script.AppendLine();
script.AppendFormat(" HostIP={0};\n", context.IpAddress);
Expand Down

0 comments on commit 6bd136d

Please sign in to comment.