Fix crash when no moderators online

This commit is contained in:
bri cassa 2021-08-11 21:54:30 +02:00
parent 8b2ff073ea
commit e7f0275a88

View File

@ -87,7 +87,7 @@ minetest.register_chatcommand("report", {
end end
return true, S("Reported. Online moderator(s): @1", mod_list) return true, S("Reported. Online moderator(s): @1", mod_list)
else else
email.send_mail(name, admin, S("Report: (no online moderator)", param)) email.send_mail(name, admin, S("Report: @1 (no online moderator)", param))
for _, modo in ipairs(get_modo_list()) do for _, modo in ipairs(get_modo_list()) do
if modo ~= admin then if modo ~= admin then
email.send_mail(name, modo, S("Report: @1 (no online moderator)", param)) email.send_mail(name, modo, S("Report: @1 (no online moderator)", param))