diff --git a/lib/bgtask.js b/lib/bgtask.js index 509fbd0f..8cd1dc02 100644 --- a/lib/bgtask.js +++ b/lib/bgtask.js @@ -25,8 +25,8 @@ var init = null; /* Stats */ function initStats(Server) { - var STAT_INTERVAL = Config.get("stats.interval"); - var STAT_EXPIRE = Config.get("stats.max-age"); + var STAT_INTERVAL = parseInt(Config.get("stats.interval")); + var STAT_EXPIRE = parseInt(Config.get("stats.max-age")); setInterval(function () { var chancount = Server.channels.length; @@ -45,8 +45,8 @@ function initStats(Server) { /* Alias cleanup */ function initAliasCleanup(Server) { - var CLEAN_INTERVAL = Config.get("aliases.purge-interval"); - var CLEAN_EXPIRE = Config.get("aliases.max-age"); + var CLEAN_INTERVAL = parseInt(Config.get("aliases.purge-interval")); + var CLEAN_EXPIRE = parseInt(Config.get("aliases.max-age")); setInterval(function () { db.cleanOldAliases(CLEAN_EXPIRE, function (err) { @@ -81,7 +81,8 @@ function initIpThrottleCleanup(Server) { } function initChannelDumper(Server) { - var CHANNEL_SAVE_INTERVAL = Config.get("channel-save-interval") * 60000; + var CHANNEL_SAVE_INTERVAL = parseInt(Config.get("channel-save-interval")) + * 60000; setInterval(function () { for (var i = 0; i < Server.channels.length; i++) { var chan = Server.channels[i];