Skip to content

Commit

Permalink
Add show_statusline_on_connect setting (#5084)
Browse files Browse the repository at this point in the history
Add show_statusline_on_connect setting
  • Loading branch information
nerzhul committed Jan 21, 2017
1 parent bc29e03 commit 6d5a407
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions builtin/settingtypes.txt
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion minetest.conf.example
Expand Up @@ -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
Expand Down Expand Up @@ -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 = ""

Expand Down
1 change: 1 addition & 0 deletions src/defaultsettings.cpp
Expand Up @@ -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", "");
Expand Down
2 changes: 1 addition & 1 deletion src/server.cpp
Expand Up @@ -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());
}
Expand Down

0 comments on commit 6d5a407

Please sign in to comment.