#pragma once #include #include #include struct Connection; /** * @brief Thread to track this connection's identity, and IRC state. * */ class SelfThread { Connection& connection_; std::string nickname_; std::string mode_; std::unordered_set channels_; public: SelfThread(Connection& connection) : connection_{connection} {} static auto start(Connection&) -> std::shared_ptr; auto get_my_nickname() const -> std::string const&; auto get_my_mode() const -> std::string const&; auto get_my_channels() const -> std::unordered_set const&; auto is_my_nick(std::string_view nick) const -> bool; auto is_my_mask(std::string_view nick) const -> bool; };