I have a list called usernames, that stores usernames. I want to see if the specific username is on the list and deny the person if it is. Code:
var usernames = ["someuser",""];
io.on('connection', function(socket){
socket.on("join", function(room, username == usernames){
if (username != "" || username == usernames){
// do something
}
})