This commit is contained in:
calzoneman 2015-10-07 22:19:39 -07:00
parent 7f62e14045
commit 7d35df4f5a
2 changed files with 6 additions and 7 deletions

View file

@ -140,7 +140,7 @@ function migrate(src, dest) {
}).catch(err => {
console.error(`Failed to migrate /r/${name}: ${err.stack}`);
});
});
}, 0);
});
}

View file

@ -3,7 +3,6 @@ var bcrypt = require("bcrypt");
var $util = require("./utilities");
var Logger = require("./logger");
var Config = require("./config");
var Server = require("./server");
var tables = require("./database/tables");
var net = require("net");
var util = require("./utilities");
@ -556,11 +555,6 @@ module.exports.listStats = function (callback) {
/* Misc */
module.exports.loadAnnouncement = function () {
// Temporary workaround
if (!Server.getServer || !Server.getServer()) {
return;
}
var query = "SELECT * FROM `meta` WHERE `key`='announcement'";
module.exports.query(query, function (err, rows) {
if (err) {
@ -581,6 +575,11 @@ module.exports.loadAnnouncement = function () {
return;
}
var Server = require("./server");
if (!Server.getServer || !Server.getServer()) {
return;
}
var sv = Server.getServer();
sv.announcement = announcement;
for (var id in sv.ioServers) {