Fix what I assume was a race condition

This commit is contained in:
calzoneman 2013-09-17 22:26:44 -05:00
parent 6aae146f8b
commit d5c5de41e1
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Tue Sep 17 22:24 2013 CDT
* lib/user.js: Fix what I assume was a race condition that caused an error message
when a user's login callback fired after the channel unloaded.
Tue Sep 17 13:16 2013 CDT
* lib/get-info.js: Fix ustream for channels that have /channel/ in the
path.

View File

@ -654,7 +654,7 @@ User.prototype.login = function(name, pw, session) {
});
return;
}
if(self.channel != null) {
if(self.channel !== null && !self.channel.dead) {
for(var i = 0; i < self.channel.users.length; i++) {
if(self.channel.users[i].name.toLowerCase() == name.toLowerCase()) {
if (self.channel.users[i] == self) {