aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/settingtypes.txt3
-rw-r--r--minetest.conf.example6
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/server.cpp2
4 files changed, 10 insertions, 2 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 2dfe86e04..0f416bc9a 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -703,6 +703,9 @@ map-dir (Map directory) path
# Setting it to -1 disables the feature.
item_entity_ttl (Item entity TTL) int 900
+# If enabled, show the server status message on player connection.
+show_statusline_on_connect (Status message on connection) bool true
+
# Enable players getting damage and dying.
enable_damage (Damage) bool false
diff --git a/minetest.conf.example b/minetest.conf.example
index 3b686aa61..515b6cfd4 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -841,6 +841,10 @@
# type: int
# item_entity_ttl = 900
+# If enabled, show the server status message on player connection.
+# type: bool
+# show_statusline_on_connect = true
+
# Enable players getting damage and dying.
# type: bool
# enable_damage = false
@@ -1558,7 +1562,7 @@
# profiler.default_report_format = txt
# The file path relative to your worldpath in which profiles will be saved to.
-#
+#
# type: string
# profiler.report_path = ""
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 59cfdd50d..e154a63c8 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -255,6 +255,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("motd", "");
settings->setDefault("max_users", "15");
settings->setDefault("creative_mode", "false");
+ settings->setDefault("show_statusline_on_connect", "true");
settings->setDefault("enable_damage", "true");
settings->setDefault("give_initial_stuff", "false");
settings->setDefault("default_password", "");
diff --git a/src/server.cpp b/src/server.cpp
index 1656b9f5a..7e1ab30ac 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -1118,7 +1118,7 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id)
SendDeathscreen(peer_id, false, v3f(0,0,0));
// Note things in chat if not in simple singleplayer mode
- if(!m_simple_singleplayer_mode) {
+ if (!m_simple_singleplayer_mode && g_settings->getBool("show_statusline_on_connect")) {
// Send information about server to player in chat
SendChatMessage(peer_id, getStatusString());
}