projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix corr challenges
[vchess.git]
/
server
/
sockets.js
diff --git
a/server/sockets.js
b/server/sockets.js
index
fcaab83
..
e7bb556
100644
(file)
--- a/
server/sockets.js
+++ b/
server/sockets.js
@@
-123,6
+123,10
@@
module.exports = function(wss) {
});
break;
}
});
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}));
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?)
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}));
case "newmove":
clients[obj.target].sock.send(JSON.stringify(
{code:"newmove", move:obj.move}));