#include <ban.hpp>
Public Member Functions | |
ban_manager () | |
~ban_manager () | |
void | read (const config &) |
void | write (config &) const |
time_t | parse_time (std::string time_in) const |
void | ban (const std::string &, const time_t &, const std::string &) |
void | unban (std::ostringstream &os, const std::string &ip) |
void | check_ban_times (time_t time_now) |
void | list_bans (std::ostringstream &out) const |
bool | is_ip_banned (std::string ip) const |
const std::string & | get_ban_help () const |
void | set_default_ban_times (const config &) |
Private Member Functions | |
bool | is_number (const char &c) const |
size_t | to_number (const char &c) const |
void | init_ban_help () |
Private Attributes | |
ban_map | bans_ |
ban_time_queue | time_queue_ |
default_ban_times | ban_times_ |
std::string | ban_help_ |
Definition at line 73 of file ban.hpp.
wesnothd::ban_manager::ban_manager | ( | ) |
wesnothd::ban_manager::~ban_manager | ( | ) |
bool wesnothd::ban_manager::is_number | ( | const char & | c | ) | const [inline, private] |
size_t wesnothd::ban_manager::to_number | ( | const char & | c | ) | const [inline, private] |
void wesnothd::ban_manager::init_ban_help | ( | ) | [private] |
Definition at line 286 of file ban.cpp.
References ban_help_, and ban_times_.
Referenced by ban_manager(), and set_default_ban_times().
void wesnothd::ban_manager::read | ( | const config & | cfg | ) |
Definition at line 72 of file ban.cpp.
References bans_, config::get_children(), wesnothd::banned::get_ip(), wesnothd::banned::is_deleted(), and time_queue_.
void wesnothd::ban_manager::write | ( | config & | cfg | ) | const |
time_t wesnothd::ban_manager::parse_time | ( | std::string | time_in | ) | const |
Definition at line 97 of file ban.cpp.
References ban_times_, is_number(), loc, LOG_SERVER, and to_number().
Referenced by server::process_command(), and set_default_ban_times().
void wesnothd::ban_manager::ban | ( | const std::string & | ip, | |
const time_t & | end_time, | |||
const std::string & | reason | |||
) |
Definition at line 195 of file ban.cpp.
References bans_, and time_queue_.
Referenced by check_ban_times(), server::process_command(), unban(), and ~ban_manager().
void wesnothd::ban_manager::unban | ( | std::ostringstream & | os, | |
const std::string & | ip | |||
) |
void wesnothd::ban_manager::check_ban_times | ( | time_t | time_now | ) |
Definition at line 223 of file ban.cpp.
References ban(), bans_, wesnothd::banned::get_end_time(), wesnothd::banned::get_ip(), wesnothd::banned::is_deleted(), LOG_SERVER, and time_queue_.
Referenced by server::run().
void wesnothd::ban_manager::list_bans | ( | std::ostringstream & | out | ) | const |
bool wesnothd::ban_manager::is_ip_banned | ( | std::string | ip | ) | const |
Definition at line 274 of file ban.cpp.
References bans_, DBG_SERVER, and utils::wildcard_string_match().
Referenced by server::is_ip_banned().
const std::string& wesnothd::ban_manager::get_ban_help | ( | ) | const [inline] |
Definition at line 105 of file ban.hpp.
References ban_help_.
Referenced by server::process_command().
void wesnothd::ban_manager::set_default_ban_times | ( | const config & | cfg | ) |
Definition at line 306 of file ban.cpp.
References ban_times_, config::get_children(), init_ban_help(), and parse_time().
Referenced by server::load_config().
ban_map wesnothd::ban_manager::bans_ [private] |
Definition at line 76 of file ban.hpp.
Referenced by ban(), check_ban_times(), is_ip_banned(), list_bans(), read(), unban(), write(), and ~ban_manager().
Definition at line 77 of file ban.hpp.
Referenced by ban(), check_ban_times(), read(), and ~ban_manager().
Definition at line 78 of file ban.hpp.
Referenced by init_ban_help(), parse_time(), and set_default_ban_times().
std::string wesnothd::ban_manager::ban_help_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |