diff options
author | mathiascode <8754153+mathiascode@users.noreply.github.com> | 2018-04-02 19:39:54 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2018-04-02 19:39:54 +0200 |
commit | a879778968c5f9eaae97026b42046371d382b489 (patch) | |
tree | c7b628dd5908306ba3e7aaa15562e365e50c725c /src/Root.cpp | |
parent | Ignore KDevelop project files (#4192) (diff) | |
download | cuberite-a879778968c5f9eaae97026b42046371d382b489.tar cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.gz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.bz2 cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.lz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.xz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.zst cuberite-a879778968c5f9eaae97026b42046371d382b489.zip |
Diffstat (limited to 'src/Root.cpp')
-rw-r--r-- | src/Root.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index 42ee00604..8372e8699 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -755,6 +755,8 @@ void cRoot::SendPlayerLists(cPlayer * a_DestPlayer) + + void cRoot::BroadcastPlayerListsAddPlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude) { for (const auto & itr : m_WorldsByName) @@ -764,6 +766,21 @@ void cRoot::BroadcastPlayerListsAddPlayer(const cPlayer & a_Player, const cClien } + + + +void cRoot::BroadcastPlayerListsRemovePlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude) +{ + for (const auto & itr : m_WorldsByName) + { + itr.second->BroadcastPlayerListRemovePlayer(a_Player); + } // for itr - m_WorldsByName[] +} + + + + + void cRoot::BroadcastChat(const AString & a_Message, eMessageType a_ChatPrefix) { for (WorldMap::iterator itr = m_WorldsByName.begin(), end = m_WorldsByName.end(); itr != end; ++itr) @@ -786,6 +803,8 @@ 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) |