Merge branch 'master' of https://gitea.arnweb.nl/arne/TanksJS-Server
This commit is contained in:
commit
44b3a6ff60
3044
package-lock.json
generated
3044
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -139,6 +139,13 @@ io.on("connection", (socket) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on("spectate", (data) => {
|
||||||
|
if (io.sockets.adapter.rooms.has(data)) {
|
||||||
|
console.log(traffic.in + colours.connect(`User ${String(socket.id)} is spectating room ${data}`));
|
||||||
|
socket.join(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
http.listen(port, () => {
|
http.listen(port, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user