mirror of
https://github.com/minetest-mods/irc.git
synced 2024-11-05 17:50:20 +01:00
Silence warnings about module
in ltn12
.
This commit is contained in:
parent
12248cc847
commit
3e2d98f9ef
8
init.lua
8
init.lua
|
@ -33,6 +33,11 @@ end
|
|||
-- Temporarily set require so that LuaIRC can access it
|
||||
local old_require = require
|
||||
require = ie.require
|
||||
|
||||
-- Silence warnings about `module` in `ltn12`.
|
||||
local old_module = rawget(_G, "module")
|
||||
rawset(_G, "module", ie.module)
|
||||
|
||||
local lib = ie.require("irc")
|
||||
|
||||
irc = {
|
||||
|
@ -56,8 +61,9 @@ dofile(modpath.."/callback.lua")
|
|||
dofile(modpath.."/chatcmds.lua")
|
||||
dofile(modpath.."/botcmds.lua")
|
||||
|
||||
-- Restore old (safe) require
|
||||
-- Restore old (safe) functions
|
||||
require = old_require
|
||||
rawset(_G, "module", old_module)
|
||||
|
||||
if irc.config.enable_player_part then
|
||||
dofile(modpath.."/player_part.lua")
|
||||
|
|
Loading…
Reference in New Issue
Block a user