- clients[obj.target].sock.send(JSON.stringify(
- {code:"game", game:obj.game, from:sid}));
+ if (!!obj.target)
+ {
+ clients[obj.target].sock.send(JSON.stringify(
+ {code:"game", game:data.game, from:sid}));
+ }
+ else
+ {
+ // Notify all room except opponent and me:
+ notifyRoom("/", "game", {game:data.game}, [data.oppsid]);
+ }