fix undefined disconnected

This commit is contained in:
Romain Beaumont 2016-03-14 21:34:11 +01:00
parent fed2208809
commit b39072ebb2

View file

@ -19,7 +19,7 @@ module.exports.player=function(player,serv)
});
player._client.on('end', () => {
if(player) {
if(player && player.username) {
serv.broadcast(serv.color.yellow + player.username + ' quit the game.');
player._writeOthers('player_info', {
action: 4,