19 #ifndef IRCCD_DAEMON_RULE_HPP
20 #define IRCCD_DAEMON_RULE_HPP
27 #include <irccd/sysconfig.hpp>
32 #include <system_error>
43 using set = std::set<std::string>;
86 std::string_view origin,
88 std::string_view
event)
const noexcept -> bool;
131 using system_error::system_error;
Abstract plugin.
Definition: plugin.hpp:61
Rule error.
Definition: rule.hpp:112
error
Rule related errors.
Definition: rule.hpp:117
@ invalid_index
Definition: rule.hpp:125
@ invalid_action
Invalid rule index.
Definition: rule.hpp:122
@ no_error
No error.
Definition: rule.hpp:119
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
Main irccd namespace.
Definition: bot.hpp:41
auto operator!=(const rule &lhs, const rule &rhs) noexcept -> bool
auto rule_category() -> const std::error_category &
auto operator==(const rule &lhs, const rule &rhs) noexcept -> bool
auto make_error_code(bot_error::error e) noexcept -> std::error_code
Parent namespace.
Definition: acceptor.hpp:43
A channel to join with an optional password.
Definition: server.hpp:63
Manage rule to activate or deactive events.
Definition: rule.hpp:39
action_type
Rule action type.
Definition: rule.hpp:48
@ accept
The event is accepted (default)
@ drop
The event is dropped.
set channels
The list of channels.
Definition: rule.hpp:54
action_type action
Definition: rule.hpp:62
set events
The list of events.
Definition: rule.hpp:57
std::set< std::string > set
Definition: rule.hpp:43
set origins
The list of originators.
Definition: rule.hpp:55
auto match_set(const set &set, const std::string &value) const noexcept -> bool
auto match(std::string_view server, std::string_view channel, std::string_view origin, std::string_view plugin, std::string_view event) const noexcept -> bool
set plugins
The list of plugins.
Definition: rule.hpp:56
set servers
The list of servers.
Definition: rule.hpp:53