joinning team send their existence

This commit is contained in:
catvayor 2023-06-11 17:15:04 +02:00
parent 8974d44267
commit 93be3718c5

View file

@ -110,8 +110,10 @@ io.use(function(socket, next){
var valid = config.validator(id);
if(valid == 0 && type == "conscrit" ||
valid == 1 && type == "vieux"){
if(!(id in equipes))
if(!(id in equipes)){
equipes[id] = default_team(id, valid);
emit_update(id);
}
next();
} else
next(new Error("invalid"));