<commit_before>#include "c_getServerMessage.hpp"

void getServerMessage( sf::TcpSocket& server ){

	sf::Packet spacket;
	std::string message;
	server.receive( spacket );
	if( !(spacket >> message) ){
		std::cout << "Could not retrieve server's message of the day" << std::endl;
		return;
	}

	std::cout << '\n';
	std::istringstream converter( message );

	char next;
	while( std::getline( converter, message, '$' ) ){

		std::cout << message;
		converter >> next;
		if( next == '$' )
			std::cout << '$';
		else{
			std::getline( converter, message, ']' );
			message.erase( 0, 7 );
			message.pop_back();
			setColors( "light "+message );
		}
	}
	std::cout << "\n\n";
}<commit_msg>Updating message of the day treatment (client)<commit_after>#include "c_getServerMessage.hpp"

void getServerMessage( sf::TcpSocket& server ){

	sf::Packet spacket;
	std::string message;
	server.receive( spacket );
	if( !(spacket >> message) ){
		std::cout << "Could not retrieve server's message of the day" << std::endl;
		return;
	}

	std::cout << '\n';
	std::istringstream converter( message );

	char next;
	while( std::getline( converter, message, '$' ) && !converter.eof() ){

		std::cout << message;
		converter >> next;
		switch( next ){

		case '$':
			std::cout << '$';
			break;
		
		case '[':

			std::getline( converter, message, ']' );
			if( message == "white" || message == "blue" || message == "cyan" || message == "red" ||
					message == "magenta" || message == "yellow" || message == "green" )
			{
				setColors( "light "+message );
			}
			else{
				std::cout << "$[" << message << ']';
			}
			break;

		default:
			std::cout << '$' << next;
		}
	}
	std::cout << message << '\n' << std::endl;
	setColors("reset");
}
{'fraction_non_alphanumeric': 0.20395119116792562, 'fraction_numerical': 0.0011621150493898896, 'mean_word_length': 3.717808219178082, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2991250', 'n_tokens_mistral': 675, 'n_tokens_neox': 594, 'n_words': 144}