wesnothd::ban_manager Class Reference

#include <ban.hpp>

List of all members.

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_


Detailed Description

Definition at line 73 of file ban.hpp.


Constructor & Destructor Documentation

wesnothd::ban_manager::ban_manager (  ) 

Definition at line 330 of file ban.cpp.

References init_ban_help().

wesnothd::ban_manager::~ban_manager (  ) 

Definition at line 319 of file ban.cpp.

References ban(), bans_, and time_queue_.


Member Function Documentation

bool wesnothd::ban_manager::is_number ( const char &  c  )  const [inline, private]

Definition at line 81 of file ban.hpp.

Referenced by parse_time().

size_t wesnothd::ban_manager::to_number ( const char &  c  )  const [inline, private]

Definition at line 83 of file ban.hpp.

Referenced by parse_time().

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  ) 

void wesnothd::ban_manager::write ( config cfg  )  const

Definition at line 87 of file ban.cpp.

References config::add_child(), and bans_.

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 
)

Definition at line 209 of file ban.cpp.

References ban(), and bans_.

Referenced by server::process_command().

void wesnothd::ban_manager::check_ban_times ( time_t  time_now  ) 

void wesnothd::ban_manager::list_bans ( std::ostringstream &  out  )  const

Definition at line 254 of file ban.cpp.

References bans_.

Referenced by server::process_command().

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().


Member Data Documentation

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]

Definition at line 79 of file ban.hpp.

Referenced by get_ban_help(), and init_ban_help().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs