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

31
src/common/Banner.cpp Normal file
View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v3 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "Banner.h"
#include "GitRevision.h"
#include "StringFormat.h"
void acore::Banner::Show(char const* applicationName, void(*log)(char const* text), void(*logExtraInfo)())
{
log(acore::StringFormat("%s (%s)", GitRevision::GetFullVersion(), applicationName).c_str());
log("<Ctrl-C> to stop.\n");
log(" █████╗ ███████╗███████╗██████╗ ██████╗ ████████╗██╗ ██╗");
log(" ██╔══██╗╚══███╔╝██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║ ██║");
log(" ███████║ ███╔╝ █████╗ ██████╔╝██║ ██║ ██║ ███████║");
log(" ██╔══██║ ███╔╝ ██╔══╝ ██╔══██╗██║ ██║ ██║ ██╔══██║");
log(" ██║ ██║███████╗███████╗██║ ██║╚██████╔╝ ██║ ██║ ██║");
log(" ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝");
log(" ██████╗ ██████╗ ██████╗ ███████╗");
log(" ██╔════╝██╔═══██╗██╔══██╗██╔═══╝");
log(" ██║ ██║ ██║██████╔╝█████╗");
log(" ██║ ██║ ██║██╔══██╗██╔══╝");
log(" ╚██████╗╚██████╔╝██║ ██║███████╗");
log(" ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝\n");
log(" AzerothCore 3.3.5a - www.azerothcore.org\n");
if (logExtraInfo)
{
logExtraInfo();
}
}