#include <ban.hpp>
Definition at line 60 of file ban.hpp.
◆ banned() [1/3]
wesnothd::banned::banned |
( |
const std::string & |
ip, |
|
|
const utils::optional< std::chrono::system_clock::time_point > & |
end_time, |
|
|
const std::string & |
reason, |
|
|
const std::string & |
who_banned = who_banned_default_ , |
|
|
const std::string & |
group = "" , |
|
|
const std::string & |
nick = "" |
|
) |
| |
◆ banned() [2/3]
wesnothd::banned::banned |
( |
const config & |
cfg | ) |
|
◆ banned() [3/3]
wesnothd::banned::banned |
( |
const std::string & |
ip | ) |
|
◆ get_end_time()
const auto& wesnothd::banned::get_end_time |
( |
| ) |
const |
|
inline |
◆ get_group()
std::string wesnothd::banned::get_group |
( |
| ) |
const |
|
inline |
◆ get_human_end_time()
std::string wesnothd::banned::get_human_end_time |
( |
| ) |
const |
◆ get_human_start_time()
std::string wesnothd::banned::get_human_start_time |
( |
| ) |
const |
◆ get_int_ip()
unsigned int wesnothd::banned::get_int_ip |
( |
| ) |
const |
|
inline |
◆ get_ip()
std::string wesnothd::banned::get_ip |
( |
| ) |
const |
|
inline |
◆ get_mask_ip()
unsigned int wesnothd::banned::get_mask_ip |
( |
unsigned int |
mask | ) |
const |
◆ get_nick()
std::string wesnothd::banned::get_nick |
( |
| ) |
const |
|
inline |
◆ get_reason()
std::string wesnothd::banned::get_reason |
( |
| ) |
const |
|
inline |
◆ get_remaining_ban_time()
utils::optional< std::chrono::seconds > wesnothd::banned::get_remaining_ban_time |
( |
| ) |
const |
Returns the seconds remaining until than ban expires, or nullopt if permanent.
Definition at line 219 of file ban.cpp.
References end_time_.
◆ get_who_banned()
std::string wesnothd::banned::get_who_banned |
( |
| ) |
const |
|
inline |
◆ mask()
unsigned int wesnothd::banned::mask |
( |
| ) |
const |
|
inline |
◆ match_group()
bool wesnothd::banned::match_group |
( |
const std::string & |
group | ) |
const |
|
inline |
◆ match_ip()
bool wesnothd::banned::match_ip |
( |
const ip_mask & |
ip | ) |
const |
◆ match_ipmask()
bool wesnothd::banned::match_ipmask |
( |
const ip_mask & |
ip | ) |
const |
◆ operator>()
bool wesnothd::banned::operator> |
( |
const banned & |
b | ) |
const |
◆ read()
void wesnothd::banned::read |
( |
const config & |
cfg | ) |
|
Definition at line 163 of file ban.cpp.
References end_time_, group_, config::has_attribute(), ip_, ip_text_, mask_, nick_, wesnothd::parse_ip(), chrono::parse_timestamp(), reason_, start_time_, and who_banned_.
Referenced by banned().
◆ write()
void wesnothd::banned::write |
( |
config & |
cfg | ) |
const |
◆ end_time_
utils::optional<std::chrono::system_clock::time_point> wesnothd::banned::end_time_ |
|
private |
◆ group_
std::string wesnothd::banned::group_ |
|
private |
◆ ip_
unsigned int wesnothd::banned::ip_ |
|
private |
◆ ip_text_
std::string wesnothd::banned::ip_text_ |
|
private |
◆ mask_
unsigned int wesnothd::banned::mask_ |
|
private |
◆ nick_
std::string wesnothd::banned::nick_ |
|
private |
◆ reason_
std::string wesnothd::banned::reason_ |
|
private |
◆ start_time_
utils::optional<std::chrono::system_clock::time_point> wesnothd::banned::start_time_ |
|
private |
◆ who_banned_
std::string wesnothd::banned::who_banned_ |
|
private |
◆ who_banned_default_
const std::string wesnothd::banned::who_banned_default_ = "system" |
|
staticprivate |
The documentation for this class was generated from the following files: