diff --git a/lib/channel.js b/lib/channel.js index 9337c062..132ce809 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -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) { diff --git a/lib/config.js b/lib/config.js index 21e5ebfb..b4207eed 100644 --- a/lib/config.js +++ b/lib/config.js @@ -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"]; diff --git a/lib/database/channels.js b/lib/database/channels.js index 98868e7e..282c8953 100644 --- a/lib/database/channels.js +++ b/lib/database/channels.js @@ -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, []); diff --git a/lib/web/webserver.js b/lib/web/webserver.js index 79ac44ae..26ae10f8 100644 --- a/lib/web/webserver.js +++ b/lib/web/webserver.js @@ -243,6 +243,9 @@ function static(dir) { root: dir }, function (err) { logRequest(req); + if (err) { + res.send(err.status); + } }); }; } diff --git a/www/css/cytube.css b/www/css/cytube.css index 9f7e733a..b816a849 100644 --- a/www/css/cytube.css +++ b/www/css/cytube.css @@ -358,8 +358,9 @@ li.ui-sortable-helper, li.ui-sortable-placeholder + li.queue_entry { position: fixed; border: 1px solid #aaaaaa; border-radius: 5px; - max-width: 200px; padding: 5px; + max-width: 200px; + max-height: 300px; } .user-dropdown { diff --git a/www/js/ui.js b/www/js/ui.js index 62106423..0f7c17dd 100644 --- a/www/js/ui.js +++ b/www/js/ui.js @@ -112,9 +112,9 @@ function chatTabComplete() { var __slice = Array.prototype.slice; var users = __slice.call($("#userlist").children()).map(function (elem) { - return elem.children[1].innerHTML; + return elem.children[1].innerHTML.toLowerCase(); }).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 @@ -580,7 +580,6 @@ $("#cs-chatfilters-newsubmit").click(function () { return; } - console.log(name, regex, flags, replace); socket.emit("updateFilter", { name: name, source: regex,