I want to know if is there a way to do something like the following:
const server = new colyseus.Server({ ... });
// Somewhere on a room:
...
async onJoin(client) {
if (someLogin) {
// This disconnects a client based on id
this.server.disconnect(anotherClientId);
}
}
...
I would like such a feature, to be able to make a client only join a single room at a time, for example. Or if an account is logged in two computers, disconnect the older connection.