Software /
code /
prosody
Comparison
main.lua @ 49:1cd2a8db392d
New "import" module to help tidy up all the local declarations at the top of modules
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 04 Oct 2008 02:43:23 +0100 |
parent | 38:3fdfd6e0cb4e |
child | 53:14ea0fe6ca86 |
comparison
equal
deleted
inserted
replaced
48:d0505310aec5 | 49:1cd2a8db392d |
---|---|
11 | 11 |
12 dofile "lxmppd.cfg" | 12 dofile "lxmppd.cfg" |
13 | 13 |
14 sessions = {}; | 14 sessions = {}; |
15 | 15 |
16 require "util.import" | |
16 require "core.stanza_dispatch" | 17 require "core.stanza_dispatch" |
17 require "core.xmlhandlers" | 18 require "core.xmlhandlers" |
18 require "core.rostermanager" | 19 require "core.rostermanager" |
19 require "core.offlinemessage" | 20 require "core.offlinemessage" |
20 require "core.modulemanager" | 21 require "core.modulemanager" |
22 require "core.sessionmanager" | 23 require "core.sessionmanager" |
23 require "core.stanza_router" | 24 require "core.stanza_router" |
24 require "net.connhandlers" | 25 require "net.connhandlers" |
25 require "util.stanza" | 26 require "util.stanza" |
26 require "util.jid" | 27 require "util.jid" |
28 | |
27 | 29 |
28 -- Locals for faster access -- | 30 -- Locals for faster access -- |
29 local t_insert = table.insert; | 31 local t_insert = table.insert; |
30 local t_concat = table.concat; | 32 local t_concat = table.concat; |
31 local t_concatall = function (t, sep) local tt = {}; for _, s in ipairs(t) do t_insert(tt, tostring(s)); end return t_concat(tt, sep); end | 33 local t_concatall = function (t, sep) local tt = {}; for _, s in ipairs(t) do t_insert(tt, tostring(s)); end return t_concat(tt, sep); end |