#include <ban.hpp>

Public Member Functions | |
| ban_manager () | |
| ~ban_manager () | |
| void | read () |
| void | write () |
| bool | parse_time (const std::string &duration, time_t *time) const |
| Parses the given duration and adds it to *time except if the duration is '0' or 'permanent' in which case *time will be set to '0'. | |
| std::string | ban (const std::string &, const time_t &, const std::string &, const std::string &, const std::string &, const std::string &="") |
| void | unban (std::ostringstream &os, const std::string &ip) |
| void | unban_group (std::ostringstream &os, const std::string &group) |
| void | check_ban_times (time_t time_now) |
| void | list_deleted_bans (std::ostringstream &out, const std::string &mask="*") const |
| void | list_bans (std::ostringstream &out, const std::string &mask="*") const |
| std::string | is_ip_banned (const std::string &ip) const |
| const std::string & | get_ban_help () const |
| void | load_config (const config &) |
Private Member Functions | |
| bool | is_digit (const char &c) const |
| size_t | to_digit (const char &c) const |
| void | init_ban_help () |
Private Attributes | |
| ban_set | bans_ |
| deleted_ban_list | deleted_bans_ |
| ban_time_queue | time_queue_ |
| default_ban_times | ban_times_ |
| std::string | ban_help_ |
| std::string | filename_ |
| bool | dirty_ |
Definition at line 123 of file ban.hpp.
| wesnothd::ban_manager::ban_manager | ( | ) |
| std::string wesnothd::ban_manager::ban | ( | const std::string & | ip, | |
| const time_t & | end_time, | |||
| const std::string & | reason, | |||
| const std::string & | who_banned, | |||
| const std::string & | group, | |||
| const std::string & | nick = "" | |||
| ) |
Definition at line 470 of file ban.cpp.
Referenced by server::ban_handler(), server::gban_handler(), server::kickban_handler(), and server::process_login().

| void wesnothd::ban_manager::check_ban_times | ( | time_t | time_now | ) |
Definition at line 540 of file ban.cpp.
Referenced by server::run().

| const std::string& wesnothd::ban_manager::get_ban_help | ( | ) | const [inline] |
Definition at line 167 of file ban.hpp.
References ban_help_.
Referenced by server::ban_handler(), server::gban_handler(), and server::kickban_handler().

| bool wesnothd::ban_manager::is_digit | ( | const char & | c | ) | const [inline, private] |
| std::string wesnothd::ban_manager::is_ip_banned | ( | const std::string & | ip | ) | const |
Definition at line 635 of file ban.cpp.
Referenced by server::is_ip_banned().

| void wesnothd::ban_manager::list_bans | ( | std::ostringstream & | out, | |
| const std::string & | mask = "*" | |||
| ) | const |
Definition at line 592 of file ban.cpp.
Referenced by server::bans_handler().

| void wesnothd::ban_manager::list_deleted_bans | ( | std::ostringstream & | out, | |
| const std::string & | mask = "*" | |||
| ) | const |
Definition at line 564 of file ban.cpp.
Referenced by server::bans_handler().

| void wesnothd::ban_manager::load_config | ( | const config & | cfg | ) |
Definition at line 676 of file ban.cpp.
Referenced by server::load_config().

| bool wesnothd::ban_manager::parse_time | ( | const std::string & | duration, | |
| time_t * | time | |||
| ) | const |
Parses the given duration and adds it to *time except if the duration is '0' or 'permanent' in which case *time will be set to '0'.
Definition at line 315 of file ban.cpp.
Referenced by server::ban_handler(), server::gban_handler(), and server::kickban_handler().

| void wesnothd::ban_manager::read | ( | ) |
Definition at line 250 of file ban.cpp.
References wesnothd::banned::ip_, and wesnothd::banned::mask_.
Referenced by server::server().

| size_t wesnothd::ban_manager::to_digit | ( | const char & | c | ) | const [inline, private] |
| void wesnothd::ban_manager::unban | ( | std::ostringstream & | os, | |
| const std::string & | ip | |||
| ) |
Definition at line 504 of file ban.cpp.
Referenced by server::unban_handler().

| void wesnothd::ban_manager::unban_group | ( | std::ostringstream & | os, | |
| const std::string & | group | |||
| ) |
Definition at line 529 of file ban.cpp.
Referenced by server::ungban_handler().

| void wesnothd::ban_manager::write | ( | ) |
Definition at line 289 of file ban.cpp.
Referenced by ban_manager().

std::string wesnothd::ban_manager::ban_help_ [private] |
Definition at line 130 of file ban.hpp.
Referenced by get_ban_help().
ban_set wesnothd::ban_manager::bans_ [private] |
bool wesnothd::ban_manager::dirty_ [private] |
std::string wesnothd::ban_manager::filename_ [private] |
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:43 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |