diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 27e1ed1198..774489a4a5 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -589,6 +589,10 @@ public class NetServer implements ApplicationListener{ if(Config.showConnectMessages.bool()) Call.sendMessage("[accent]" + player.name + "[accent] has connected."); Log.info("&lm[{1}] &y{0} has connected. ", player.name, player.uuid); + if(!Config.motd.string().equalsIgnoreCase("off")){ + player.sendMessage(Config.motd.string()); + } + Events.fire(new PlayerJoin(player)); } diff --git a/core/src/mindustry/net/Administration.java b/core/src/mindustry/net/Administration.java index 8d037b99dd..9f068095d9 100644 --- a/core/src/mindustry/net/Administration.java +++ b/core/src/mindustry/net/Administration.java @@ -330,7 +330,8 @@ public class Administration{ socketInputPort("The port for socket input.", 6859, () -> Events.fire(Trigger.socketConfigChanged)), socketInputAddress("The bind address for socket input.", "localhost", () -> Events.fire(Trigger.socketConfigChanged)), allowCustomClients("Whether custom clients are allowed to connect.", !headless, "allow-custom"), - whitelist("Whether the whitelist is used.", false); + whitelist("Whether the whitelist is used.", false), + motd("The message displayed to people on connection.", "off"); public static final Config[] all = values();