FEATURE: warning message when world is near full capacity

This commit is contained in:
kharhamel 2021-03-11 16:14:34 +01:00
parent 210daf46e3
commit 8d6c1a50bf
15 changed files with 187 additions and 77 deletions

View file

@ -258,12 +258,12 @@ export class IoSocketController {
/* Handlers */
open: (ws) => {
if(ws.rejected === true) {
emitError(ws, 'World is full');
socketManager.emitWorldFullMessage(ws);
ws.close();
}
// Let's join the room
const client = this.initClient(ws); //todo: into the upgrade instead?
const client = this.initClient(ws);
socketManager.handleJoinRoom(client);
//get data information and show messages