Diff

core/sessionmanager.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 44:80d2ade0fd69
child 53:14ea0fe6ca86
line wrap: on
line diff
--- a/core/sessionmanager.lua	Sat Oct 04 02:42:23 2008 +0100
+++ b/core/sessionmanager.lua	Sat Oct 04 02:43:23 2008 +0100
@@ -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 @@
 						end
  
         			                send("</stream:features>");
-						log("info", "core", "Stream opened successfully");
+						log("info", "Stream opened successfully");
 						session.notopen = nil;
 end