Wesnoth-Server, for multiplayer-games. More...
#include "server/wesnothd/server.hpp"
#include "config.hpp"
#include "filesystem.hpp"
#include "game_config.hpp"
#include "log.hpp"
#include "multiplayer_error_codes.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode.hpp"
#include "utils/general.hpp"
#include "utils/iterable_pair.hpp"
#include "game_version.hpp"
#include "server/wesnothd/ban.hpp"
#include "server/wesnothd/game.hpp"
#include "server/wesnothd/metrics.hpp"
#include "server/wesnothd/player.hpp"
#include "server/wesnothd/player_network.hpp"
#include "server/common/simple_wml.hpp"
#include "server/common/user_handler.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/scope_exit.hpp>
#include <algorithm>
#include <cassert>
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
Go to the source code of this file.
Namespaces | |
wesnothd | |
Macros | |
#define | ERR_SERVER LOG_STREAM(err, log_server) |
fatal and directly server related errors/warnings, ie not caused by erroneous client data More... | |
#define | WRN_SERVER LOG_STREAM(warn, log_server) |
clients send wrong/unexpected data More... | |
#define | LOG_SERVER LOG_STREAM(info, log_server) |
normal events More... | |
#define | DBG_SERVER LOG_STREAM(debug, log_server) |
#define | ERR_CONFIG LOG_STREAM(err, log_config) |
#define | WRN_CONFIG LOG_STREAM(warn, log_config) |
#define | SETUP_HANDLER(name, function) |
#define | FIFODIR "/var/run/wesnothd" |
Functions | |
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 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 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 std::string | wesnothd::player_status (const wesnothd::player_record &player) |
int | main (int argc, char **argv) |
Variables | |
static lg::log_domain | log_server ("server") |
static lg::log_domain | log_config ("config") |
int | wesnothd::request_sample_frequency = 1 |
version_info | wesnothd::secure_version = version_info("1.14.4") |
const std::string | wesnothd::denied_msg = "You're not allowed to execute this command." |
const std::string | wesnothd::help_msg |
Wesnoth-Server, for multiplayer-games.
Definition in file server.cpp.
#define DBG_SERVER LOG_STREAM(debug, log_server) |
Definition at line 77 of file server.cpp.
Referenced by wesnothd::server::handle_create_game(), wesnothd::server::handle_join_game(), and wesnothd::server::handle_player_in_game().
#define ERR_CONFIG LOG_STREAM(err, log_config) |
Definition at line 80 of file server.cpp.
Referenced by wesnothd::server::read_config().
#define ERR_SERVER LOG_STREAM(err, log_server) |
fatal and directly server related errors/warnings, ie not caused by erroneous client data
Definition at line 70 of file server.cpp.
Referenced by wesnothd::server::bans_handler(), wesnothd::server::delete_game(), wesnothd::server::dul_handler(), wesnothd::server::dummy_player_updates(), wesnothd::server::dump_stats(), wesnothd::server::handle_player_in_game(), wesnothd::server::load_config(), main(), wesnothd::server::process_command(), wesnothd::server::refresh_tournaments(), wesnothd::server::setup_fifo(), and wesnothd::server::start_new_server().
#define FIFODIR "/var/run/wesnothd" |
Referenced by wesnothd::server::load_config().
#define LOG_SERVER LOG_STREAM(info, log_server) |
normal events
Definition at line 76 of file server.cpp.
Referenced by wesnothd::server::adminmsg_handler(), wesnothd::server::authenticate(), wesnothd::server::cleanup_game(), wesnothd::server::dummy_player_updates(), wesnothd::server::dump_stats(), wesnothd::server::handle_message(), wesnothd::server::handle_player_in_game(), wesnothd::server::handle_query(), wesnothd::server::handle_read_from_fifo(), wesnothd::server::is_login_allowed(), wesnothd::server::lobbymsg_handler(), wesnothd::server::login_client(), wesnothd::server::msg_handler(), wesnothd::server::read_config(), wesnothd::server::remove_player(), wesnothd::server::setup_fifo(), and wesnothd::server::start_new_server().
#define SETUP_HANDLER | ( | name, | |
function | |||
) |
Referenced by wesnothd::server::setup_handlers().
#define WRN_CONFIG LOG_STREAM(warn, log_config) |
Definition at line 81 of file server.cpp.
#define WRN_SERVER LOG_STREAM(warn, log_server) |
clients send wrong/unexpected data
Definition at line 73 of file server.cpp.
Referenced by wesnothd::server::handle_join_game(), wesnothd::server::handle_player_in_game(), wesnothd::server::handle_query(), and wesnothd::server::handle_sighup().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 2970 of file server.cpp.
References lg::debug(), dump_wml, lg::err(), ERR_SERVER, filesystem::get_cwd(), lg::logger::get_severity(), lg::info(), p, game_config::path, PLAIN_LOG, wesnothd::request_sample_frequency, server_base::run(), s, lg::set_log_domain_severity(), version_info::str(), lg::timestamps(), lg::warn(), and game_config::wesnoth_version.
|
static |
|
static |