From ecabb5e71b14217061af0153c44f03a65734d969 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sun, 2 Jun 2013 18:09:52 -0400 Subject: [PATCH] Fix #159 --- user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user.js b/user.js index 6d4103cc..5175a9e6 100644 --- a/user.js +++ b/user.js @@ -83,7 +83,9 @@ User.prototype.initCallbacks = function() { }.bind(this)); this.socket.on("joinChannel", function(data) { - if(data.name == undefined) + if(this.channel != null) + return; + if(typeof data.name != "string") return; if(!data.name.match(/^[a-zA-Z0-9-_]+$/)) return;