Fixes
This commit is contained in:
parent
97f682a022
commit
3da717adb9
6 changed files with 29 additions and 16 deletions
|
|
@ -477,6 +477,10 @@ Channel.prototype.preJoin = function (user, password) {
|
|||
|
||||
user.socket.emit("rank", user.rank);
|
||||
user.emit("channelRank", user.rank);
|
||||
|
||||
if (self.permissions.seeplaylist > -1) {
|
||||
self.sendPlaylist([user]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -567,7 +571,9 @@ Channel.prototype.join = function (user) {
|
|||
});
|
||||
});
|
||||
|
||||
self.sendPlaylist([user]);
|
||||
if (self.hasPermission(user, "seeplaylist")) {
|
||||
self.sendPlaylist([user]);
|
||||
}
|
||||
self.sendMediaUpdate([user]);
|
||||
self.sendPlaylistLock([user]);
|
||||
self.sendUserlist([user]);
|
||||
|
|
@ -674,7 +680,7 @@ Channel.prototype.sendModMessage = function (msg, minrank) {
|
|||
};
|
||||
|
||||
this.users.forEach(function(u) {
|
||||
if (u.rank > minrank) {
|
||||
if (u.rank >= minrank) {
|
||||
u.socket.emit("chatMsg", notice);
|
||||
}
|
||||
});
|
||||
|
|
@ -2641,7 +2647,7 @@ Channel.prototype.handleUpdateOptions = function (user, data) {
|
|||
}
|
||||
|
||||
if ("allow_voteskip" in data) {
|
||||
this.opts.voteskip = Boolean(data.allow_voteskip);
|
||||
this.opts.allow_voteskip = Boolean(data.allow_voteskip);
|
||||
}
|
||||
|
||||
if ("voteskip_ratio" in data) {
|
||||
|
|
|
|||
|
|
@ -165,17 +165,21 @@ function preprocessConfig(cfg) {
|
|||
cfg.https.domain = cfg.https.domain.replace(/\/*$/, "");
|
||||
|
||||
// HTTP/HTTPS domains with port numbers
|
||||
var httpfa = cfg.http.domain;
|
||||
if (cfg.http.port !== 80) {
|
||||
httpfa += ":" + cfg.http.port;
|
||||
if (!cfg.http["full-address"]) {
|
||||
var httpfa = cfg.http.domain;
|
||||
if (cfg.http.port !== 80) {
|
||||
httpfa += ":" + cfg.http.port;
|
||||
}
|
||||
cfg.http["full-address"] = httpfa;
|
||||
}
|
||||
cfg.http["full-address"] = httpfa;
|
||||
|
||||
var httpsfa = cfg.https.domain;
|
||||
if (cfg.https.port !== 443) {
|
||||
httpsfa += ":" + cfg.https.port;
|
||||
if (!cfg.https["full-address"]) {
|
||||
var httpsfa = cfg.https.domain;
|
||||
if (cfg.https.port !== 443) {
|
||||
httpsfa += ":" + cfg.https.port;
|
||||
}
|
||||
cfg.https["full-address"] = httpsfa;
|
||||
}
|
||||
cfg.https["full-address"] = httpsfa;
|
||||
|
||||
// Generate RegExps for reserved names
|
||||
var reserved = cfg["reserved-names"];
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ module.exports = {
|
|||
|
||||
var replace = "(" + names.map(function () { return "?"; }).join(",") + ")";
|
||||
db.query("SELECT name,rank FROM `chan_" + chan + "_ranks` WHERE name IN " +
|
||||
replace,
|
||||
replace, names,
|
||||
function (err, rows) {
|
||||
if (err) {
|
||||
callback(err, []);
|
||||
|
|
|
|||
|
|
@ -243,6 +243,9 @@ function static(dir) {
|
|||
root: dir
|
||||
}, function (err) {
|
||||
logRequest(req);
|
||||
if (err) {
|
||||
res.send(err.status);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue