From 6bc482978840243f93ff2b0a9d843e449fb4b7bc Mon Sep 17 00:00:00 2001 From: yago Date: Mon, 22 Dec 2014 22:05:46 +0100 Subject: [PATCH] load_plugins ouside --- bot/bot.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bot/bot.lua b/bot/bot.lua index 1cfad5d..7495c30 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -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 \ No newline at end of file +end + +-- Start and load values +our_id = 0 +now = os.time() + +config = load_config() +_users = load_user_stats() + +-- load plugins +plugins = {} +load_plugins() \ No newline at end of file