X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=server%2Fsockets.js;h=e7bb556ca43846f87111d458d035a97d8ee552e7;hp=fcaab83c815a6a2ace407d9212009961fb4c2215;hb=26f3a8879fb4b410ed8840c5a37397011c13bc1c;hpb=a0c41e7e23c9ff64031739e072f38e493bac8dca diff --git a/server/sockets.js b/server/sockets.js index fcaab83c..e7bb556c 100644 --- a/server/sockets.js +++ b/server/sockets.js @@ -123,6 +123,10 @@ module.exports = function(wss) { }); break; } + case "askgame": + clients[obj.target].sock.send(JSON.stringify( + {code:"askgame", from:sid})); + break; case "askfullgame": clients[obj.target].sock.send(JSON.stringify( {code:"askfullgame", from:sid})); @@ -167,7 +171,7 @@ module.exports = function(wss) { notifyRoom(clients[sid].page, "newchat", {chat:obj.chat}); break; // TODO: WebRTC instead in this case (most demanding?) - // --> At least do a "notifyRoom" + // --> Or else: at least do a "notifyRoom" (also for draw, resign...) case "newmove": clients[obj.target].sock.send(JSON.stringify( {code:"newmove", move:obj.move}));