load_plugins ouside

This commit is contained in:
yago 2014-12-22 22:05:46 +01:00
parent 3b67918a3e
commit 6bc4829788

View File

@ -165,22 +165,11 @@ end
function on_binlog_replay_end ()
started = 1
load_plugins()
-- Uncomment the line to enable cron plugins.
-- postpone (cron_plugins, false, 1.0)
-- See plugins/ping.lua as an example for cron
end
-- Start and load values
our_id = 0
now = os.time()
config = load_config()
_users = load_user_stats()
-- load plugins
plugins = {}
-- load all plugins in the plugins/ directory
function load_plugins()
for k, v in pairs(scandir("plugins")) do
@ -205,4 +194,15 @@ function cron_plugins()
-- Called again in 5 mins
postpone (cron_plugins, false, 5*60.0)
end
end
-- Start and load values
our_id = 0
now = os.time()
config = load_config()
_users = load_user_stats()
-- load plugins
plugins = {}
load_plugins()