fix: server motd

This commit is contained in:
FrancescoBorzi
2019-01-19 02:48:00 +01:00
parent ccaa74a9a7
commit 97ae1496a7
10 changed files with 101 additions and 83 deletions

View File

@@ -75,6 +75,7 @@
#include "WhoListCache.h"
#include "AsyncAuctionListing.h"
#include "SavingSystem.h"
#include "ServerMotd.h"
#include "GameGraveyard.h"
#include <VMapManager2.h>
#ifdef ELUNA
@@ -189,18 +190,6 @@ void World::SetClosed(bool val)
sScriptMgr->OnOpenStateChange(!val);
}
void World::SetMotd(const std::string& motd)
{
m_motd = motd;
sScriptMgr->OnMotdChange(m_motd);
}
const char* World::GetMotd() const
{
return m_motd.c_str();
}
/// Find a session by its id
WorldSession* World::FindSession(uint32 id) const
{
@@ -477,7 +466,7 @@ void World::LoadConfigSettings(bool reload)
///- Read the player limit and the Message of the day from the config file
if (!reload)
SetPlayerAmountLimit(sConfigMgr->GetIntDefault("PlayerLimit", 100));
SetMotd(sConfigMgr->GetStringDefault("Motd", "Welcome to an AzerothCore server") + "\n|cffFF4A2DT"+"his serv"+"er run"+"s on Aze"+"roth"+"Core|r |cff3CE7FFwww.azer"+"othcor"+"e.org|r");
Motd::SetMotd(sConfigMgr->GetStringDefault("Motd", "Welcome to an AzerothCore server"));
///- Read ticket system setting from the config file
m_bool_configs[CONFIG_ALLOW_TICKETS] = sConfigMgr->GetBoolDefault("AllowTickets", true);

View File

@@ -608,11 +608,6 @@ class World
/// Allow/Disallow object movements
void SetAllowMovement(bool allow) { m_allowMovement = allow; }
/// Set a new Message of the Day
void SetMotd(std::string const& motd);
/// Get the current Message of the Day
const char* GetMotd() const;
/// Set the string for new characters (first login)
void SetNewCharString(std::string const& str) { m_newCharString = str; }
/// Get the string for new characters (first login)
@@ -845,7 +840,6 @@ class World
uint32 m_availableDbcLocaleMask; // by loaded DBC
void DetectDBCLang();
bool m_allowMovement;
std::string m_motd;
std::string m_dataPath;
// for max speed access