This commit is contained in:
calzoneman 2014-02-28 00:09:20 -06:00
parent 97f682a022
commit 3da717adb9
6 changed files with 29 additions and 16 deletions

View File

@ -477,6 +477,10 @@ Channel.prototype.preJoin = function (user, password) {
user.socket.emit("rank", user.rank); user.socket.emit("rank", user.rank);
user.emit("channelRank", user.rank); user.emit("channelRank", user.rank);
if (self.permissions.seeplaylist > -1) {
self.sendPlaylist([user]);
}
}); });
}); });
@ -567,7 +571,9 @@ Channel.prototype.join = function (user) {
}); });
}); });
if (self.hasPermission(user, "seeplaylist")) {
self.sendPlaylist([user]); self.sendPlaylist([user]);
}
self.sendMediaUpdate([user]); self.sendMediaUpdate([user]);
self.sendPlaylistLock([user]); self.sendPlaylistLock([user]);
self.sendUserlist([user]); self.sendUserlist([user]);
@ -674,7 +680,7 @@ Channel.prototype.sendModMessage = function (msg, minrank) {
}; };
this.users.forEach(function(u) { this.users.forEach(function(u) {
if (u.rank > minrank) { if (u.rank >= minrank) {
u.socket.emit("chatMsg", notice); u.socket.emit("chatMsg", notice);
} }
}); });
@ -2641,7 +2647,7 @@ Channel.prototype.handleUpdateOptions = function (user, data) {
} }
if ("allow_voteskip" in 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) { if ("voteskip_ratio" in data) {

View File

@ -165,17 +165,21 @@ function preprocessConfig(cfg) {
cfg.https.domain = cfg.https.domain.replace(/\/*$/, ""); cfg.https.domain = cfg.https.domain.replace(/\/*$/, "");
// HTTP/HTTPS domains with port numbers // HTTP/HTTPS domains with port numbers
if (!cfg.http["full-address"]) {
var httpfa = cfg.http.domain; var httpfa = cfg.http.domain;
if (cfg.http.port !== 80) { if (cfg.http.port !== 80) {
httpfa += ":" + cfg.http.port; httpfa += ":" + cfg.http.port;
} }
cfg.http["full-address"] = httpfa; cfg.http["full-address"] = httpfa;
}
if (!cfg.https["full-address"]) {
var httpsfa = cfg.https.domain; var httpsfa = cfg.https.domain;
if (cfg.https.port !== 443) { if (cfg.https.port !== 443) {
httpsfa += ":" + cfg.https.port; httpsfa += ":" + cfg.https.port;
} }
cfg.https["full-address"] = httpsfa; cfg.https["full-address"] = httpsfa;
}
// Generate RegExps for reserved names // Generate RegExps for reserved names
var reserved = cfg["reserved-names"]; var reserved = cfg["reserved-names"];

View File

@ -343,7 +343,7 @@ module.exports = {
var replace = "(" + names.map(function () { return "?"; }).join(",") + ")"; var replace = "(" + names.map(function () { return "?"; }).join(",") + ")";
db.query("SELECT name,rank FROM `chan_" + chan + "_ranks` WHERE name IN " + db.query("SELECT name,rank FROM `chan_" + chan + "_ranks` WHERE name IN " +
replace, replace, names,
function (err, rows) { function (err, rows) {
if (err) { if (err) {
callback(err, []); callback(err, []);

View File

@ -243,6 +243,9 @@ function static(dir) {
root: dir root: dir
}, function (err) { }, function (err) {
logRequest(req); logRequest(req);
if (err) {
res.send(err.status);
}
}); });
}; };
} }

View File

@ -358,8 +358,9 @@ li.ui-sortable-helper, li.ui-sortable-placeholder + li.queue_entry {
position: fixed; position: fixed;
border: 1px solid #aaaaaa; border: 1px solid #aaaaaa;
border-radius: 5px; border-radius: 5px;
max-width: 200px;
padding: 5px; padding: 5px;
max-width: 200px;
max-height: 300px;
} }
.user-dropdown { .user-dropdown {

View File

@ -112,9 +112,9 @@ function chatTabComplete() {
var __slice = Array.prototype.slice; var __slice = Array.prototype.slice;
var users = __slice.call($("#userlist").children()).map(function (elem) { var users = __slice.call($("#userlist").children()).map(function (elem) {
return elem.children[1].innerHTML; return elem.children[1].innerHTML.toLowerCase();
}).filter(function (name) { }).filter(function (name) {
return name.toLowerCase().indexOf(current) === 0; return name.indexOf(current) === 0;
}); });
// users now contains a list of names that start with current word // users now contains a list of names that start with current word
@ -580,7 +580,6 @@ $("#cs-chatfilters-newsubmit").click(function () {
return; return;
} }
console.log(name, regex, flags, replace);
socket.emit("updateFilter", { socket.emit("updateFilter", {
name: name, name: name,
source: regex, source: regex,