Skip to content
Permalink
Browse files

Add show_statusline_on_connect setting (#5084)

Add show_statusline_on_connect setting
  • Loading branch information...
nerzhul committed Jan 21, 2017
1 parent bc29e03 commit 6d5a40713347424084af8ba04e76278961506881
Showing with 10 additions and 2 deletions.
  1. +3 −0 builtin/settingtypes.txt
  2. +5 −1 minetest.conf.example
  3. +1 −0 src/defaultsettings.cpp
  4. +1 −1 src/server.cpp
@@ -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

@@ -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 = ""

@@ -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", "");
@@ -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());
}

0 comments on commit 6d5a407

Please sign in to comment.
You can’t perform that action at this time.