Set the default game name to the player name.
This commit is contained in:
committed by
teinarss
parent
54c08748e0
commit
5bf4daddec
@@ -45,7 +45,7 @@ namespace OpenRA
|
||||
public class ServerSettings
|
||||
{
|
||||
[Desc("Sets the server name.")]
|
||||
public string Name = "OpenRA Game";
|
||||
public string Name = "";
|
||||
|
||||
[Desc("Sets the internal port.")]
|
||||
public int ListenPort = 1234;
|
||||
@@ -404,11 +404,11 @@ namespace OpenRA
|
||||
return clean;
|
||||
}
|
||||
|
||||
public static string SanitizedServerName(string dirty)
|
||||
public string SanitizedServerName(string dirty)
|
||||
{
|
||||
var clean = SanitizedName(dirty);
|
||||
if (string.IsNullOrWhiteSpace(clean))
|
||||
return new ServerSettings().Name;
|
||||
return $"{SanitizedPlayerName(Player.Name)}'s Game";
|
||||
else
|
||||
return clean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user