projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve games/challenges display and fix MyGames page reactivity (using () for now...)
[vchess.git]
/
server
/
sockets.js
diff --git
a/server/sockets.js
b/server/sockets.js
index
c8f3c7f
..
b16135b
100644
(file)
--- a/
server/sockets.js
+++ b/
server/sockets.js
@@
-208,16
+208,13
@@
module.exports = function(wss) {
case "drawoffer":
case "rematchoffer":
case "draw":
case "drawoffer":
case "rematchoffer":
case "draw":
- if (!!obj.oppsid)
- // "newgame" message from Hall: do not target players
- notifyAllBut(page, "newgame", {data: obj.data}, [sid, obj.oppsid]);
- else notifyRoom(page, obj.code, {data: obj.data});
+ notifyRoom(page, obj.code, {data: obj.data});
break;
case "rnewgame":
break;
case "rnewgame":
- // A rematch game started: players are already informed
+ // A rematch game started:
+ // NOTE: no need to explicitely notify Hall: the game will be sent
notifyAllBut(page, "newgame", {data: obj.data}, [sid]);
notifyAllBut(page, "newgame", {data: obj.data}, [sid]);
- notifyAllBut("/", "newgame", {data: obj.data}, [sid, obj.oppsid]);
notifyRoom("/mygames", "newgame", {data: obj.data});
break;
notifyRoom("/mygames", "newgame", {data: obj.data});
break;