<commit_before>#pragma once
#include "common.h"
#include "user.h"
#include <sys/socket.h>

class Protocol;

class Client : public User {
	public:
		Client(std::string&& id, std::string&& nick, std::string&& ident, std::string&& gecos, Protocol* mod);
		~Client();
		void disconnect();
		bool checkConnection() const;
		bool wantsToReconnect() const;
		void doReconnect();
		std::map<std::string, std::string> modes() const;
		bool modeSet(const std::string& mode) const;
		std::string modeParam(const std::string& mode) const;
		std::list<std::string> listModeList(const std::string& mode) const;
		bool itemInList(const std::string& mode, const std::string& param) const;
		void setMode(const std::string& mode);
		void setMode(const std::string& mode, const std::string& param);
		void unsetMode(const std::string& mode);
		void setListMode(const std::string& mode, const std::string& param);
		void unsetListMode(const std::string& mode, const std::string& param);
		void sendLine(const IRCMessage* line);
	private:
		std::map<std::string, std::string> clientModes;
		std::map<std::string, std::list<std::string>> clientListModes;
		std::shared_ptr<Socket> socket;
		bool expectingReconnect;
		Protocol* proto;
		std::thread receiveThread;
		std::thread sendThread;
		std::thread secondsThread;
		std::mutex sendMutex;
		void receiveData();
		void sendQueue();
		void decrementSeconds();
};<commit_msg>Make the proto pointer itself const at least<commit_after>#pragma once
#include "common.h"
#include "user.h"
#include <sys/socket.h>

class Protocol;

class Client : public User {
	public:
		Client(std::string&& id, std::string&& nick, std::string&& ident, std::string&& gecos, Protocol* mod);
		~Client();
		void disconnect();
		bool checkConnection() const;
		bool wantsToReconnect() const;
		void doReconnect();
		std::map<std::string, std::string> modes() const;
		bool modeSet(const std::string& mode) const;
		std::string modeParam(const std::string& mode) const;
		std::list<std::string> listModeList(const std::string& mode) const;
		bool itemInList(const std::string& mode, const std::string& param) const;
		void setMode(const std::string& mode);
		void setMode(const std::string& mode, const std::string& param);
		void unsetMode(const std::string& mode);
		void setListMode(const std::string& mode, const std::string& param);
		void unsetListMode(const std::string& mode, const std::string& param);
		void sendLine(const IRCMessage* line);
	private:
		std::map<std::string, std::string> clientModes;
		std::map<std::string, std::list<std::string>> clientListModes;
		std::shared_ptr<Socket> socket;
		bool expectingReconnect;
		Protocol* const proto;
		std::thread receiveThread;
		std::thread sendThread;
		std::thread secondsThread;
		std::mutex sendMutex;
		void receiveData();
		void sendQueue();
		void decrementSeconds();
};

#include "protocol.h"
{'fraction_non_alphanumeric': 0.14843205574912893, 'fraction_numerical': 0.0, 'mean_word_length': 6.2683544303797465, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4307064', 'n_tokens_mistral': 964, 'n_tokens_neox': 909, 'n_words': 256}