You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please take note of changes made to index.html, js/login.js, server.js
Long story short, it uses the global object Brad created to do the following:
User requests to login
Check if username exists in global state object
If exists, send user back to home page and never proceed with any further socket stuff (e.g. joining a room...)
If user is unique, carry on with Brad's normal socket flow so you can chat etc.
Pretty simple really, just need to apply some lateral thinking and problem solving skills. Anyone can copy paste code, but to take your learning to the next level I suggest not copying what I've done and create your own solution.
people with same name should not be allowed to enter the same chatroom can you tell me how to implement it ?
The text was updated successfully, but these errors were encountered: