The Battle for Wesnoth  1.15.0-dev
Namespaces | Classes | Typedefs | Functions | Variables
wesnothd Namespace Reference




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_t
struct  name_t
class  player
class  player_record
class  server
struct  socket_t


typedef std::shared_ptr< bannedbanned_ptr
typedef std::set< banned_ptr, banned_compare_subnetban_set
typedef std::list< banned_ptrdeleted_ban_list
typedef std::priority_queue< banned_ptr, std::vector< banned_ptr >, banned_compareban_time_queue
typedef std::map< std::string, std::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 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
using SendQueue = std::map< socket_ptr, std::deque< std::shared_ptr< simple_wml::document > >>


std::ostream & operator<< (std::ostream &o, const banned &n)
ip_mask parse_ip (const std::string &ip)
template<typename Container >
void send_to_players (simple_wml::document &data, const Container &players, socket_ptr exclude=socket_ptr())
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)
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 handle_send_to_player (socket_ptr socket)
void send_to_player (socket_ptr socket, simple_wml::document &doc)
void send_server_message (socket_ptr socket, const std::string &message)


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

Typedef Documentation

◆ ban_set

Definition at line 48 of file ban.hpp.

◆ ban_time_queue

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

Definition at line 50 of file ban.hpp.

◆ banned_ptr

typedef std::shared_ptr<banned> wesnothd::banned_ptr

Definition at line 33 of file ban.hpp.

◆ default_ban_times

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

Definition at line 51 of file ban.hpp.

◆ deleted_ban_list

Definition at line 49 of file ban.hpp.

◆ ip_mask

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

Definition at line 52 of file ban.hpp.

◆ player_connections

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 74 of file player_connection.hpp.

◆ SendQueue

using wesnothd::SendQueue = typedef std::map<socket_ptr, std::deque<std::shared_ptr<simple_wml::document> >>

Definition at line 1865 of file server.cpp.

◆ side_vector

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

Definition at line 33 of file game.hpp.

◆ user_vector

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

Definition at line 32 of file game.hpp.

Function Documentation

◆ get_multiplayer()

static const simple_wml::node& wesnothd::get_multiplayer ( const simple_wml::node root)

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

Definition at line 155 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().

◆ handle_send_to_player()

static void wesnothd::handle_send_to_player ( socket_ptr  socket)

Definition at line 1868 of file server.cpp.

References async_send_doc().

Referenced by send_to_player().

◆ is_invalid_filename_char()

static bool wesnothd::is_invalid_filename_char ( char  c)

Definition at line 1799 of file game.cpp.

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

◆ make_add_diff()

static void wesnothd::make_add_diff ( const simple_wml::node src,
const char *  gamelist,
const char *  type,
simple_wml::document out,
int  index = -1 

◆ make_change_diff()

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 

◆ make_delete_diff()

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 

◆ operator<<()

std::ostream & wesnothd::operator<< ( std::ostream &  o,
const banned n 

◆ parse_ip()

ip_mask wesnothd::parse_ip ( const std::string &  ip)

◆ player_status()

static std::string wesnothd::player_status ( const wesnothd::player_record player)

◆ send_server_message()

void wesnothd::send_server_message ( socket_ptr  socket,
const std::string &  message 

◆ send_to_player()

void wesnothd::send_to_player ( socket_ptr  socket,
simple_wml::document doc 

◆ send_to_players()

template<typename Container >
void wesnothd::send_to_players ( simple_wml::document data,
const Container &  players,
socket_ptr  exclude = socket_ptr() 

Variable Documentation

◆ denied_msg

const std::string wesnothd::denied_msg = "You're not allowed to execute this command."

◆ help_msg

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 in between <> like the command names)"
" are case insensitive."

Definition at line 209 of file server.cpp.

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

◆ log_server

lg::log_domain wesnothd::log_server("server")

◆ request_sample_frequency

int wesnothd::request_sample_frequency = 1

Definition at line 87 of file server.cpp.

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

◆ secure_version

version_info wesnothd::secure_version = version_info("1.14.4")

Definition at line 88 of file server.cpp.

◆ send_queue

SendQueue wesnothd::send_queue

Definition at line 1866 of file server.cpp.