aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-10-04 02:43:23 +0100
committerMatthew Wild <mwild1@gmail.com>2008-10-04 02:43:23 +0100
commit0f8ba47525595a9432b4060204d943cfb26bdc61 (patch)
treeac50f175795c1206b9eac2fcb2d296e6bc0196b8 /core
parent459665b3680dde4ab4ef65d067139d7d132d96ff (diff)
downloadprosody-0f8ba47525595a9432b4060204d943cfb26bdc61.tar.gz
prosody-0f8ba47525595a9432b4060204d943cfb26bdc61.zip
New "import" module to help tidy up all the local declarations at the top of modules
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index f2542ed2..b257e532 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -1,11 +1,9 @@
local tonumber, tostring = tonumber, tostring;
-local ipairs = ipairs;
+local ipairs, print= ipairs, print;
-local m_random = math.random;
-local format = string.format;
-
-local print = print;
+local m_random = import("math", "random");
+local format = import("string", "format");
local hosts = hosts;
@@ -79,7 +77,7 @@ function streamopened(session, attr)
end
send("</stream:features>");
- log("info", "core", "Stream opened successfully");
+ log("info", "Stream opened successfully");
session.notopen = nil;
end