-- ********************************************************************** -- * Functions management -- * -- * version 0.1 -- * -- * (c) 2005 Hi-Project Ltd. -- ********************************************************************** LoggedIn = false module "LUNAFUNC" function dummyfunc(p) return nil end Public_Engine_Functions = { { name="Dummy", call=dummytest, active=false, needlogin=false } } -- Finds function and returns function descriptor (table) or nil * function findfunc(fn) local ff = nil table.foreach(Public_Engine_Functions, function(t) table.foreach(Public_Engine_Functions[t], function(k,v) if k=="name" and v==fn then ff = Public_Engine_Functions[t] end end) end) return ff end function addfunc(func) table.insert(Public_Engine_Functions, func) end