diff options
Diffstat (limited to 'src/Root.cpp')
-rw-r--r-- | src/Root.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index b28e7c894..8d344ee65 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -106,7 +106,7 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> overridesRepo) EnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED); // Disable close button when starting up; it causes problems with our CTRL-CLOSE handling #endif - cLogger::cListener * consoleLogListener = MakeConsoleListener(); + cLogger::cListener * consoleLogListener = MakeConsoleListener(m_RunAsService); cLogger::cListener * fileLogListener = new cFileListener(); cLogger::GetInstance().AttachListener(consoleLogListener); cLogger::GetInstance().AttachListener(fileLogListener); @@ -558,6 +558,23 @@ void cRoot::SaveAllChunks(void) +void cRoot::SendPlayerLists(cPlayer * a_DestPlayer) +{ + for (const auto & itr : m_WorldsByName) + { + itr.second->SendPlayerList(a_DestPlayer); + } // for itr - m_WorldsByName[] +} + + + +void cRoot::BroadcastPlayerListsAddPlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude) +{ + for (const auto & itr : m_WorldsByName) + { + itr.second->BroadcastPlayerListAddPlayer(a_Player); + } // for itr - m_WorldsByName[] +} void cRoot::BroadcastChat(const AString & a_Message, eMessageType a_ChatPrefix) @@ -582,8 +599,6 @@ void cRoot::BroadcastChat(const cCompositeChat & a_Message) - - bool cRoot::ForEachPlayer(cPlayerListCallback & a_Callback) { for (WorldMap::iterator itr = m_WorldsByName.begin(), itr2 = itr; itr != m_WorldsByName.end(); itr = itr2) |