The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Classes | Typedefs | Functions | Variables
wesnothd Namespace Reference

Namespaces

 chat_message
 

Classes

class  ban_manager
 
class  banned
 
struct  banned_compare
 We want to move the lowest value to the top. More...
 
struct  banned_compare_subnet
 
class  game
 
struct  game_id_matches
 
struct  game_is_member
 
struct  game_t
 
struct  handle_doc
 
struct  handle_receive_doc
 
struct  name_t
 
class  player
 
class  player_record
 
class  room
 A room is a group of players that can communicate via messages. More...
 
class  room_manager
 The room manager manages the lobby and other rooms in the server, and related client message processing. More...
 
class  server
 
struct  socket_t
 

Typedefs

typedef boost::shared_ptr< bannedbanned_ptr
 
typedef std::set< banned_ptr,
banned_compare_subnet
ban_set
 
typedef std::list< banned_ptrdeleted_ban_list
 
typedef std::priority_queue
< banned_ptr, std::vector
< banned_ptr >, banned_compare
ban_time_queue
 
typedef std::map< std::string,
size_t > 
default_ban_times
 
typedef std::pair< unsigned
int, unsigned int
ip_mask
 
typedef std::vector< socket_ptruser_vector
 
typedef std::vector< socket_ptrside_vector
 
typedef boost::shared_ptr
< boost::asio::ip::tcp::socket > 
socket_ptr
 
typedef multi_index_container
< player_record, indexed_by
< ordered_unique< tag
< socket_t >
, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,
const socket_ptr, socket)>
, hashed_unique< tag< name_t >
, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,
const std::string &, name)>
, ordered_non_unique< tag
< game_t >
, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,
int, game_id)> >> 
player_connections
 
typedef std::vector
< network::connection
connection_vector
 
typedef std::map
< network::connection, player
player_map
 
typedef std::map< socket_ptr,
std::deque< boost::shared_ptr
< simple_wml::document > > > 
SendQueue
 

Functions

std::ostream & operator<< (std::ostream &o, const banned &n)
 
ip_mask parse_ip (const std::string &ip)
 
static const simple_wml::nodeget_multiplayer (const simple_wml::node &root)
 returns const so that operator [] won't create empty keys if not existent More...
 
static bool is_invalid_filename_char (char c)
 
void send_to_player (socket_ptr socket, simple_wml::document &doc)
 
template<typename Container >
void send_to_players (simple_wml::document &data, const Container &players, socket_ptr exclude=socket_ptr())
 
void send_server_message (socket_ptr socket, const std::string &message)
 
std::string client_address (socket_ptr socket)
 
void async_send_error (socket_ptr socket, const std::string &msg, const char *error_code="")
 
static bool check_error (const boost::system::error_code &error, socket_ptr socket)
 
template<typename Handler , typename ErrorHandler >
void async_send_doc (socket_ptr socket, simple_wml::document &doc, Handler handler, ErrorHandler error_handler)
 
static void null_handler (socket_ptr)
 
template<typename Handler >
void async_send_doc (socket_ptr socket, simple_wml::document &doc, Handler handler)
 
static void async_send_doc (socket_ptr socket, simple_wml::document &doc)
 
template<typename Handler , typename ErrorHandler >
void async_receive_doc (socket_ptr socket, Handler handler, ErrorHandler error_handler)
 
template<typename Handler >
void async_receive_doc (socket_ptr socket, Handler handler)
 
static void make_add_diff (const simple_wml::node &src, const char *gamelist, const char *type, simple_wml::document &out, int index=-1)
 
static bool make_delete_diff (const simple_wml::node &src, const char *gamelist, const char *type, const simple_wml::node *remove, simple_wml::document &out)
 
static bool make_change_diff (const simple_wml::node &src, const char *gamelist, const char *type, const simple_wml::node *item, simple_wml::document &out)
 
static std::string player_status (const wesnothd::player_record &player)
 
static void async_send_warning (socket_ptr socket, const std::string &msg, const char *warning_code)
 
void handle_send_to_player (socket_ptr socket)
 

Variables

static lg::log_domain log_server ("server")
 
int request_sample_frequency = 1
 
const std::string denied_msg = "You're not allowed to execute this command."
 
const std::string help_msg
 
SendQueue send_queue
 

Typedef Documentation

Definition at line 50 of file ban.hpp.

typedef std::priority_queue<banned_ptr,std::vector<banned_ptr>, banned_compare> wesnothd::ban_time_queue

Definition at line 52 of file ban.hpp.

Definition at line 35 of file ban.hpp.

Definition at line 24 of file room.hpp.

typedef std::map<std::string, size_t> wesnothd::default_ban_times

Definition at line 53 of file ban.hpp.

Definition at line 51 of file ban.hpp.

typedef std::pair<unsigned int, unsigned int> wesnothd::ip_mask

Definition at line 54 of file ban.hpp.

typedef multi_index_container< player_record, indexed_by< ordered_unique< tag<socket_t>, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,const socket_ptr,socket)>, hashed_unique< tag<name_t>, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,const std::string&,name)>, ordered_non_unique< tag<game_t>, BOOST_MULTI_INDEX_CONST_MEM_FUN(player_record,int,game_id)> >> wesnothd::player_connections

Definition at line 75 of file player_connection.hpp.

Definition at line 25 of file room.hpp.

Definition at line 1842 of file server.cpp.

typedef std::vector<socket_ptr> wesnothd::side_vector

Definition at line 35 of file game.hpp.

typedef boost::shared_ptr<boost::asio::ip::tcp::socket> wesnothd::socket_ptr

Definition at line 37 of file player_connection.hpp.

typedef std::vector<socket_ptr> wesnothd::user_vector

Definition at line 34 of file game.hpp.

Function Documentation

template<typename Handler , typename ErrorHandler >
void wesnothd::async_receive_doc ( socket_ptr  socket,
Handler  handler,
ErrorHandler  error_handler 
)
template<typename Handler >
void wesnothd::async_receive_doc ( socket_ptr  socket,
Handler  handler 
)

Definition at line 239 of file server.cpp.

References async_receive_doc(), and null_handler().

template<typename Handler , typename ErrorHandler >
void wesnothd::async_send_doc ( socket_ptr  socket,
simple_wml::document doc,
Handler  handler,
ErrorHandler  error_handler 
)
template<typename Handler >
void wesnothd::async_send_doc ( socket_ptr  socket,
simple_wml::document doc,
Handler  handler 
)

Definition at line 185 of file server.cpp.

References async_send_doc(), and null_handler().

static void wesnothd::async_send_doc ( socket_ptr  socket,
simple_wml::document doc 
)
static

Definition at line 190 of file server.cpp.

References async_send_doc(), and null_handler().

void wesnothd::async_send_error ( socket_ptr  socket,
const std::string msg,
const char *  error_code = "" 
)
static void wesnothd::async_send_warning ( socket_ptr  socket,
const std::string msg,
const char *  warning_code 
)
static
static bool wesnothd::check_error ( const boost::system::error_code &  error,
socket_ptr  socket 
)
static
std::string wesnothd::client_address ( socket_ptr  socket)
static const simple_wml::node& wesnothd::get_multiplayer ( const simple_wml::node root)
static

returns const so that operator [] won't create empty keys if not existent

Definition at line 134 of file game.cpp.

References simple_wml::node::child(), and ERR_GAME.

Referenced by wesnothd::game::allow_observers(), wesnothd::game::registered_users_only(), and wesnothd::game::start_game().

void wesnothd::handle_send_to_player ( socket_ptr  socket)

Definition at line 1860 of file server.cpp.

References async_send_doc().

Referenced by send_to_player().

static bool wesnothd::is_invalid_filename_char ( char  c)
static

Definition at line 1498 of file game.cpp.

Referenced by wesnothd::game::save_replay().

static void wesnothd::make_add_diff ( const simple_wml::node src,
const char *  gamelist,
const char *  type,
simple_wml::document out,
int  index = -1 
)
static
static bool wesnothd::make_change_diff ( const simple_wml::node src,
const char *  gamelist,
const char *  type,
const simple_wml::node item,
simple_wml::document out 
)
static
static bool wesnothd::make_delete_diff ( const simple_wml::node src,
const char *  gamelist,
const char *  type,
const simple_wml::node remove,
simple_wml::document out 
)
static
static void wesnothd::null_handler ( socket_ptr  )
static

Definition at line 180 of file server.cpp.

Referenced by async_receive_doc(), and async_send_doc().

std::ostream & wesnothd::operator<< ( std::ostream &  o,
const banned &  n 
)
ip_mask wesnothd::parse_ip ( const std::string ip)
static std::string wesnothd::player_status ( const wesnothd::player_record player)
static
void wesnothd::send_server_message ( socket_ptr  socket,
const std::string message 
)
void wesnothd::send_to_player ( socket_ptr  socket,
simple_wml::document doc 
)
template<typename Container >
void wesnothd::send_to_players ( simple_wml::document data,
const Container &  players,
socket_ptr  exclude = socket_ptr() 
)

Variable Documentation

const std::string wesnothd::denied_msg = "You're not allowed to execute this command."
const std::string wesnothd::help_msg
Initial value:
= "Available commands are: adminmsg <msg>,"
" ban <mask> <time> <reason>, bans [deleted] [<ipmask>], clones,"
" dul|deny_unregistered_login [yes|no], kick <mask> [<reason>],"
" k[ick]ban <mask> <time> <reason>, help, games, metrics,"
" netstats [all], [lobby]msg <message>, motd [<message>],"
" pm|privatemsg <nickname> <message>, requests, sample, searchlog <mask>,"
" signout, stats, status [<mask>], unban <ipmask>\n"
"Specific strings (those not inbetween <> like the command names)"
" are case insensitive."

Definition at line 353 of file server.cpp.

Referenced by wesnothd::server::handle_query(), wesnothd::server::help_handler(), and wesnothd::server::process_command().

lg::log_domain wesnothd::log_server("server")
static
int wesnothd::request_sample_frequency = 1

Definition at line 119 of file server.cpp.

Referenced by main(), and wesnothd::server::sample_handler().

SendQueue wesnothd::send_queue

Definition at line 1843 of file server.cpp.