Advertisement
Stiepen

Untitled

Apr 5th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local function doModCallBack(callback, mode)
  2.     local modList = mod_getList()
  3.     if callback == "load" then
  4.         modList = fs.list("/boot/mod")
  5.         for k, v in pairs(modList) do
  6.             v = v:gsub(".lua$","")
  7.         end
  8.     end
  9.     for k, v in ipairs(modlist) do
  10.         local ok, err = mod_event(module, callback, "KernelBoot")
  11.         if not ok then
  12.             error("[Kernel Panic] Couldn't "..mode.." "..module..". The module crashed with the error: "..err)
  13.         else
  14.             print("Successfully "..mode.." "..module..".")
  15.         end
  16.     end
  17.     print("Done. "..#modlist.." Modules "..mode..".")
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement