Minor bugfixes
This commit is contained in:
parent
31368cfe7f
commit
10de5df3c6
|
@ -818,6 +818,10 @@ Channel.prototype.addPendingJoin = function (user, password) {
|
||||||
|
|
||||||
Channel.prototype.handlePendingJoins = function () {
|
Channel.prototype.handlePendingJoins = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
if (self.dead) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.pendingJoins.forEach(function (u) {
|
self.pendingJoins.forEach(function (u) {
|
||||||
self.userJoin(u.user, u.pw);
|
self.userJoin(u.user, u.pw);
|
||||||
});
|
});
|
||||||
|
@ -871,6 +875,12 @@ Channel.prototype.userJoin = function(user, password) {
|
||||||
|
|
||||||
// Prevent duplicate login
|
// Prevent duplicate login
|
||||||
if(user.name != "") {
|
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++) {
|
for(var i = 0; i < this.users.length; i++) {
|
||||||
if(this.users[i].name.toLowerCase() == user.name.toLowerCase()) {
|
if(this.users[i].name.toLowerCase() == user.name.toLowerCase()) {
|
||||||
if (this.users[i] == user) {
|
if (this.users[i] == user) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ var Server = function (cfg) {
|
||||||
"path-traversal",
|
"path-traversal",
|
||||||
req.url);
|
req.url);
|
||||||
} else if (e.status >= 500) {
|
} else if (e.status >= 500) {
|
||||||
Logger.errlog.log(err);
|
Logger.errlog.log(e);
|
||||||
}
|
}
|
||||||
res.send(e.status);
|
res.send(e.status);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue