MUC: Fixed an undefined global access.
[prosody.git] / tools / ejabberd2prosody.lua
index 4fef3f3abbf434e4eac798d8ee6650cb6f7202b1..c18056c127a4dd2e920633c1f883604df36f16e7 100755 (executable)
@@ -9,9 +9,14 @@
 
 
 
+package.path = package.path ..";../?.lua";
+
+if arg[0]:match("^./") then
+       package.path = package.path .. ";"..arg[0]:gsub("/ejabberd2prosody.lua$", "/?.lua");
+end
+
 require "erlparse";
 
-package.path = package.path ..";../?.lua";
 local serialize = require "util.serialization".serialize;
 local st = require "util.stanza";
 package.loaded["util.logger"] = {init = function() return function() end; end}