mirror of https://github.com/calzoneman/sync.git
Fix a bug with guestname capitalization
This commit is contained in:
parent
6309e42989
commit
ce197d3d8a
|
@ -1,3 +1,7 @@
|
|||
Sat Oct 05 20:41 2013 CDT
|
||||
* lib/user.js: Fix a bug where duplicate guestnames were allowed with
|
||||
different capitalizations
|
||||
|
||||
Thu Oct 03 22:09 2013 CDT
|
||||
* www/assets/js/ui.js: Use sortable("cancel") to remove the need for
|
||||
the `moveby` field of the movement packet
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue