Minor bugfixes

This commit is contained in:
calzoneman 2013-12-17 23:07:01 -05:00
parent 31368cfe7f
commit 10de5df3c6
2 changed files with 11 additions and 1 deletions

View File

@ -818,6 +818,10 @@ Channel.prototype.addPendingJoin = function (user, password) {
Channel.prototype.handlePendingJoins = function () {
var self = this;
if (self.dead) {
return;
}
self.pendingJoins.forEach(function (u) {
self.userJoin(u.user, u.pw);
});
@ -871,6 +875,12 @@ Channel.prototype.userJoin = function(user, password) {
// Prevent duplicate login
if(user.name != "") {
if (this.users === undefined) {
Logger.errlog.log("Wat: this.users is undefined");
Logger.errlog.log("chan: " + this.name + ", dead: " + this.dead);
Logger.errlog.log("keys: " + Object.keys(this).join(","));
return;
}
for(var i = 0; i < this.users.length; i++) {
if(this.users[i].name.toLowerCase() == user.name.toLowerCase()) {
if (this.users[i] == user) {

View File

@ -121,7 +121,7 @@ var Server = function (cfg) {
"path-traversal",
req.url);
} else if (e.status >= 500) {
Logger.errlog.log(err);
Logger.errlog.log(e);
}
res.send(e.status);
} else {