Pass result to Hall after a game ends
[vchess.git] / server / sockets.js
index 7f0d14e..3fb7ea2 100644 (file)
@@ -186,6 +186,11 @@ module.exports = function(wss) {
           notifyRoom(page, obj.code, {data:obj.data});
           break;
 
+        case "result":
+          // Special case: notify all, 'transroom': Game --> Hall
+          notifyRoom("/", "result", {gid:obj.gid, score:obj.score});
+          break;
+
         // Passing, relaying something: from isn't needed,
         // but target is fully identified (sid + tmpId)
         case "challenge":