39 ------------------------------------------------------------------------ |
39 ------------------------------------------------------------------------ |
40 |
40 |
41 -- Initialise modules |
41 -- Initialise modules |
42 if config.modules and #config.modules > 0 then |
42 if config.modules and #config.modules > 0 then |
43 for _, module in pairs(config.modules) do |
43 for _, module in pairs(config.modules) do |
44 if not modulemanager.load(module) then |
44 modulemanager.load(module); |
45 error("Unable to load module "..module); |
|
46 end |
|
47 end |
45 end |
48 else error("No modules enabled in the configuration file"); end |
46 else error("No modules enabled in the configuration file"); end |
49 |
47 |
50 -- setup error handling |
48 -- setup error handling |
51 setmetatable(_G, { __index = function (t, k) print("WARNING: ATTEMPT TO READ A NIL GLOBAL!!!", k); error("Attempt to read a non-existent global. Naughty boy.", 2); end, __newindex = function (t, k, v) print("ATTEMPT TO SET A GLOBAL!!!!", tostring(k).." = "..tostring(v)); error("Attempt to set a global. Naughty boy.", 2); end }) --]][][[]][]; |
49 setmetatable(_G, { __index = function (t, k) print("WARNING: ATTEMPT TO READ A NIL GLOBAL!!!", k); error("Attempt to read a non-existent global. Naughty boy.", 2); end, __newindex = function (t, k, v) print("ATTEMPT TO SET A GLOBAL!!!!", tostring(k).." = "..tostring(v)); error("Attempt to set a global. Naughty boy.", 2); end }) --]][][[]][]; |