summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_simple_main.lua
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-02-17 01:37:14 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-02-18 16:09:59 +0100
commit5a0ed780f56a5225b3d7c5f64099586e390e5f39 (patch)
tree8d027371f69fab8b3b3893841b3663d2a0411d22 /builtin/mainmenu/tab_simple_main.lua
parent8941ea0cc9ae899c8e43743c7a4efc7e9db9c489 (diff)
downloadminetest-5a0ed780f56a5225b3d7c5f64099586e390e5f39.tar.gz
minetest-5a0ed780f56a5225b3d7c5f64099586e390e5f39.tar.bz2
minetest-5a0ed780f56a5225b3d7c5f64099586e390e5f39.zip
Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements. Server announces its supported protocol versions to master server
Diffstat (limited to 'builtin/mainmenu/tab_simple_main.lua')
-rw-r--r--builtin/mainmenu/tab_simple_main.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/mainmenu/tab_simple_main.lua b/builtin/mainmenu/tab_simple_main.lua
index 87bd551c0..b9a6b650f 100644
--- a/builtin/mainmenu/tab_simple_main.lua
+++ b/builtin/mainmenu/tab_simple_main.lua
@@ -45,6 +45,7 @@ local function get_formspec(tabview, name, tabdata)
image_column(fgettext("Creative mode"), "creative") .. ",padding=1;" ..
image_column(fgettext("Damage enabled"), "damage") .. ",padding=0.25;" ..
image_column(fgettext("PvP enabled"), "pvp") .. ",padding=0.25;" ..
+ "color,span=1;" ..
"text,padding=1]" -- name
else
retval = retval .. "tablecolumns[text]"
@@ -87,7 +88,6 @@ local function get_formspec(tabview, name, tabdata)
end
--------------------------------------------------------------------------------
-
local function main_button_handler(tabview, fields, name, tabdata)
if fields["btn_start_singleplayer"] then
@@ -159,6 +159,11 @@ local function main_button_handler(tabview, fields, name, tabdata)
gamedata.servername = menudata.favorites[fav_idx].name
gamedata.serverdescription = menudata.favorites[fav_idx].description
+
+ if not is_server_protocol_compat_or_error(menudata.favorites[fav_idx].proto_min,
+ menudata.favorites[fav_idx].proto_max) then
+ return true
+ end
else
gamedata.servername = ""
gamedata.serverdescription = ""