irccd
3.0.3
|
Manage rule to activate or deactive events. More...
#include <rule.hpp>
Public Types | |
enum class | action_type { accept , drop } |
Rule action type. More... | |
using | set = std::set< std::string > |
Public Member Functions | |
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 |
Public Attributes | |
set | servers {} |
The list of servers. More... | |
set | channels {} |
The list of channels. More... | |
set | origins {} |
The list of originators. More... | |
set | plugins {} |
The list of plugins. More... | |
set | events {} |
The list of events. More... | |
action_type | action {action_type::accept} |
Manage rule to activate or deactive events.
using irccd::daemon::rule::set = std::set<std::string> |
List of criterias.
|
strong |
|
noexcept |
Check if that rule apply for the given criterias.
server | the server |
channel | the channel |
origin | the origin |
plugin | the plugin |
event | the event |
|
noexcept |
Check if a set contains the value and return true if it is or return true if value is empty (which means applicable).
set | the set to test |
value | the value |
action_type irccd::daemon::rule::action {action_type::accept} |
The action.
set irccd::daemon::rule::channels {} |
The list of channels.
set irccd::daemon::rule::events {} |
The list of events.
set irccd::daemon::rule::origins {} |
The list of originators.
set irccd::daemon::rule::plugins {} |
The list of plugins.
set irccd::daemon::rule::servers {} |
The list of servers.