Namespaces | |
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_t |
struct | name_t |
class | player |
class | player_record |
class | server |
struct | socket_t |
Typedefs | |
typedef std::shared_ptr< banned > | banned_ptr |
typedef std::set< banned_ptr, banned_compare_subnet > | ban_set |
typedef std::list< banned_ptr > | deleted_ban_list |
typedef std::priority_queue< banned_ptr, std::vector< banned_ptr >, banned_compare > | ban_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_ptr > | user_vector |
typedef std::vector< socket_ptr > | 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 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 > > > > |
using | SendQueue = std::map< socket_ptr, std::queue< std::shared_ptr< simple_wml::document > >> |
Functions | |
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::node & | get_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) |
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 |
SendQueue | send_queue |
typedef std::set<banned_ptr,banned_compare_subnet > wesnothd::ban_set |
typedef std::priority_queue<banned_ptr,std::vector<banned_ptr>, banned_compare> wesnothd::ban_time_queue |
typedef std::shared_ptr<banned> wesnothd::banned_ptr |
typedef std::map<std::string, std::size_t> wesnothd::default_ban_times |
typedef std::list<banned_ptr> wesnothd::deleted_ban_list |
typedef std::pair<unsigned int, unsigned int> wesnothd::ip_mask |
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 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 97 of file player_connection.hpp.
using wesnothd::SendQueue = typedef std::map<socket_ptr, std::queue<std::shared_ptr<simple_wml::document> >> |
Definition at line 1814 of file server.cpp.
typedef std::vector<socket_ptr> wesnothd::side_vector |
typedef std::vector<socket_ptr> wesnothd::user_vector |
|
static |
returns const so that operator [] won't create empty keys if not existent
Definition at line 156 of file game.cpp.
References simple_wml::node::child(), and ERR_GAME.
Referenced by wesnothd::game::allow_observers(), wesnothd::game::is_reload(), wesnothd::game::registered_users_only(), and wesnothd::game::start_game().
|
static |
Definition at line 1817 of file server.cpp.
References async_send_doc().
Referenced by send_to_player().
|
static |
Definition at line 1816 of file game.cpp.
Referenced by wesnothd::game::get_replay_filename().
|
static |
Definition at line 89 of file server.cpp.
References simple_wml::node::add_child(), simple_wml::document::child(), simple_wml::node::children(), simple_wml::node::copy_into(), utf8::index(), utf8::insert(), simple_wml::document::root(), and simple_wml::node::set_attr_int().
Referenced by wesnothd::server::add_player(), and wesnothd::server::handle_player_in_game().
|
static |
Definition at line 150 of file server.cpp.
References simple_wml::node::add_child(), simple_wml::document::child(), simple_wml::node::children(), simple_wml::node::copy_into(), gui2::event::find(), utf8::index(), utf8::insert(), simple_wml::document::root(), and simple_wml::node::set_attr_int().
Referenced by wesnothd::server::delete_game(), wesnothd::server::handle_join_game(), wesnothd::server::handle_player_in_game(), and wesnothd::server::update_game_in_lobby().
|
static |
Definition at line 117 of file server.cpp.
References simple_wml::node::add_child(), simple_wml::document::child(), simple_wml::node::children(), gui2::event::find(), utf8::index(), simple_wml::document::root(), and simple_wml::node::set_attr_int().
Referenced by wesnothd::server::cleanup_game(), and wesnothd::server::remove_player().
std::ostream & wesnothd::operator<< | ( | std::ostream & | o, |
const banned & | n | ||
) |
Definition at line 36 of file ban.cpp.
References wesnothd::banned::get_human_end_time(), wesnothd::banned::get_human_start_time(), wesnothd::banned::get_ip(), wesnothd::banned::get_nick(), wesnothd::banned::get_reason(), and wesnothd::banned::get_who_banned().
ip_mask wesnothd::parse_ip | ( | const std::string & | ip | ) |
Definition at line 122 of file ban.cpp.
References error(), wesnothd::banned::mask(), and utils::split().
Referenced by wesnothd::banned::banned(), wesnothd::ban_manager::is_ip_banned(), wesnothd::ban_manager::list_bans(), wesnothd::ban_manager::list_deleted_bans(), and wesnothd::banned::read().
|
static |
Definition at line 191 of file server.cpp.
References client_address(), wesnothd::player_record::name(), and wesnothd::player_record::socket().
Referenced by wesnothd::server::clones_handler(), wesnothd::server::searchlog_handler(), and wesnothd::server::status_handler().
void wesnothd::send_server_message | ( | socket_ptr | socket, |
const std::string & | message | ||
) |
Definition at line 1838 of file server.cpp.
References simple_wml::node::add_child(), wfl::msg(), simple_wml::document::root(), send_to_player(), game_config::sounds::server_message, simple_wml::node::set_attr(), and simple_wml::node::set_attr_dup().
Referenced by wesnothd::server::add_player(), wesnothd::server::handle_create_game(), wesnothd::server::handle_join_game(), wesnothd::server::handle_message(), wesnothd::server::handle_nickserv(), wesnothd::server::handle_player_in_game(), wesnothd::server::handle_query(), wesnothd::server::handle_whisper(), wesnothd::server::is_login_allowed(), wesnothd::server::send_server_message_to_all(), and wesnothd::server::send_server_message_to_lobby().
void wesnothd::send_to_player | ( | socket_ptr | socket, |
simple_wml::document & | doc | ||
) |
Definition at line 1827 of file server.cpp.
References async_send_doc(), simple_wml::document::clone(), and handle_send_to_player().
Referenced by wesnothd::server::add_player(), wesnothd::game::add_player(), wesnothd::server::adminmsg_handler(), wesnothd::game::change_controller(), wesnothd::server::delete_game(), wesnothd::game::handle_controller_choice(), wesnothd::server::handle_create_game(), wesnothd::server::handle_player_in_game(), wesnothd::server::handle_read_from_player(), wesnothd::server::handle_whisper(), wesnothd::game::load_next_scenario(), wesnothd::game::notify_new_host(), wesnothd::server::pm_handler(), wesnothd::server::read_version(), wesnothd::game::remove_player(), wesnothd::game::send_history(), wesnothd::game::send_leave_game(), wesnothd::game::send_observerjoins(), wesnothd::game::send_server_message(), send_server_message(), wesnothd::game::send_taken_side(), wesnothd::server::send_to_lobby(), and send_to_players().
void wesnothd::send_to_players | ( | simple_wml::document & | data, |
const Container & | players, | ||
socket_ptr | exclude = socket_ptr() |
||
) |
Definition at line 77 of file game.cpp.
References send_to_player().
Referenced by wesnothd::game::process_turn(), wesnothd::game::send_data(), and wesnothd::game::send_data_sides().
const std::string wesnothd::denied_msg = "You're not allowed to execute this command." |
Definition at line 207 of file server.cpp.
Referenced by wesnothd::server::restart_handler(), wesnothd::server::sample_handler(), and wesnothd::server::shut_down_handler().
const std::string wesnothd::help_msg |
Definition at line 208 of file server.cpp.
Referenced by wesnothd::server::help_handler(), and wesnothd::server::process_command().
|
static |
int wesnothd::request_sample_frequency = 1 |
Definition at line 86 of file server.cpp.
Referenced by main(), and wesnothd::server::sample_handler().
version_info wesnothd::secure_version = version_info("1.14.4") |
Definition at line 87 of file server.cpp.
SendQueue wesnothd::send_queue |
Definition at line 1815 of file server.cpp.