+ }
+
+ case "notifyscore":
+ case "notifyturn":
+ case "notifynewgame":
+ if (!!clients["/mygames"]) {
+ obj.targets.forEach(t => {
+ const k = t.sid || idToSid[t.uid];
+ if (!!clients["/mygames"][k]) {
+ Object.keys(clients["/mygames"][k]).forEach(x => {
+ send(
+ clients["/mygames"][k][x].socket,
+ { code: obj.code, data: obj.data }
+ );
+ });
+ }
+ });
+ }
+ break;
+
+ case "getfocus":
+ case "losefocus":
+ if (page == "/") notifyAllBut("/", obj.code, { page: "/" }, [sid]);
+ else {
+ // Notify game room + Hall:
+ notifyAllBut(page, obj.code, {}, [sid]);
+ notifyAllBut("/", obj.code, { page: page }, [sid]);
+ }