refactor(Core/Server): Move Banner into separate file (#5207)

* refactor(Core/Server): Move Banner into separate file

* fix build

* Update Banner.cpp

* indent

* build

* build

* log

* LOG_INFO

* Update Banner.cpp

* Update Banner.h

* Update Main.cpp

* Update Main.cpp

* Update Master.cpp

* yes

* tes
This commit is contained in:
Kitzunu
2021-04-18 00:35:35 +02:00
committed by GitHub
parent 8c8bc61b40
commit 86192f38b7
5 changed files with 75 additions and 40 deletions

View File

@@ -12,6 +12,7 @@
* authentication server
*/
#include "Banner.h"
#include "Common.h"
#include "AppenderDB.h"
#include "DatabaseEnv.h"
@@ -85,25 +86,18 @@ extern int main(int argc, char** argv)
sLog->RegisterAppender<AppenderDB>();
sLog->Initialize();
LOG_INFO("server.authserver", "%s (authserver)", GitRevision::GetFullVersion());
LOG_INFO("server.authserver", "<Ctrl-C> to stop.");
LOG_INFO("server.authserver", " ");
LOG_INFO("server.authserver", " █████╗ ███████╗███████╗██████╗ ██████╗ ████████╗██╗ ██╗");
LOG_INFO("server.authserver", " ██╔══██╗╚══███╔╝██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║ ██║");
LOG_INFO("server.authserver", " ███████║ ███╔╝ █████╗ ██████╔╝██║ ██║ ██║ ███████║");
LOG_INFO("server.authserver", " ██╔══██║ ███╔╝ ██╔══╝ ██╔══██╗██║ ██║ ██║ ██╔══██║");
LOG_INFO("server.authserver", " ██║ ██║███████╗███████╗██║ ██║╚██████╔╝ ██║ ██║ ██║");
LOG_INFO("server.authserver", " ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝");
LOG_INFO("server.authserver", " ██████╗ ██████╗ ██████╗ ███████╗");
LOG_INFO("server.authserver", " ██╔════╝██╔═══██╗██╔══██╗██╔═══╝");
LOG_INFO("server.authserver", " ██║ ██║ ██║██████╔╝█████╗");
LOG_INFO("server.authserver", " ██║ ██║ ██║██╔══██╗██╔══╝");
LOG_INFO("server.authserver", " ╚██████╗╚██████╔╝██║ ██║███████╗");
LOG_INFO("server.authserver", " ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝\n");
LOG_INFO("server.authserver", " AzerothCore 3.3.5a - www.azerothcore.org");
LOG_INFO("server.authserver", " ");
LOG_INFO("server.authserver", "Using configuration file %s.", configFile.c_str());
LOG_INFO("server.authserver", "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
acore::Banner::Show("authserver",
[](char const* text)
{
LOG_INFO("server.authserver", "%s", text);
},
[]()
{
LOG_INFO("server.authserver", "> Using configuration file %s.", sConfigMgr->GetFilename().c_str());
LOG_INFO("server.authserver", "> Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
LOG_INFO("server.authserver", "> Using ACE version: %s", ACE_VERSION);
}
);
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
ACE_Reactor::instance(new ACE_Reactor(new ACE_Dev_Poll_Reactor(ACE::max_handles(), 1), 1), true);