Merge pull request #66 from H4CK3R-01/fix_duplicate_user
User with the same name as another user is rejected
This commit is contained in:
@@ -47,7 +47,7 @@ document.getElementById('ok').addEventListener('click', function () {
|
||||
});
|
||||
|
||||
socket.on('error', function (data) {
|
||||
if (data === 'Game started already or room has too many members') {
|
||||
if (data === 'Game started already or room has too many members' || data === 'Username already exists') {
|
||||
document.getElementById('login').style.display = 'flex';
|
||||
document.getElementById('game').style.display = 'none';
|
||||
document.getElementById('chat').style.display = 'none';
|
||||
|
Reference in New Issue
Block a user