one MOTD for all mods and create a default motd.txt
This commit is contained in:
@@ -17,6 +17,8 @@ NEW:
|
||||
Added GainsUnitUpgrades trait for leveling specific unit upgrades - firepower, armor, speed.
|
||||
Added support for crates to level up specific unit upgrades.
|
||||
Added a new Launch.Replay=$FILEPATH parameter for OpenRA.Game.exe to instantly start watching a *.rep file.
|
||||
Server:
|
||||
Message of the day is now shared between all mods and a default motd.txt gets created in the user directory.
|
||||
Asset Browser:
|
||||
Filenames are now listed in alphabetical order
|
||||
Map Editor:
|
||||
|
||||
@@ -328,11 +328,14 @@ namespace OpenRA.Server
|
||||
// Send initial ping
|
||||
SendOrderTo(newConn, "Ping", Environment.TickCount.ToString());
|
||||
|
||||
var motdPath = Path.Combine(Platform.SupportDir, "motd_{0}.txt".F(ModData.Manifest.Mod.Id));
|
||||
if (File.Exists(motdPath))
|
||||
if (Settings.Dedicated)
|
||||
{
|
||||
var motd = System.IO.File.ReadAllText(motdPath);
|
||||
SendOrderTo(newConn, "Message", motd);
|
||||
var motdFile = Path.Combine(Platform.SupportDir, "motd.txt");
|
||||
if (!File.Exists(motdFile))
|
||||
System.IO.File.WriteAllText(motdFile, "Welcome, have fun and good luck!");
|
||||
var motd = System.IO.File.ReadAllText(motdFile);
|
||||
if (!string.IsNullOrEmpty(motd))
|
||||
SendOrderTo(newConn, "Message", motd);
|
||||
}
|
||||
|
||||
if (handshake.Mod == "{DEV_VERSION}")
|
||||
|
||||
Reference in New Issue
Block a user