The Battle for Wesnoth  1.19.5+dev
Namespaces | Classes | Typedefs | Functions | Variables
wesnothd Namespace Reference

Namespaces

 chat_message
 

Classes

struct  banned_compare
 We want to move the lowest value to the top. More...
 
struct  banned_compare_subnet
 
class  banned
 
class  ban_manager
 
class  game
 
class  player
 
class  player_record
 
struct  socket_t
 
struct  name_t
 
struct  game_t
 
class  server
 

Typedefs

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::chrono::seconds > default_ban_times
 
typedef std::pair< unsigned int, unsigned int > ip_mask
 
typedef std::vector< player_iteratoruser_vector
 
typedef std::vector< utils::optional< player_iterator > > side_vector
 
using player_connections = bmi::multi_index_container< player_record, bmi::indexed_by< bmi::ordered_unique< bmi::tag< socket_t >, bmi::const_mem_fun< player_record, const any_socket_ptr, &player_record::socket > >, bmi::hashed_unique< bmi::tag< name_t >, bmi::const_mem_fun< player_record, const std::string &, &player_record::name > >, bmi::ordered_non_unique< bmi::tag< game_t >, bmi::const_mem_fun< player_record, int, &player_record::game_id > > > >
 
typedef player_connections::const_iterator player_iterator
 

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

Variables

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
 

Typedef Documentation

◆ ban_set

Definition at line 52 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 54 of file ban.hpp.

◆ banned_ptr

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

Definition at line 34 of file ban.hpp.

◆ default_ban_times

typedef std::map<std::string, std::chrono::seconds> wesnothd::default_ban_times

Definition at line 55 of file ban.hpp.

◆ deleted_ban_list

Definition at line 53 of file ban.hpp.

◆ ip_mask

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

Definition at line 56 of file ban.hpp.

◆ player_connections

using wesnothd::player_connections = typedef bmi::multi_index_container<player_record, bmi::indexed_by< bmi::ordered_unique<bmi::tag<socket_t>, bmi::const_mem_fun<player_record, const any_socket_ptr, &player_record::socket> >, bmi::hashed_unique<bmi::tag<name_t>, bmi::const_mem_fun<player_record, const std::string&, &player_record::name> >, bmi::ordered_non_unique<bmi::tag<game_t>, bmi::const_mem_fun<player_record, int, &player_record::game_id> > > >

Definition at line 88 of file player_connection.hpp.

◆ player_iterator

typedef player_connections::const_iterator wesnothd::player_iterator

Definition at line 97 of file player_connection.hpp.

◆ side_vector

typedef std::vector<utils::optional<player_iterator> > wesnothd::side_vector

Definition at line 32 of file game.hpp.

◆ user_vector

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

Definition at line 31 of file game.hpp.

Function Documentation

◆ get_multiplayer()

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 136 of file game.cpp.

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

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

◆ is_invalid_filename_char()

static bool wesnothd::is_invalid_filename_char ( char  c)
static

Definition at line 1764 of file game.cpp.

References c.

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

◆ 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 
)
static

◆ 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 
)
static

◆ 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 
)
static

◆ operator<<()

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

Definition at line 38 of file ban.cpp.

References 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)
static

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,"
" [lobby]msg <message>, motd [<message>],"
" pm|privatemsg <nickname> <message>, requests, roll <sides>, sample, searchlog <mask>,"
" signout, stats, status [<mask>], stopgame <nick> [<reason>], unban <ipmask>\n"
"Specific strings (those not in between <> like the command names)"
" are case insensitive."

Definition at line 198 of file server.cpp.

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

◆ log_server

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

◆ request_sample_frequency

int wesnothd::request_sample_frequency = 1

Definition at line 84 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 85 of file server.cpp.

Referenced by wesnothd::server::handle_player().