module.exports=inject;

function inject(serv,player)
{

  player.on("connected",function(){
    var addr = player._client.socket.remoteAddress + ':' + player._client.socket.remotePort;
    console.log("[INFO]: " + player.username + ' connected', '(' + addr + ')');
    serv.log("[INFO]: " + player.username + ' connected', '(' + addr + ')');
  });

  player.on("spawned",function(){
    console.log("[INFO]: position written, player spawning...");
    serv.log("[INFO]: position written, player spawning...");
  });

  player.on("disconnected",function(){
    console.log("[INFO]: " + player.username + ' disconnected'+ '(' + addr + ')');
    serv.log("[INFO]: " + player.username + ' disconnected'+ '(' + addr + ')');
  });

  player.on("error",function(error){
    console.log('[ERR] ' + error.stack);
    serv.log('[ERR]: Client: ' + error.stack);
  });

  player.on("chat",function(message){
    message = '<' + player.username + '>' + ' ' + message;
    console.log("[INFO] " + message);
    serv.log("[INFO] " + message);
  });

}
@@ -89,101 +89,8 @@
 ()%7B%0A
-    var addr = player._client.socket.remoteAddress + ':' + player._client.socket.remotePort;%0A
     
@@ -144,34 +144,16 @@
 nnected'
-, '(' + addr + ')'
 );%0A    s
@@ -207,26 +207,8 @@
 ted'
-, '(' + addr + ')'
 );%0A 
@@ -482,34 +482,16 @@
 nnected'
-+ '(' + addr + ')'
 );%0A    s
@@ -548,26 +548,8 @@
 ted'
-+ '(' + addr + ')'
 );%0A 

fix disconnecting error