mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-06-25 14:43:22 +00:00
16 lines
312 B
Lua
16 lines
312 B
Lua
local tMotd = {}
|
|
|
|
for sPath in string.gmatch(settings.get( "motd.path" ), "[^:]+") do
|
|
if fs.exists(sPath) then
|
|
for sLine in io.lines(sPath) do
|
|
table.insert(tMotd, sLine)
|
|
end
|
|
end
|
|
end
|
|
|
|
if #tMotd == 0 then
|
|
print("missingno")
|
|
else
|
|
print(tMotd[math.random(1, #tMotd)])
|
|
end
|