Fix a bug with guestname capitalization

This commit is contained in:
calzoneman 2013-10-05 20:42:15 -05:00
parent 6309e42989
commit ce197d3d8a
2 changed files with 6 additions and 1 deletions

View file

@ -622,8 +622,9 @@ User.prototype.guestLogin = function (name) {
}
if (self.inChannel()) {
var lname = name.toLowerCase();
for(var i = 0; i < self.channel.users.length; i++) {
if (self.channel.users[i].name == name) {
if (self.channel.users[i].name.toLowerCase() === lname) {
self.socket.emit("login", {
success: false,
error: "That name is already in use on this channel"