mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-21 21:12:24 +00:00
normalize includes: loginserver
This commit is contained in:
parent
360e01d824
commit
b7fcee632e
@ -33,6 +33,7 @@ add_executable(loginserver ${eqlogin_sources} ${eqlogin_headers})
|
|||||||
install(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(loginserver common)
|
target_link_libraries(loginserver common)
|
||||||
|
target_include_directories(loginserver PRIVATE ..)
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
#include "account_management.h"
|
#include "account_management.h"
|
||||||
#include "login_server.h"
|
|
||||||
#include "../common/event/task_scheduler.h"
|
#include "common/event/task_scheduler.h"
|
||||||
#include "../common/repositories/login_accounts_repository.h"
|
#include "common/repositories/login_accounts_repository.h"
|
||||||
|
#include "loginserver/login_server.h"
|
||||||
|
|
||||||
EQ::Event::TaskScheduler task_runner;
|
EQ::Event::TaskScheduler task_runner;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
#ifndef EQEMU_ACCOUNT_MANAGEMENT_H
|
#pragma once
|
||||||
#define EQEMU_ACCOUNT_MANAGEMENT_H
|
|
||||||
|
|
||||||
#include "iostream"
|
#include "common/types.h"
|
||||||
#include "../common/types.h"
|
#include "loginserver/login_types.h"
|
||||||
#include "login_types.h"
|
#include "loginserver/encryption.h"
|
||||||
#include "encryption.h"
|
#include "loginserver/login_server.h"
|
||||||
#include "login_server.h"
|
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
extern Database database;
|
extern Database database;
|
||||||
@ -28,6 +26,3 @@ public:
|
|||||||
const std::string &ip_address = ""
|
const std::string &ip_address = ""
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //EQEMU_ACCOUNT_MANAGEMENT_H
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
#ifndef EQEMU_CLIENT_H
|
#ifndef EQEMU_CLIENT_H
|
||||||
#define EQEMU_CLIENT_H
|
#define EQEMU_CLIENT_H
|
||||||
|
|
||||||
#include "../common/global_define.h"
|
|
||||||
#include "../common/opcodemgr.h"
|
#include "../common/opcodemgr.h"
|
||||||
#include "../common/random.h"
|
#include "../common/random.h"
|
||||||
#include "../common/eq_stream_intf.h"
|
#include "../common/eq_stream_intf.h"
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
#include "client_manager.h"
|
#include "client_manager.h"
|
||||||
#include "login_server.h"
|
|
||||||
|
#include "common/file.h"
|
||||||
|
#include "common/misc.h"
|
||||||
|
#include "common/path_manager.h"
|
||||||
|
#include "loginserver/login_server.h"
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
extern bool run_server;
|
extern bool run_server;
|
||||||
|
|
||||||
#include "../common/misc.h"
|
|
||||||
#include "../common/path_manager.h"
|
|
||||||
#include "../common/file.h"
|
|
||||||
|
|
||||||
void CheckTitaniumOpcodeFile(const std::string &path)
|
void CheckTitaniumOpcodeFile(const std::string &path)
|
||||||
{
|
{
|
||||||
if (File::Exists(path)) {
|
if (File::Exists(path)) {
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
#ifndef EQEMU_CLIENTMANAGER_H
|
#pragma once
|
||||||
#define EQEMU_CLIENTMANAGER_H
|
|
||||||
|
#include "common/net/eqstream.h"
|
||||||
|
#include "common/opcodemgr.h"
|
||||||
|
#include "loginserver/client.h"
|
||||||
|
|
||||||
#include "../common/global_define.h"
|
|
||||||
#include "../common/opcodemgr.h"
|
|
||||||
#include "../common/net/eqstream.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class ClientManager {
|
class ClientManager {
|
||||||
@ -25,6 +24,3 @@ private:
|
|||||||
OpcodeManager *m_larion_ops;
|
OpcodeManager *m_larion_ops;
|
||||||
EQ::Net::EQStreamManager *m_larion_stream;
|
EQ::Net::EQStreamManager *m_larion_stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/eqemu_logsys.h"
|
||||||
|
#include "common/strings.h"
|
||||||
|
#include "common/types.h"
|
||||||
|
#include "loginserver/login_types.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../common/types.h"
|
|
||||||
#include "login_types.h"
|
|
||||||
#include "../common/eqemu_logsys.h"
|
|
||||||
#include "../common/strings.h"
|
|
||||||
|
|
||||||
enum EncryptionMode {
|
enum EncryptionMode {
|
||||||
EncryptionModeMD5 = 1,
|
EncryptionModeMD5 = 1,
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
#ifndef EQEMUCAPI__H
|
#pragma once
|
||||||
#define EQEMUCAPI__H
|
|
||||||
|
|
||||||
char* DecryptUsernamePassword(const char* encryptedBuffer, unsigned int bufferSize, int mode);
|
char* DecryptUsernamePassword(const char* encryptedBuffer, unsigned int bufferSize, int mode);
|
||||||
char* Encrypt(const char* buffer, unsigned int bufferSize, unsigned int &outSize);
|
char* Encrypt(const char* buffer, unsigned int bufferSize, unsigned int &outSize);
|
||||||
void _HeapDeleteCharBuffer(char *buffer);
|
void _HeapDeleteCharBuffer(char *buffer);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
#ifndef EQEMU_LOGINSERVER_H
|
#pragma once
|
||||||
#define EQEMU_LOGINSERVER_H
|
|
||||||
|
#include "common/json_config.h"
|
||||||
|
#include "loginserver/client_manager.h"
|
||||||
|
#include "loginserver/encryption.h"
|
||||||
|
#include "loginserver/loginserver_webserver.h"
|
||||||
|
#include "loginserver/options.h"
|
||||||
|
#include "loginserver/world_server_manager.h"
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "../common/json_config.h"
|
|
||||||
#include "encryption.h"
|
|
||||||
#include "options.h"
|
|
||||||
#include "world_server_manager.h"
|
|
||||||
#include "client_manager.h"
|
|
||||||
#include "loginserver_webserver.h"
|
|
||||||
|
|
||||||
struct LoginServer {
|
struct LoginServer {
|
||||||
public:
|
public:
|
||||||
@ -23,6 +23,3 @@ public:
|
|||||||
WorldServerManager *server_manager;
|
WorldServerManager *server_manager;
|
||||||
ClientManager *client_manager{};
|
ClientManager *client_manager{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
#ifndef EQEMU_LOGINSTRUCTURES_H
|
#pragma once
|
||||||
#define EQEMU_LOGINSTRUCTURES_H
|
|
||||||
|
|
||||||
|
#include "common/types.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#pragma pack(push)
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
// unencrypted base message header in all packets
|
// unencrypted base message header in all packets
|
||||||
@ -161,5 +165,4 @@ namespace LS {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
#include <iostream>
|
|
||||||
#include <random>
|
|
||||||
#include "loginserver_command_handler.h"
|
#include "loginserver_command_handler.h"
|
||||||
#include "../common/util/uuid.h"
|
|
||||||
#include "login_server.h"
|
#include "common/repositories/login_api_tokens_repository.h"
|
||||||
#include "loginserver_webserver.h"
|
#include "common/util/uuid.h"
|
||||||
#include "account_management.h"
|
#include "loginserver/account_management.h"
|
||||||
#include "../common/repositories/login_api_tokens_repository.h"
|
#include "loginserver/login_server.h"
|
||||||
|
#include "loginserver/loginserver_webserver.h"
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
#include "iostream"
|
#pragma once
|
||||||
#include "../common/cli/eqemu_command_handler.h"
|
|
||||||
|
|
||||||
#ifndef EQEMU_LOGINSERVER_COMMAND_HANDLER_H
|
#include "common/cli/eqemu_command_handler.h"
|
||||||
#define EQEMU_LOGINSERVER_COMMAND_HANDLER_H
|
|
||||||
|
|
||||||
namespace LoginserverCommandHandler {
|
namespace LoginserverCommandHandler {
|
||||||
void CommandHandler(int argc, char **argv);
|
void CommandHandler(int argc, char **argv);
|
||||||
@ -16,6 +14,3 @@ namespace LoginserverCommandHandler {
|
|||||||
void UpdateLoginserverWorldAdminAccountPassword(int argc, char **argv, argh::parser &cmd, std::string &description);
|
void UpdateLoginserverWorldAdminAccountPassword(int argc, char **argv, argh::parser &cmd, std::string &description);
|
||||||
void HealthCheckLogin(int argc, char **argv, argh::parser &cmd, std::string &description);
|
void HealthCheckLogin(int argc, char **argv, argh::parser &cmd, std::string &description);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //EQEMU_LOGINSERVER_COMMAND_HANDLER_H
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
#include "loginserver_webserver.h"
|
#include "loginserver_webserver.h"
|
||||||
#include "world_server_manager.h"
|
|
||||||
#include "login_server.h"
|
#include "common/json/json.h"
|
||||||
#include "../common/json/json.h"
|
#include "common/repositories/login_api_tokens_repository.h"
|
||||||
#include "../common/strings.h"
|
#include "common/strings.h"
|
||||||
#include "account_management.h"
|
#include "loginserver/account_management.h"
|
||||||
#include "../common/repositories/login_api_tokens_repository.h"
|
#include "loginserver/login_server.h"
|
||||||
|
#include "loginserver/world_server_manager.h"
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
#ifndef EQEMU_LOGINSERVER_WEBSERVER_H
|
#pragma once
|
||||||
#define EQEMU_LOGINSERVER_WEBSERVER_H
|
|
||||||
|
|
||||||
#include "../common/http/httplib.h"
|
#include "common/http/httplib.h"
|
||||||
#include "../common/json/json.h"
|
#include "common/json/json.h"
|
||||||
#include "../common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
namespace LoginserverWebserver {
|
namespace LoginserverWebserver {
|
||||||
|
|
||||||
@ -35,5 +34,3 @@ namespace LoginserverWebserver {
|
|||||||
void SendResponse(const Json::Value &payload, httplib::Response &res);
|
void SendResponse(const Json::Value &payload, httplib::Response &res);
|
||||||
static Json::Value ParseRequestBody(const httplib::Request &request);
|
static Json::Value ParseRequestBody(const httplib::Request &request);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //EQEMU_LOGINSERVER_WEBSERVER_H
|
|
||||||
|
|||||||
@ -1,34 +1,30 @@
|
|||||||
#include "../common/global_define.h"
|
#include "common/crash.h"
|
||||||
#include "../common/types.h"
|
#include "common/database.h"
|
||||||
#include "../common/opcodemgr.h"
|
#include "common/eqemu_logsys.h"
|
||||||
#include "../common/event/event_loop.h"
|
#include "common/event/event_loop.h"
|
||||||
#include "../common/timer.h"
|
#include "common/events/player_event_logs.h"
|
||||||
#include "../common/platform.h"
|
#include "common/http/httplib.h"
|
||||||
#include "../common/crash.h"
|
#include "common/opcodemgr.h"
|
||||||
#include "../common/eqemu_logsys.h"
|
#include "common/path_manager.h"
|
||||||
#include "../common/http/httplib.h"
|
#include "common/platform.h"
|
||||||
#include "login_server.h"
|
#include "common/strings.h"
|
||||||
#include "loginserver_webserver.h"
|
#include "common/timer.h"
|
||||||
#include "loginserver_command_handler.h"
|
#include "common/types.h"
|
||||||
#include "../common/strings.h"
|
#include "common/zone_store.h"
|
||||||
#include "../common/path_manager.h"
|
#include "loginserver/login_server.h"
|
||||||
#include "../common/database.h"
|
#include "loginserver/loginserver_command_handler.h"
|
||||||
#include "../common/events/player_event_logs.h"
|
#include "loginserver/loginserver_webserver.h"
|
||||||
#include "../common/zone_store.h"
|
|
||||||
#include <time.h>
|
#include <sstream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
LoginServer server;
|
LoginServer server;
|
||||||
bool run_server = true;
|
bool run_server = true;
|
||||||
Database database;
|
Database database;
|
||||||
|
|
||||||
void CatchSignal(int sig_num)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void LoadDatabaseConnection()
|
void LoadDatabaseConnection()
|
||||||
{
|
{
|
||||||
LogInfo("MySQL Database Init");
|
LogInfo("MySQL Database Init");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#ifndef EQEMU_OPTIONS_H
|
#pragma once
|
||||||
#define EQEMU_OPTIONS_H
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class Options {
|
class Options {
|
||||||
public:
|
public:
|
||||||
@ -51,7 +52,3 @@ private:
|
|||||||
std::string m_eqemu_loginserver_address;
|
std::string m_eqemu_loginserver_address;
|
||||||
std::string m_default_loginserver_name;
|
std::string m_default_loginserver_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
#include "world_server.h"
|
#include "world_server.h"
|
||||||
#include "login_server.h"
|
|
||||||
#include "login_types.h"
|
#include "common/ip_util.h"
|
||||||
#include "../common/ip_util.h"
|
#include "common/repositories/login_server_admins_repository.h"
|
||||||
#include "../common/strings.h"
|
#include "common/repositories/login_world_servers_repository.h"
|
||||||
#include "../common/repositories/login_world_servers_repository.h"
|
#include "common/strings.h"
|
||||||
#include "../common/repositories/login_server_admins_repository.h"
|
#include "loginserver/login_server.h"
|
||||||
|
#include "loginserver/login_types.h"
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
extern Database database;
|
extern Database database;
|
||||||
|
|||||||
@ -1,16 +1,15 @@
|
|||||||
#ifndef EQEMU_WORLDSERVER_H
|
#pragma once
|
||||||
#define EQEMU_WORLDSERVER_H
|
|
||||||
|
#include "common/event/timer.h"
|
||||||
|
#include "common/net/servertalk_server_connection.h"
|
||||||
|
#include "common/packet_dump.h"
|
||||||
|
#include "common/repositories/login_server_admins_repository.h"
|
||||||
|
#include "common/servertalk.h"
|
||||||
|
#include "loginserver/client.h"
|
||||||
|
#include "loginserver/login_types.h"
|
||||||
|
|
||||||
#include "../common/global_define.h"
|
|
||||||
#include "../common/net/servertalk_server_connection.h"
|
|
||||||
#include "../common/servertalk.h"
|
|
||||||
#include "../common/packet_dump.h"
|
|
||||||
#include "../common/event/timer.h"
|
|
||||||
#include "login_types.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include "../common/repositories/login_server_admins_repository.h"
|
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* World server class, controls the connected server processing.
|
* World server class, controls the connected server processing.
|
||||||
@ -84,6 +83,3 @@ private:
|
|||||||
|
|
||||||
static void FormatWorldServerName(char *name, int8 server_list_type);
|
static void FormatWorldServerName(char *name, int8 server_list_type);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
#include "world_server_manager.h"
|
#include "world_server_manager.h"
|
||||||
#include "login_server.h"
|
|
||||||
#include "login_types.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "../common/eqemu_logsys.h"
|
#include "common/eqemu_logsys.h"
|
||||||
#include "../common/ip_util.h"
|
#include "common/ip_util.h"
|
||||||
|
#include "loginserver/login_server.h"
|
||||||
|
#include "loginserver/login_types.h"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
extern LoginServer server;
|
extern LoginServer server;
|
||||||
extern bool run_server;
|
extern bool run_server;
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
#ifndef EQEMU_SERVERMANAGER_H
|
#pragma once
|
||||||
#define EQEMU_SERVERMANAGER_H
|
|
||||||
|
#include "common/net/servertalk_server.h"
|
||||||
|
#include "common/packet_dump.h"
|
||||||
|
#include "common/servertalk.h"
|
||||||
|
#include "loginserver/client.h"
|
||||||
|
#include "loginserver/world_server.h"
|
||||||
|
|
||||||
#include "../common/global_define.h"
|
|
||||||
#include "../common/servertalk.h"
|
|
||||||
#include "../common/packet_dump.h"
|
|
||||||
#include "../common/net/servertalk_server.h"
|
|
||||||
#include "world_server.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class WorldServerManager {
|
class WorldServerManager {
|
||||||
@ -26,8 +25,4 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
|
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
|
||||||
std::list<std::unique_ptr<WorldServer>> m_world_servers;
|
std::list<std::unique_ptr<WorldServer>> m_world_servers;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user