<commit_before>var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var chatters = 0;

app.get('/', function(req, res){
  res.sendFile('/var/www/chat/index.html');
});

http.listen(3000, function(){
  console.log('listening on *:3000');
});

io.on('connection', function(socket){
    var address = socket.handshake.address;

  	socket.nickname = "MSNLover" + chatters;
  	chatters++;
   	console.log('user: ' + socket.id + " connected and is called " + socket.nickname + ". IP: " + address.address);
   	socket.emit('greeting', 'GlaDos: Howdy, ' + socket.nickname + ' . Welcome to this nostalgia trip! You change your nick with /nick nick');

  	socket.on('disconnect', function(){
    console.log('user disconnected');
  });

socket.on('chat message', function(msg){ 
		var msg = msg.replace(/[\u00A0-\u9999<>\&]/gim, function(i) {
   			return '&#'+i.charCodeAt(0)+';';
		});
		console.log(socket.nickname);
  		console.log(msg);
  		console.log("the split: " + msg.split(" ")[0]);
  		var firstWord = msg.split(" ")[0];
  		if(isCommand(firstWord))
  		{<commit_msg>now shows the ip in console.<commit_after>var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var chatters = 0;

app.get('/', function(req, res){
  res.sendFile('/var/www/chat/index.html');
});

http.listen(3000, function(){
  console.log('listening on *:3000');
});

io.on('connection', function(socket){
  	socket.nickname = "MSNLover" + chatters;
  	chatters++;
   	console.log('user: ' + socket.id + " connected and is called " + socket.nickname + ". IP: " + socket.handshake.address);
   	socket.emit('greeting', 'GlaDos: Howdy, ' + socket.nickname + ' . Welcome to this nostalgia trip! You change your nick with /nick nick');

  	socket.on('disconnect', function(){
    console.log('user disconnected');
  });

socket.on('chat message', function(msg){ 
		var msg = msg.replace(/[\u00A0-\u9999<>\&]/gim, function(i) {
   			return '&#'+i.charCodeAt(0)+';';
		});
		console.log(socket.nickname);
  		console.log(msg);
  		console.log("the split: " + msg.split(" ")[0]);
  		var firstWord = msg.split(" ")[0];
  		if(isCommand(firstWord))
  		{
{'fraction_non_alphanumeric': 0.20547330641543293, 'fraction_numerical': 0.01704800358905339, 'mean_word_length': 4.0566893424036286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2293007', 'n_tokens_mistral': 824, 'n_tokens_neox': 786, 'n_words': 160}