<commit_before>#include "robobo.h"
#include "channel.cpp"
#include "configuration.cpp"
#include "lineParser.cpp"
#include "server.cpp"
#include "socket.cpp"

std::string input, command, currentNick, ident;
std::vector<std::string> inputParams;
bool registered;

int main(int argc, char** argv) {
	ConfigReader config;
	Socket bot_socket (config.getServer(), config.getPort());
	Server serverSettings;
	currentNick = config.getNick();
	ident = config.getIdent();
	bot_socket.sendMsg("NICK :" + currentNick);
	bot_socket.sendMsg("USER " + ident + " here " + config.getServer() + " :RoBoBo-IRC-BoBo IRC Bot");
	while (true) {
		if (!bot_socket.isConnected()) {
			bot_socket.closeConnection();
			std::cout << "Disconnected from server." << std::endl;
			return 0;
		}
		input = bot_socket.receive();
		std::cout << input << std::endl;
		inputParams.clear();
		inputParams = parseLine(input);
		command = inputParams[1];
		if (command == "001")
			registered = true;
		if (command == "005")
			serverSettings.handleCapab(inputParams);
		if (command == "433" && !registered) {
			currentNick += "_";
			bot_socket.sendMsg("NICK :" + currentNick);
		}
	}
}<commit_msg>Complete unordered_map of channels by channel name.<commit_after>#include "robobo.h"
#include "channel.cpp"
#include "configuration.cpp"
#include "lineParser.cpp"
#include "server.cpp"
#include "socket.cpp"

std::string input, command, currentNick, ident;
std::vector<std::string> inputParams;
std::tr1::unordered_map<std::string, Channel> channels;
bool registered;

int main(int argc, char** argv) {
	ConfigReader config;
	Socket bot_socket (config.getServer(), config.getPort());
	Server serverSettings;
	currentNick = config.getNick();
	ident = config.getIdent();
	bot_socket.sendMsg("NICK :" + currentNick);
	bot_socket.sendMsg("USER " + ident + " here " + config.getServer() + " :RoBoBo-IRC-BoBo IRC Bot");
	while (true) {
		if (!bot_socket.isConnected()) {
			bot_socket.closeConnection();
			std::cout << "Disconnected from server." << std::endl;
			return 0;
		}
		input = bot_socket.receive();
		std::cout << input << std::endl;
		inputParams.clear();
		inputParams = parseLine(input);
		command = inputParams[1];
		if (command == "001")
			registered = true;
		if (command == "005")
			serverSettings.handleCapab(inputParams);
		if (command == "433" && !registered) {
			currentNick += "_";
			bot_socket.sendMsg("NICK :" + currentNick);
		}
		if (command == "JOIN") {
			std::pair<std::string, Channel> joinedChannel (inputParams[2], Channel (serverSettings));
			channels.insert(joinedChannel);
		}
		if (command == "PRIVMSG" && inputParams[3] == "join") {
			bot_socket.sendMsg("JOIN #zbwerewolf");
		}
	}
}
{'fraction_non_alphanumeric': 0.1680327868852459, 'fraction_numerical': 0.009314456035767511, 'mean_word_length': 5.006711409395973, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 7, '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': '441859', 'n_tokens_mistral': 989, 'n_tokens_neox': 892, 'n_words': 196}