19 #ifndef IRCCD_DAEMON_SERVER_SERVICE_HPP
20 #define IRCCD_DAEMON_SERVER_SERVICE_HPP
27 #include <irccd/sysconfig.hpp>
30 #include <string_view>
31 #include <system_error>
54 std::vector<std::shared_ptr<server>> servers_;
56 void handle_connect(
const std::shared_ptr<server>&,
const std::error_code&);
57 void handle_error(
const std::shared_ptr<server>&,
const std::error_code&);
58 void handle_recv(
const std::shared_ptr<server>&,
const std::error_code&,
const event&);
59 void handle_wait(
const std::shared_ptr<server>&,
const std::error_code&);
61 void connect(
const std::shared_ptr<server>&);
62 void disconnect(
const std::shared_ptr<server>&);
63 void reconnect(
const std::shared_ptr<server>&);
64 void recv(
const std::shared_ptr<server>&);
87 auto
has(
std::string_view
id) const noexcept ->
bool;
167 template <
typename T>
Read .ini configuration file for irccd.
Definition: config.hpp:39
Irccd main instance.
Definition: bot.hpp:58
Manage IRC servers.
Definition: server_service.hpp:51
void load(const config &cfg) noexcept
auto has(std::string_view id) const noexcept -> bool
auto list() const noexcept -> const std::vector< std::shared_ptr< server >> &
auto require(std::string_view id) const -> std::shared_ptr< server >
void add(std::shared_ptr< server > sv)
void remove(std::string_view id)
auto get(std::string_view id) const noexcept -> std::shared_ptr< server >
The class that connect to a IRC server.
Definition: server.hpp:256
std::variant< std::monostate, connect_event, disconnect_event, invite_event, join_event, kick_event, me_event, message_event, mode_event, names_event, nick_event, notice_event, part_event, topic_event, whois_event > event
Store all possible events.
Definition: server.hpp:247
Parent namespace.
Definition: acceptor.hpp:43
static auto get_category(const server &server) -> std::string_view
static auto get_component(const server &server) -> std::string_view
Traits for loggable objects.
Definition: logger.hpp:78