Fixes
This commit is contained in:
parent
7f62e14045
commit
7d35df4f5a
|
@ -140,7 +140,7 @@ function migrate(src, dest) {
|
|||
}).catch(err => {
|
||||
console.error(`Failed to migrate /r/${name}: ${err.stack}`);
|
||||
});
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue