*/
#include "irrlicht.h" // createDevice
-
-#include "mainmenumanager.h"
#include "irrlichttypes_extrabloated.h"
#include "chat_interface.h"
#include "debug.h"
#include "server.h"
#include "filesys.h"
#include "version.h"
-#include "guiMainMenu.h"
#include "game.h"
#include "defaultsettings.h"
#include "gettext.h"
#include "log.h"
#include "quicktune.h"
#include "httpfetch.h"
-#include "guiEngine.h"
#include "gameparams.h"
-#include "database.h"
+#include "database/database.h"
#include "config.h"
+#include "player.h"
#include "porting.h"
+#include "network/socket.h"
#if USE_CURSES
#include "terminal_chat_console.h"
#endif
#ifndef SERVER
+#include "gui/guiMainMenu.h"
#include "client/clientlauncher.h"
+#include "gui/guiEngine.h"
+#include "gui/mainmenumanager.h"
#endif
#ifdef HAVE_TOUCHSCREENGUI
- #include "touchscreengui.h"
+ #include "gui/touchscreengui.h"
#endif
#if !defined(SERVER) && \
return 1;
}
- // Initialize debug stacks
- DSTACK(FUNCTION_NAME);
-
// Debug handler
BEGIN_DEBUG_EXCEPTION_HANDLER
static void print_version()
{
std::cout << PROJECT_NAME_C " " << g_version_hash
- << " (" << porting::getPlatformName() << ")" << std::endl;
+ << " (" << porting::getPlatformName() << ")" << std::endl;
#ifndef SERVER
- std::cout << "Using Irrlicht " << IRRLICHT_SDK_VERSION << std::endl;
+ std::cout << "Using Irrlicht " IRRLICHT_SDK_VERSION << std::endl;
#endif
- std::cout << "Build info: " << g_build_info << std::endl;
+ std::cout << g_build_info << std::endl;
}
static void list_game_ids()
std::string name = worldspec.name;
std::string path = worldspec.path;
if (name.find(' ') != std::string::npos)
- name = std::string("'") + name + "'";
- path = std::string("'") + path + "'";
+ name = std::string("'").append(name).append("'");
+ path = std::string("'").append(path).append("'");
name = padStringRight(name, 14);
os << " " << name << " " << path << std::endl;
}
*****************************************************************************/
static bool run_dedicated_server(const GameParams &game_params, const Settings &cmd_args)
{
- DSTACK("Dedicated server branch");
-
verbosestream << _("Using world path") << " ["
<< game_params.world_path << "]" << std::endl;
verbosestream << _("Using gameid") << " ["
try {
// Create server
Server server(game_params.world_path, game_params.game_spec,
- false, bind_addr.isIPv6(), true, &iface);
+ false, bind_addr, true, &iface);
g_term_console.setup(&iface, &kill, admin_nick);
g_term_console.start();
- server.start(bind_addr);
+ server.start();
// Run server
dedicated_server_loop(server, kill);
} catch (const ModError &e) {
try {
// Create server
Server server(game_params.world_path, game_params.game_spec, false,
- bind_addr.isIPv6(), true);
- server.start(bind_addr);
+ bind_addr, true);
+ server.start();
// Run server
bool &kill = *porting::signal_handler_killstatus();