- case "mconnect":
- // Special case: notify some game rooms that
- // I'm watching game state from MyGames
- // TODO: this code is ignored for now
- obj.gids.forEach(gid => {
- const pg = "/game/" + gid;
- Object.keys(clients[pg]).forEach(s => {
- Object.keys(clients[pg][s]).forEach(x => {
- send(
- clients[pg][s][x].socket,
- { code: "mconnect", from: sid }
- );
- });
- });
- });
- break;
- case "mdisconnect":
- // TODO
- // Also TODO: pass newgame to MyGames, and gameover (result)
- break;