Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Main.cpp File Reference

Authentication Server main program. More...

#include <openssl/crypto.h>
#include <openssl/opensslv.h>
#include <mysql.h>
#include <csignal>
#include <filesystem>
#include <memory>
#include "Common.h"
#include "Database/DatabaseSetup/DatabaseSetup.h"
#include "Database/DatabaseSetup/DatabaseSetupRuntime.h"
#include "Configuration/Config.h"
#include "Database/DatabaseEnv.h"
#include "Log.h"
#include "OpenSSLProviders.h"
#include "PacketLogServer.h"
#include "Platform/TimeUtils.h"
#include "RealmAcceptor.h"
#include "RealmList.h"
#include "SystemConfig.h"
#include "Util.h"
Include dependency graph for Main.cpp:

Go to the source code of this file.

Macros

#define _SKYFIRE_AUTH_DATABASE   ""
#define _SKYFIRE_AUTH_DATABASE_HOST   ""
#define _SKYFIRE_AUTH_DATABASE_PASS   ""
#define _SKYFIRE_AUTH_DATABASE_PORT   ""
#define _SKYFIRE_AUTH_DATABASE_USER   ""
#define _SKYFIRE_REALM_CONFIG   "authserver.conf"

Functions

void AuthServerSignalHandler (int sigNum)
int main (int argc, char **argv)
 Launch the auth server.
bool StartDB (const char *host, const char *port, const char *user, const char *pass, const char *database, bool noUseConfigDatabaseInfo)
 Initialize connection to the database.
void StopDB ()
 Close the connection to the database.
void usage (const char *prog)
 Print out the usage string for this program on the console.

Variables

LoginDatabaseWorkerPool LoginDatabase
bool stopEvent = false

Detailed Description

Authentication Server main program.

This file contains the main program for the authentication server

Definition in file Main.cpp.

Macro Definition Documentation

◆ _SKYFIRE_AUTH_DATABASE

#define _SKYFIRE_AUTH_DATABASE   ""

Definition at line 73 of file Main.cpp.

Referenced by main().

◆ _SKYFIRE_AUTH_DATABASE_HOST

#define _SKYFIRE_AUTH_DATABASE_HOST   ""

Definition at line 57 of file Main.cpp.

Referenced by main().

◆ _SKYFIRE_AUTH_DATABASE_PASS

#define _SKYFIRE_AUTH_DATABASE_PASS   ""

Definition at line 69 of file Main.cpp.

Referenced by main().

◆ _SKYFIRE_AUTH_DATABASE_PORT

#define _SKYFIRE_AUTH_DATABASE_PORT   ""

Definition at line 61 of file Main.cpp.

Referenced by main().

◆ _SKYFIRE_AUTH_DATABASE_USER

#define _SKYFIRE_AUTH_DATABASE_USER   ""

Definition at line 65 of file Main.cpp.

Referenced by main().

◆ _SKYFIRE_REALM_CONFIG

#define _SKYFIRE_REALM_CONFIG   "authserver.conf"

Definition at line 45 of file Main.cpp.

Referenced by main().

Function Documentation

◆ AuthServerSignalHandler()

void AuthServerSignalHandler ( int sigNum)

Definition at line 180 of file Main.cpp.

References stopEvent.

Referenced by main().

◆ main()

◆ StartDB()

bool StartDB ( const char * host,
const char * port,
const char * user,
const char * pass,
const char * database,
bool noUseConfigDatabaseInfo )

Initialize connection to the database.

Definition at line 498 of file Main.cpp.

References MySQL::Library_Init(), LoginDatabase, sConfigMgr, SF_LOG_ERROR, SF_LOG_INFO, and sLog.

Referenced by main().

◆ StopDB()

void StopDB ( )

Close the connection to the database.

Definition at line 561 of file Main.cpp.

References MySQL::Library_End(), and LoginDatabase.

Referenced by main().

◆ usage()

void usage ( const char * prog)

Print out the usage string for this program on the console.

Definition at line 192 of file Main.cpp.

Referenced by Skyfire::FormatProcessMemoryUsage(), Skyfire::FormatSystemMemoryUsage(), Skyfire::GetProcessMemoryUsage(), Skyfire::GetSystemMemoryUsage(), and main().

Variable Documentation

◆ LoginDatabase

LoginDatabaseWorkerPool LoginDatabase

Definition at line 54 of file Main.cpp.

Referenced by AuthSocket::_HandleLogonChallenge(), AuthSocket::_HandleLogonProof(), AuthSocket::_HandleRealmList(), AuthSocket::_HandleReconnectChallenge(), Master::_StartDB(), Master::_StopDB(), World::_UpdateRealmCharCount(), AppenderDB::_write(), LuaGlobalFunctions::AuthDBExecute(), LuaGlobalFunctions::AuthDBQuery(), World::BanAccount(), AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), AccountMgr::ChangeRegEmail(), AccountMgr::ChangeUsername(), RASocket::check_access_level(), RASocket::check_password(), AccountMgr::CheckPassword(), Master::ClearOnlineAccounts(), AccountMgr::CreateAccount(), AccountMgr::DeleteAccount(), AccountMgr::GetEmail(), AccountMgr::GetId(), AccountMgr::GetName(), AccountMgr::GetSecurity(), AccountMgr::GetSecurity(), account_commandscript::HandleAccountAddonCommand(), account_commandscript::HandleAccountBoostAddCommand(), account_commandscript::HandleAccountBoostDelCommand(), account_commandscript::HandleAccountCommand(), account_commandscript::HandleAccountLockCountryCommand(), account_commandscript::HandleAccountLockIpCommand(), account_commandscript::HandleAccountOnlineListCommand(), account_commandscript::HandleAccountSetAddonCommand(), account_commandscript::HandleAccountSetGmLevelCommand(), WorldSocket::HandleAuthSession(), ban_commandscript::HandleBanInfoHelper(), ban_commandscript::HandleBanInfoIPCommand(), ban_commandscript::HandleBanListAccountCommand(), ban_commandscript::HandleBanListHelper(), ban_commandscript::HandleBanListIPCommand(), WorldSession::HandleCharCreateCallback(), gm_commandscript::HandleGMListFullCommand(), gm_commandscript::HandleGMNoteCommand(), lookup_commandscript::HandleLookupPlayerAccountCommand(), lookup_commandscript::HandleLookupPlayerEmailCommand(), lookup_commandscript::HandleLookupPlayerIpCommand(), misc_commandscript::HandleMuteCommand(), misc_commandscript::HandlePInfoCommand(), WorldSession::HandlePlayerLogin(), misc_commandscript::HandleUnmuteCommand(), WorldSession::HandleWhoisOpcode(), World::LoadAutobroadcasts(), World::LoadDBAllowedSecurityLevel(), rbac::RBACData::LoadFromDB(), AccountMgr::LoadRBAC(), main(), World::RemoveBanAccount(), rbac::RBACData::RevokePermission(), Master::Run(), rbac::RBACData::SavePermission(), WorldSession::SetBoosting(), World::SetInitialWorldSettings(), StartDB(), StopDB(), Player::Update(), World::Update(), AccountMgr::UpdateAccountAccess(), RealmList::UpdateRealms(), WorldSession::WorldSession(), and WorldSession::~WorldSession().

◆ stopEvent

bool stopEvent = false

Definition at line 52 of file Main.cpp.

Referenced by AuthServerSignalHandler(), and main().