diff --git a/lib/channel.js b/lib/channel.js index a11110c4..86c7cfe8 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -504,7 +504,7 @@ Channel.prototype.preJoin = function (user, password) { if (self.opts.password !== false && user.rank < 2) { if (password !== self.opts.password) { var checkPassword = function (pw) { - if (self.dead) { + if (self.dead || user.inChannel()) { return; } @@ -513,10 +513,6 @@ Channel.prototype.preJoin = function (user, password) { return; } - user.socket.listeners("channelPassword").splice( - user.socket.listeners("channelPassword").indexOf(checkPassword) - ); - user.socket.emit("cancelNeedPassword"); self.join(user); };