Server Banner and Status redone
This commit is contained in:
parent
cf04a9518e
commit
fcbc6e77c2
@ -2576,6 +2576,7 @@ enum TrackedAuraType
|
|||||||
// will only support 1.12.1 client (build 5875), 1.12.2 client (build 6005) and 1.12.3 client (build 6141)..
|
// will only support 1.12.1 client (build 5875), 1.12.2 client (build 6005) and 1.12.3 client (build 6141)..
|
||||||
|
|
||||||
#define EXPECTED_MANGOSD_CLIENT_BUILD {5875, 6005, 6141, 0}
|
#define EXPECTED_MANGOSD_CLIENT_BUILD {5875, 6005, 6141, 0}
|
||||||
|
#define EXPECTED_MANGOSD_CLIENT_VERSION {"1.12.x"}
|
||||||
|
|
||||||
// Max creature level (included some bosses and elite)
|
// Max creature level (included some bosses and elite)
|
||||||
#define DEFAULT_MAX_CREATURE_LEVEL 65
|
#define DEFAULT_MAX_CREATURE_LEVEL 65
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
#include "LFGMgr.h"
|
#include "LFGMgr.h"
|
||||||
#include "DisableMgr.h"
|
#include "DisableMgr.h"
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
|
#include "revision.h"
|
||||||
|
|
||||||
#ifdef ENABLE_ELUNA
|
#ifdef ENABLE_ELUNA
|
||||||
#include "LuaEngine.h"
|
#include "LuaEngine.h"
|
||||||
@ -1491,16 +1492,99 @@ void World::SetInitialWorldSettings()
|
|||||||
sPlayerbotAIConfig.Initialize();
|
sPlayerbotAIConfig.Initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sLog.outString("------------------------");
|
showFooter();
|
||||||
sLog.outString("WORLD: World initialized");
|
|
||||||
sLog.outString("------------------------");
|
|
||||||
sLog.outString();
|
|
||||||
|
|
||||||
uint32 uStartInterval = WorldTimer::getMSTimeDiff(uStartTime, WorldTimer::getMSTime());
|
uint32 uStartInterval = WorldTimer::getMSTimeDiff(uStartTime, WorldTimer::getMSTime());
|
||||||
sLog.outString("SERVER STARTUP TIME: %i minutes %i seconds", uStartInterval / 60000, (uStartInterval % 60000) / 1000);
|
sLog.outString("SERVER STARTUP TIME: %i minutes %i seconds", uStartInterval / 60000, (uStartInterval % 60000) / 1000);
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void World::showFooter()
|
||||||
|
{
|
||||||
|
std::set<std::string> modules_;
|
||||||
|
|
||||||
|
// ELUNA is either included or disabled
|
||||||
|
#ifdef ENABLE_ELUNA
|
||||||
|
modules_.insert(" Eluna : Enabled");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// SD3 is either included or disabled
|
||||||
|
#ifdef ENABLE_SD3
|
||||||
|
modules_.insert(" ScriptDev3 (SD3) : Enabled");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PLAYERBOTS can be included or excluded but also disabled via mangos.conf
|
||||||
|
#ifdef ENABLE_PLAYERBOTS
|
||||||
|
bool playerBotActive = sConfig.GetBoolDefault("PlayerbotAI.DisableBots", true);
|
||||||
|
if (playerBotActive)
|
||||||
|
{
|
||||||
|
modules_.insert(" PlayerBots : Disabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modules_.insert(" PlayerBots : Enabled");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Remote Access can be activated / deactivated via mangos.conf
|
||||||
|
bool raActive = sConfig.GetBoolDefault("Ra.Enable", false);
|
||||||
|
if (raActive)
|
||||||
|
{
|
||||||
|
modules_.insert(" Remote Access (RA) : Enabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modules_.insert(" Remote Access (RA) : Disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
// SOAP can be included or excluded but also disabled via mangos.conf
|
||||||
|
#ifdef ENABLE_SOAP
|
||||||
|
bool soapActive = sConfig.GetBoolDefault("SOAP.Enabled", false);
|
||||||
|
if (soapActive)
|
||||||
|
{
|
||||||
|
modules_.insert(" SOAP : Enabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modules_.insert(" SOAP : Disabled");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Warden is always included, set active or disabled via mangos.conf
|
||||||
|
bool wardenActive = (sWorld.getConfig(CONFIG_BOOL_WARDEN_WIN_ENABLED) || sWorld.getConfig(CONFIG_BOOL_WARDEN_OSX_ENABLED));
|
||||||
|
if (wardenActive)
|
||||||
|
{
|
||||||
|
modules_.insert(" Warden : Enabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modules_.insert(" Warden : Disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string thisClientVersion = EXPECTED_MANGOSD_CLIENT_VERSION;
|
||||||
|
std::string thisClientBuilds = AcceptableClientBuildsListStr();
|
||||||
|
|
||||||
|
std::string sModules;
|
||||||
|
for (std::set<std::string>::const_iterator it = modules_.begin(); it != modules_.end(); ++it)
|
||||||
|
sModules = sModules + " \n" + *it;
|
||||||
|
|
||||||
|
sLog.outString("\n"
|
||||||
|
"_______________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" MaNGOS Server: World Initialization Complete\n"
|
||||||
|
"_______________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Server Version : %s\n"
|
||||||
|
" Database Version : Rel%i.%i.%i\n"
|
||||||
|
"\n"
|
||||||
|
" Supporting Clients : %s\n"
|
||||||
|
" Builds : %s\n"
|
||||||
|
"\n"
|
||||||
|
" Module Status -\n%s\n"
|
||||||
|
"_______________________________________________________\n"
|
||||||
|
, REVISION_NR, WORLD_DB_VERSION_NR, WORLD_DB_STRUCTURE_NR, WORLD_DB_CONTENT_NR, thisClientVersion.c_str(), thisClientBuilds.c_str(), sModules.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
void World::DetectDBCLang()
|
void World::DetectDBCLang()
|
||||||
{
|
{
|
||||||
uint32 m_lang_confid = sConfig.GetIntDefault("DBC.Locale", 255);
|
uint32 m_lang_confid = sConfig.GetIntDefault("DBC.Locale", 255);
|
||||||
|
@ -489,6 +489,7 @@ class World
|
|||||||
void SetMotd(const std::string& motd) { m_motd = motd; }
|
void SetMotd(const std::string& motd) { m_motd = motd; }
|
||||||
/// Get the current Message of the Day
|
/// Get the current Message of the Day
|
||||||
const char* GetMotd() const { return m_motd.c_str(); }
|
const char* GetMotd() const { return m_motd.c_str(); }
|
||||||
|
void showFooter();
|
||||||
|
|
||||||
LocaleConstant GetDefaultDbcLocale() const { return m_defaultDbcLocale; }
|
LocaleConstant GetDefaultDbcLocale() const { return m_defaultDbcLocale; }
|
||||||
|
|
||||||
|
@ -272,24 +272,6 @@ static void usage(const char* prog)
|
|||||||
, prog);
|
, prog);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Print out the core banner
|
|
||||||
static void print_banner()
|
|
||||||
{
|
|
||||||
sLog.outString("<Ctrl-C> to stop.\n"
|
|
||||||
" __ __ _ _ ___ ___ ___ \n"
|
|
||||||
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| We Love \n"
|
|
||||||
" | |\\/| / _` | .` | (_ | (_) \\__ \\ Vanilla Wow \n"
|
|
||||||
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ \n"
|
|
||||||
" ____ \n"
|
|
||||||
" For help and support please visit: /_ /___ _ _ ___ \n"
|
|
||||||
" Website: https://getmangos.eu / // -_) '_/ _ \\ \n"
|
|
||||||
" Forum / Wiki: https://getmangos.eu /___\\___|_| \\___/\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Launch the mangos server
|
/// Launch the mangos server
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <mersennetwister/MersenneTwister.h>
|
#include <mersennetwister/MersenneTwister.h>
|
||||||
#include <ace/TSS_T.h>
|
#include <ace/TSS_T.h>
|
||||||
#include <ace/INET_Addr.h>
|
#include <ace/INET_Addr.h>
|
||||||
|
#include "Log/Log.h"
|
||||||
|
|
||||||
typedef ACE_TSS<MTRand> MTRandTSS;
|
typedef ACE_TSS<MTRand> MTRandTSS;
|
||||||
static MTRandTSS *mtRand;
|
static MTRandTSS *mtRand;
|
||||||
@ -587,3 +588,109 @@ void utf8printf(FILE* out, const char* str, ...)
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int return_iCoreNumber()
|
||||||
|
{
|
||||||
|
#if defined(CLASSIC)
|
||||||
|
return 0;
|
||||||
|
#elif defined(TBC)
|
||||||
|
return 1;
|
||||||
|
#elif defined(WOTLK)
|
||||||
|
return 2;
|
||||||
|
#elif defined(CATA)
|
||||||
|
return 3;
|
||||||
|
#elif defined(MOP)
|
||||||
|
return 4;
|
||||||
|
#elif defined(WOD)
|
||||||
|
return 5;
|
||||||
|
#elif defined(LEGION)
|
||||||
|
return 6;
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Print out the core banner
|
||||||
|
void print_banner()
|
||||||
|
{
|
||||||
|
int iCoreNumber = return_iCoreNumber();
|
||||||
|
switch (iCoreNumber)
|
||||||
|
{
|
||||||
|
case 0: // CLASSIC
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ ____ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| /_ /___ _ _ ___ \n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ / // -_) '_/ _ \\ \n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ /___\\___|_| \\___/\n"
|
||||||
|
" Powered By MaNGOS Core\n"
|
||||||
|
"__________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
"Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
"__________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
case 1: // TBC
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ ___ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| / _ \\ ___ ___ \n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ | (_) | \\/ -_) \n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ \\___/|_||_\\___|\n"
|
||||||
|
" Powered By MaNGOS Core\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
case 2: // WOTLK
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ _____ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| |_ _|_ __ _____\n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ | | \\ V V / _ \\\n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ |_| \\_/\\_/\\___/ \n"
|
||||||
|
" Powered By MaNGOS Core\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
case 3: // CATA
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ _____ _ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| |_ _| |_ _ _ ___ ___ \n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ | | | ' \\| '_/ -_) -_) \n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ |_| |_||_|_| \\___\\___| \n"
|
||||||
|
" Powered By MaNGOS Core\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
case 4: // MOP
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ _____ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| | __|__ _ _ _ _ \n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ | _/ _ \\ || | '_|\n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ |_|\\___/\\_,_|_| \n"
|
||||||
|
" Powered By MaNGOS Core\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sLog.outString("<Ctrl-C> to stop.\n"
|
||||||
|
" __ __ _ _ ___ ___ ___ \n"
|
||||||
|
" | \\/ |__ _| \\| |/ __|/ _ \\/ __| We have a problem ! \n"
|
||||||
|
" | |\\/| / _` | .` | (_ | (_) \\__ \\ Your version of MaNGOS \n"
|
||||||
|
" |_| |_\\__,_|_|\\_|\\___|\\___/|___/ could not be detected \n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n"
|
||||||
|
" Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu\n"
|
||||||
|
" __________________________________________________________\n"
|
||||||
|
"\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -748,4 +748,16 @@ void hexEncodeByteArray(uint8* bytes, uint32 arrayLen, std::string& result);
|
|||||||
|
|
||||||
std::string ByteArrayToHexStr(uint8 const* bytes, uint32 length, bool reverse = false);
|
std::string ByteArrayToHexStr(uint8 const* bytes, uint32 length, bool reverse = false);
|
||||||
void HexStrToByteArray(std::string const& str, uint8* out, bool reverse = false);
|
void HexStrToByteArray(std::string const& str, uint8* out, bool reverse = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Define iCoreNumber to be set for the currently defined core
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int return_iCoreNumber();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Display the startup banner
|
||||||
|
*/
|
||||||
|
void print_banner();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user