1
0
mirror of https://github.com/minetest-mods/irc.git synced 2024-09-27 13:50:21 +02:00

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:
Diego Martínez 2016-11-09 22:42:51 -03:00
parent 0c47e10a90
commit 18f286f4b5

View File

@ -34,7 +34,6 @@ end
local old_require = require
require = ie.require
local lib = ie.require("irc")
require = old_require
irc = {
version = "0.2.0",
@ -56,6 +55,10 @@ loadfile(modpath.."/hooks.lua")(ie)
dofile(modpath.."/callback.lua")
dofile(modpath.."/chatcmds.lua")
dofile(modpath.."/botcmds.lua")
-- Restore old (safe) require
require = old_require
if irc.config.enable_player_part then
dofile(modpath.."/player_part.lua")
else