The Battle for Wesnoth  1.19.5+dev
Namespaces | Macros | Functions | Variables
server.cpp File Reference

Wesnoth-Server, for multiplayer-games. More...

#include "server/wesnothd/server.hpp"
#include "config.hpp"
#include "filesystem.hpp"
#include "log.hpp"
#include "multiplayer_error_codes.hpp"
#include "serialization/chrono.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode.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 <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <vector>
Include dependency graph for server.cpp:

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
 

Detailed Description

Wesnoth-Server, for multiplayer-games.

Definition in file server.cpp.

Macro Definition Documentation

◆ DBG_SERVER

#define DBG_SERVER   LOG_STREAM(debug, log_server)

Definition at line 73 of file server.cpp.

◆ ERR_CONFIG

#define ERR_CONFIG   LOG_STREAM(err, log_config)

Definition at line 76 of file server.cpp.

◆ ERR_SERVER

#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 66 of file server.cpp.

◆ FIFODIR

#define FIFODIR   "/var/run/wesnothd"

◆ LOG_SERVER

#define LOG_SERVER   LOG_STREAM(info, log_server)

normal events

Definition at line 72 of file server.cpp.

◆ SETUP_HANDLER

#define SETUP_HANDLER (   name,
  function 
)
Value:
cmd_handlers_[name] = std::bind(function, this, \
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);

◆ WRN_CONFIG

#define WRN_CONFIG   LOG_STREAM(warn, log_config)

Definition at line 77 of file server.cpp.

◆ WRN_SERVER

#define WRN_SERVER   LOG_STREAM(warn, log_server)

clients send wrong/unexpected data

Definition at line 69 of file server.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ log_config

lg::log_domain log_config("config") ( "config"  )
static

◆ log_server

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