When a user enters a room as spectator, the userJoin event is fired and he is added to a user array.
Code: Select all
var u = evt["user"]
var rId = r.getId()
var rm = rl[rId] //array with the rooms
rm.users[u.getUserId()] = uIf the user now creates a game of his own, he will still recieve the game moves from the room he was previously watching as spectator, which made my testers think there was a ghost player in the game.