From 25d7f6e33967e5e6554d57a0622a2c16e16fa73f Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 24 Jan 2015 18:58:13 +0100 Subject: [PATCH] Fixed global variables in irc mod --- mods/irc/init.lua | 2 +- mods/irc/irc/main.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/irc/init.lua b/mods/irc/init.lua index 0b5102c4..c93bcf9f 100755 --- a/mods/irc/init.lua +++ b/mods/irc/init.lua @@ -13,7 +13,7 @@ package.path = -- The build of Lua that Minetest comes with only looks for libraries under -- /usr/local/share and /usr/local/lib but LuaSocket is often installed under -- /usr/share and /usr/lib. -if not jit and package.config:sub(1, 1) == "/" then +if not rawget(_G,"jit") and package.config:sub(1, 1) == "/" then package.path = package.path.. ";/usr/share/lua/5.1/?.lua".. ";/usr/share/lua/5.1/?/init.lua" diff --git a/mods/irc/irc/main.lua b/mods/irc/irc/main.lua index c3a7c8f6..ece0cf2c 100755 --- a/mods/irc/irc/main.lua +++ b/mods/irc/irc/main.lua @@ -185,7 +185,7 @@ function meta:think() self.lastThought = socket.gettime() end -local handlers = handlers +local handlers = rawget(_G,"handlers") function meta:handle(msg) local handler = irc.handlers[msg.command]