diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/connlisteners.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua index 2b95331c..a02dd2a6 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -1,4 +1,5 @@ +local listeners_dir = (CFG_SOURCEDIR or ".").."/net/"; local server_add = require "net.server".add; local log = require "util.logger".init("connlisteners"); @@ -26,7 +27,7 @@ end function get(name) local h = listeners[name]; if not h then - pcall(dofile, "net/"..name:gsub("[^%w%-]", "_").."_listener.lua"); + pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua"); h = listeners[name]; end return h; @@ -42,4 +43,4 @@ function start(name, udata) (udata and udata.interface) or "*", (udata and udata.mode) or h.default_mode or 1, (udata and udata.ssl) or nil ); end -return _M;
\ No newline at end of file +return _M; |