Software /
code /
prosody
Comparison
net/connlisteners.lua @ 467:66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 03:27:50 +0000 |
parent | 380:2b22b8eee939 |
child | 471:727d7bd97cd2 |
comparison
equal
deleted
inserted
replaced
466:0ecfd89c2cc0 | 467:66f145f5c932 |
---|---|
1 | 1 |
2 local listeners_dir = (CFG_SOURCEDIR or "").."/net/"; | |
2 local server_add = require "net.server".add; | 3 local server_add = require "net.server".add; |
3 local log = require "util.logger".init("connlisteners"); | 4 local log = require "util.logger".init("connlisteners"); |
4 | 5 |
5 local dofile, pcall, error = | 6 local dofile, pcall, error = |
6 dofile, pcall, error | 7 dofile, pcall, error |
24 end | 25 end |
25 | 26 |
26 function get(name) | 27 function get(name) |
27 local h = listeners[name]; | 28 local h = listeners[name]; |
28 if not h then | 29 if not h then |
29 pcall(dofile, "net/"..name:gsub("[^%w%-]", "_").."_listener.lua"); | 30 pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua"); |
30 h = listeners[name]; | 31 h = listeners[name]; |
31 end | 32 end |
32 return h; | 33 return h; |
33 end | 34 end |
34 | 35 |