forked from minetest-mods/irc
Reset require
function after loading all sub-modules.
Fixes an issue with `hooks.lua` calling the (old, disabled) `require` function.
This commit is contained in:
parent
0c47e10a90
commit
18f286f4b5
5
init.lua
5
init.lua
@ -34,7 +34,6 @@ end
|
|||||||
local old_require = require
|
local old_require = require
|
||||||
require = ie.require
|
require = ie.require
|
||||||
local lib = ie.require("irc")
|
local lib = ie.require("irc")
|
||||||
require = old_require
|
|
||||||
|
|
||||||
irc = {
|
irc = {
|
||||||
version = "0.2.0",
|
version = "0.2.0",
|
||||||
@ -56,6 +55,10 @@ loadfile(modpath.."/hooks.lua")(ie)
|
|||||||
dofile(modpath.."/callback.lua")
|
dofile(modpath.."/callback.lua")
|
||||||
dofile(modpath.."/chatcmds.lua")
|
dofile(modpath.."/chatcmds.lua")
|
||||||
dofile(modpath.."/botcmds.lua")
|
dofile(modpath.."/botcmds.lua")
|
||||||
|
|
||||||
|
-- Restore old (safe) require
|
||||||
|
require = old_require
|
||||||
|
|
||||||
if irc.config.enable_player_part then
|
if irc.config.enable_player_part then
|
||||||
dofile(modpath.."/player_part.lua")
|
dofile(modpath.."/player_part.lua")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user