irccd
3.0.3
|
Rule utilities. More...
Functions | |
auto | from_json (const nlohmann::json &json) -> rule |
auto | from_config (const ini::section &sc) -> rule |
auto | to_json (const rule &rule) -> nlohmann::json |
Rule utilities.
auto irccd::daemon::rule_util::from_config | ( | const ini::section & | sc | ) | -> rule |
Load a rule from a INI section.
sc | the ini section |
rule_error | on errors |
auto irccd::daemon::rule_util::from_json | ( | const nlohmann::json & | json | ) | -> rule |
Load a rule from a JSON object.
For possible use in transport commands or Javascript API.
json | the JSON object |
rule_error | on errors |
auto irccd::daemon::rule_util::to_json | ( | const rule & | rule | ) | -> nlohmann::json |
Convert a rule into a JSON object.
rule | the rule |
the | JSON representation |