projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
About to finish completed Ultima rules
[vchess.git]
/
sockets.js
diff --git
a/sockets.js
b/sockets.js
index
452cb6e
..
ee4c1cf
100644
(file)
--- a/
sockets.js
+++ b/
sockets.js
@@
-88,6
+88,9
@@
module.exports = function(wss) {
else
games[page] = {id:sid, fen:obj.fen}; //wait for opponent
break;
else
games[page] = {id:sid, fen:obj.fen}; //wait for opponent
break;
+ case "cancelnewgame": //if a user cancel his seek
+ delete games[page];
+ break;
case "resign":
if (!!clients[page][obj.oppid])
clients[page][obj.oppid].send(JSON.stringify({code:"resign"}), noop);
case "resign":
if (!!clients[page][obj.oppid])
clients[page][obj.oppid].send(JSON.stringify({code:"resign"}), noop);