patch a couple of bugs

This commit is contained in:
calzoneman 2013-04-04 18:22:11 -05:00
parent dea52ae78b
commit 823ab91d04
3 changed files with 10 additions and 3 deletions

View File

@ -633,6 +633,8 @@ Channel.prototype.playNext = function() {
// Reset voteskip
this.voteskip = false;
this.drinks = 0;
this.broadcastDrinks();
var old = this.position;
// Wrap around if the end is hit
@ -676,6 +678,8 @@ Channel.prototype.jumpTo = function(pos) {
// Reset voteskip
this.voteskip = false;
this.drinks = 0;
this.broadcastDrinks();
var old = this.position;
this.position = pos;
@ -881,7 +885,7 @@ Channel.prototype.tryChangeFilter = function(user, data) {
catch(e) {
return;
}
this.updateFilter(data);
this.updateFilter(data.filter);
}
else if(data.cmd == "remove") {
this.removeFilter(data.filter[0]);

View File

@ -14,6 +14,7 @@ var Config = require("./config.js");
var Logger = require("./logger.js");
var Rank = require("./rank.js");
var Media = require("./media.js").Media;
var Server = require("./server.js");
var initialized = false;
@ -86,7 +87,7 @@ exports.loadChannel = function(chan) {
return;
}
else if(rows[0].name != chan.name) {
chan.name = rows[0].name;
return rows[0].name;
}
chan.registered = true;

View File

@ -9,7 +9,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
const VERSION = "1.1.1";
const VERSION = "1.1.2";
var fs = require("fs");
var Logger = require("./logger.js");
@ -49,6 +49,7 @@ exports.io.sockets.on("connection", function(socket) {
});
process.on("uncaughtException", function(err) {
Logger.errlog.log("[SEVERE] Uncaught Exception: " + err);
});
@ -57,6 +58,7 @@ process.on("exit", shutdown);
process.on("SIGINT", shutdown);
function shutdown() {
Logger.syslog.log("Unloading channels...");
for(var name in exports.channels) {