Fixed error in MOTD generator when admins section is specified with a group that does not exist or has no users in it.

This commit is contained in:
SticklyMan 2016-02-14 04:30:38 -07:00
parent 5e4341a8d2
commit 3ccd4de8be
2 changed files with 5 additions and 3 deletions

View File

@ -255,8 +255,10 @@ function ulx.generateMotdHTML()
local users = {}
for g=1, #data.contents do
local group = data.contents[g]
for u=1, #ulx.motdSettings.admins[group] do
table.insert( users, ulx.motdSettings.admins[group][u] )
if ulx.motdSettings.admins[group] then
for u=1, #ulx.motdSettings.admins[group] do
table.insert( users, ulx.motdSettings.admins[group][u] )
end
end
end
table.sort( users )

View File

@ -1 +1 @@
1455406530
1455449438