Disable Auto-reconnection when Kicked
This commit is contained in:
parent
b9bdab016f
commit
bcc87c0e30
@ -65,8 +65,8 @@ local function wordwrap_quickhack(str)
|
|||||||
if res ~= "" then
|
if res ~= "" then
|
||||||
res = res .. ","
|
res = res .. ","
|
||||||
end
|
end
|
||||||
res = res .. core.formspec_escape(string.sub(text, 1, 79))
|
res = res .. core.formspec_escape(text:sub(1, 79))
|
||||||
text = string.sub(text, 80, #text)
|
text = text:sub(80, #text)
|
||||||
end
|
end
|
||||||
if res ~= "" then
|
if res ~= "" then
|
||||||
res = res .. ","
|
res = res .. ","
|
||||||
@ -84,8 +84,8 @@ function ui.update()
|
|||||||
-- attempt auto restart
|
-- attempt auto restart
|
||||||
if gamedata ~= nil and gamedata.errormessage ~= nil and
|
if gamedata ~= nil and gamedata.errormessage ~= nil and
|
||||||
core.settings:get_bool("auto_connect") == true and
|
core.settings:get_bool("auto_connect") == true and
|
||||||
tonumber(core.settings:get("connect_time")) < os.time() - 30 --[[and
|
tonumber(core.settings:get("connect_time")) < os.time() - 30 and
|
||||||
not string.find(gamedata.errormessage, "Access denied")]] then
|
not gamedata.errormessage:find("Kicked") then
|
||||||
if core.settings:get("maintab_LAST") == "local" then
|
if core.settings:get("maintab_LAST") == "local" then
|
||||||
gamedata.singleplayer = true
|
gamedata.singleplayer = true
|
||||||
gamedata.selected_world =
|
gamedata.selected_world =
|
||||||
@ -110,7 +110,7 @@ function ui.update()
|
|||||||
elseif gamedata ~= nil and gamedata.errormessage ~= nil then
|
elseif gamedata ~= nil and gamedata.errormessage ~= nil then
|
||||||
formspec = wordwrap_quickhack(gamedata.errormessage)
|
formspec = wordwrap_quickhack(gamedata.errormessage)
|
||||||
local error_title
|
local error_title
|
||||||
if string.find(gamedata.errormessage, "ModError") then
|
if gamedata.errormessage:find("ModError") then
|
||||||
error_title = fgettext("An error occured in a Lua script, such as a mod:")
|
error_title = fgettext("An error occured in a Lua script, such as a mod:")
|
||||||
else
|
else
|
||||||
error_title = fgettext("An error occured:")
|
error_title = fgettext("An error occured:")
|
||||||
|
@ -108,7 +108,7 @@ core.register_chatcommand("privs", {
|
|||||||
local name = (param ~= "" and param or caller)
|
local name = (param ~= "" and param or caller)
|
||||||
return true, "Privileges of " .. name .. ": "
|
return true, "Privileges of " .. name .. ": "
|
||||||
.. core.privs_to_string(
|
.. core.privs_to_string(
|
||||||
core.get_player_privs(name), ' ')
|
core.get_player_privs(name), ", ")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user