mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-16 13:01:12 +00:00
fix disconnected event and related logging
This commit is contained in:
parent
d379307a80
commit
920f61340e
2 changed files with 3 additions and 3 deletions
|
|
@ -15,8 +15,8 @@ function inject(serv,player)
|
|||
});
|
||||
|
||||
player.on("disconnected",function(){
|
||||
console.log("[INFO]: " + player.username + ' disconnected', '(' + addr + ')');
|
||||
serv.log("[INFO]: " + player.username + ' disconnected', '(' + addr + ')');
|
||||
console.log("[INFO]: " + player.username + ' disconnected'+ '(' + addr + ')');
|
||||
serv.log("[INFO]: " + player.username + ' disconnected'+ '(' + addr + ')');
|
||||
});
|
||||
|
||||
player.on("error",function(error){
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ function inject(serv,player)
|
|||
});
|
||||
player._writeOthers('entity_destroy', {'entityIds': [player.entity.id]});
|
||||
delete serv.entities[player.entity.id];
|
||||
player.emit('disconnect');
|
||||
player.emit('disconnected');
|
||||
var index = serv.players.indexOf(player);
|
||||
if (index > -1) {
|
||||
serv.players.splice(index,1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue