1
0

remove stupid advertise about older servers

This commit is contained in:
mckaygerhard 2024-06-02 21:16:09 -04:00
parent c8c06eaae5
commit c94e9cdb9a

View File

@ -382,21 +382,16 @@ local function main_button_handler(tabview, fields, name, tabdata)
if fav_idx and fav_idx <= #serverlist and if fav_idx and fav_idx <= #serverlist and
fav.address == gamedata.address and fav.address == gamedata.address and
fav.port == gamedata.port then fav.port == gamedata.port then
if not is_server_protocol_compat_or_error(
fav.proto_min, fav.proto_max) then
return true
elseif fav.proto_max and fav.proto_max < 37 and not is_favorite(fav) then
local dlg = create_outdated_server_dlg(fav)
dlg:set_parent(tabview)
tabview:hide()
dlg:show()
return true
end
serverlistmgr.add_favorite(fav) serverlistmgr.add_favorite(fav)
gamedata.servername = fav.name gamedata.servername = fav.name
gamedata.serverdescription = fav.description gamedata.serverdescription = fav.description
if not is_server_protocol_compat_or_error(
fav.proto_min, fav.proto_max) then
return true
end
else else
gamedata.servername = "" gamedata.servername = ""
gamedata.serverdescription = "" gamedata.serverdescription = ""