Make RealmList proper singleton in realmd.

This commit is contained in:
XTZGZoReX 2009-11-08 03:36:43 +01:00
parent 1f23884757
commit 6abf7e7f58
4 changed files with 14 additions and 8 deletions

View file

@ -55,7 +55,6 @@ void UnhookSignals();
void HookSignals();
bool stopEvent = false; ///< Setting it to true stops the server
RealmList m_realmList; ///< Holds the list of realms for this server
DatabaseType loginDatabase; ///< Accessor to the realm server database
@ -191,8 +190,8 @@ extern int main(int argc, char **argv)
return 1;
///- Get the list of realms for the server
m_realmList.Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20));
if (m_realmList.size() == 0)
RealmList::Instance().Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20));
if (RealmList::Instance().size() == 0)
{
sLog.outError("No valid realms specified.");
return 1;