diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientHandle.cpp | 2 | ||||
-rw-r--r-- | src/Root.cpp | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 6f7bd1faf..6fe7cbd4a 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1807,7 +1807,7 @@ bool cClientHandle::CheckMultiLogin(const AString & a_Username) } } Callback; - if (cRoot::Get()->GetDefaultWorld()->DoWithPlayer(a_Username, Callback)) + if (cRoot::Get()->DoWithPlayer(a_Username, Callback)) { Kick("A player of the username is already logged in"); return false; diff --git a/src/Root.cpp b/src/Root.cpp index dddb943a2..c59590d95 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -651,7 +651,14 @@ bool cRoot::DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback bool cRoot::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback) { - + for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); itr++) + { + if (itr->second->DoWithPlayer(a_PlayerName, a_Callback)) + { + return true; + } + } + return false; } |