Add show_statusline_on_connect setting (#5084)

Add show_statusline_on_connect setting
This commit is contained in:
Loïc Blot 2017-01-21 19:30:42 +01:00 committed by GitHub
parent bc29e03b59
commit 6d5a407133
4 changed files with 10 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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