Fix broken server status line in 5.5+

master
Aaron Suen 2022-02-18 00:12:43 -05:00
parent 159ede89d4
commit 9664255b3e
1 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ minetest.after(0, function()
end)
local function stripstatus(msg, ...)
local pref, clients, suff = string_match(msg, "^(.*)clients={([^}]*)}(.*)$")
local pref, clients, suff = string_match(msg, "^(.*clients[^%w_]+)([^}]*)(.*)$")
if not clients then return msg, ... end
local clist = {}
for pname in string_gmatch(clients, "%S+") do
@ -116,7 +116,7 @@ local function stripstatus(msg, ...)
clist[#clist + 1] = pname
end
end
msg = pref .. "clients={" .. table_concat(clist, ", ") .. "}" .. suff
msg = pref .. table_concat(clist, ", ") .. suff
return msg, ...
end
local oldstatus = minetest.get_server_status