1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 14:43:22 +00:00
CC-Tweaked/src/main/resources/assets/computercraft/lua/rom/programs/motd.lua
2019-12-07 10:33:47 +00:00

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