#include <ban.hpp>
Classes | |
struct | error |
Public Member Functions | |
banned (const std::string &ip, const time_t end_time, const std::string &reason, const std::string &who_banned=who_banned_default_, const std::string &group="", const std::string &nick="") | |
banned (const config &) | |
void | read (const config &) |
void | write (config &) const |
time_t | get_end_time () const |
std::string | get_human_end_time () const |
std::string | get_human_start_time () const |
std::string | get_human_time_span () const |
std::string | get_reason () const |
std::string | get_ip () const |
std::string | get_group () const |
std::string | get_who_banned () const |
std::string | get_nick () const |
bool | match_group (const std::string &group) const |
bool | match_ip (const ip_mask &ip) const |
bool | match_ipmask (const ip_mask &ip) const |
unsigned int | get_mask_ip (unsigned int) const |
unsigned int | get_int_ip () const |
unsigned int | mask () const |
bool | operator> (const banned &b) const |
Static Public Member Functions | |
static std::string | get_human_time (const time_t &) |
static banned_ptr | create_dummy (const std::string &ip) |
Private Member Functions | |
banned (const std::string &ip) | |
Private Attributes | |
unsigned int | ip_ |
unsigned int | mask_ |
std::string | ip_text_ |
time_t | end_time_ |
time_t | start_time_ |
std::string | reason_ |
std::string | who_banned_ |
std::string | group_ |
std::string | nick_ |
Static Private Attributes | |
static const std::string | who_banned_default_ = "system" |
|
private |
Definition at line 71 of file ban.cpp.
References ip_, mask_, and wesnothd::parse_ip().
Referenced by create_dummy().
wesnothd::banned::banned | ( | const std::string & | ip, |
const time_t | end_time, | ||
const std::string & | reason, | ||
const std::string & | who_banned = who_banned_default_ , |
||
const std::string & | group = "" , |
||
const std::string & | nick = "" |
||
) |
wesnothd::banned::banned | ( | const config & | cfg | ) |
|
static |
Definition at line 65 of file ban.cpp.
References banned().
Referenced by wesnothd::ban_manager::ban(), and wesnothd::ban_manager::unban().
|
inline |
|
inline |
std::string wesnothd::banned::get_human_end_time | ( | ) | const |
Definition at line 224 of file ban.cpp.
References end_time_, and lg::get_timestamp().
Referenced by wesnothd::operator<<().
std::string wesnothd::banned::get_human_start_time | ( | ) | const |
Definition at line 217 of file ban.cpp.
References lg::get_timestamp(), and start_time_.
Referenced by wesnothd::operator<<().
|
static |
std::string wesnothd::banned::get_human_time_span | ( | ) | const |
Definition at line 233 of file ban.cpp.
References end_time_, and lg::get_timespan().
|
inline |
|
inline |
Definition at line 90 of file ban.hpp.
References ip_text_.
Referenced by wesnothd::operator<<(), and write().
|
inline |
Definition at line 98 of file ban.hpp.
References nick_.
Referenced by wesnothd::operator<<(), and write().
|
inline |
|
inline |
Definition at line 95 of file ban.hpp.
References who_banned_.
Referenced by wesnothd::operator<<().
|
inline |
|
inline |
Definition at line 101 of file ban.hpp.
Referenced by wesnothd::ban_manager::unban_group().
bool wesnothd::banned::match_ip | ( | const ip_mask & | ip | ) | const |
Definition at line 252 of file ban.cpp.
Referenced by wesnothd::ban_manager::is_ip_banned().
bool wesnothd::banned::match_ipmask | ( | const ip_mask & | ip | ) | const |
bool wesnothd::banned::operator> | ( | const banned & | b | ) | const |
Definition at line 242 of file ban.cpp.
References end_time_, and get_end_time().
Definition at line 166 of file ban.cpp.
References end_time_, group_, config::has_attribute(), ip_, ip_text_, mask_, nick_, wesnothd::parse_ip(), reason_, start_time_, and who_banned_.
Referenced by banned().
Definition at line 189 of file ban.cpp.
References end_time_, get_ip(), get_nick(), group_, reason_, start_time_, who_banned_, and who_banned_default_.
|
private |
Definition at line 62 of file ban.hpp.
Referenced by get_end_time(), get_human_end_time(), get_human_time_span(), operator>(), read(), and write().
|
private |
Definition at line 66 of file ban.hpp.
Referenced by get_group(), read(), and write().
|
private |
Definition at line 59 of file ban.hpp.
Referenced by banned(), get_int_ip(), get_mask_ip(), match_ip(), match_ipmask(), and read().
|
private |
|
private |
Definition at line 60 of file ban.hpp.
Referenced by banned(), get_mask_ip(), mask(), match_ip(), match_ipmask(), and read().
|
private |
Definition at line 67 of file ban.hpp.
Referenced by get_nick(), and read().
|
private |
Definition at line 64 of file ban.hpp.
Referenced by get_reason(), read(), and write().
|
private |
Definition at line 63 of file ban.hpp.
Referenced by get_human_start_time(), read(), and write().
|
private |
Definition at line 65 of file ban.hpp.
Referenced by get_who_banned(), read(), and write().
|
staticprivate |