summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2016-07-21 13:00:30 +0200
committerMattes D <github@xoft.cz>2016-07-21 13:00:30 +0200
commita2a9341c24609e45e563427eecc1a927ee2b657a (patch)
tree47bb2d183d541d5f9611260c12eb3f002a07d6f9 /src/ClientHandle.cpp
parentCMake: Fix system Lua usage for non-5.1 versions. (#3271) (diff)
downloadcuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar.gz
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar.bz2
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar.lz
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar.xz
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.tar.zst
cuberite-a2a9341c24609e45e563427eecc1a927ee2b657a.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 772d8ad6c..997510684 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1831,12 +1831,24 @@ void cClientHandle::HandleUnmount(void)
void cClientHandle::HandleTabCompletion(const AString & a_Text)
{
AStringVector Results;
- m_Player->GetWorld()->TabCompleteUserName(a_Text, Results);
+ // Get player name completions.
+ if (cRoot::Get()->GetServer()->ShouldAllowMultiWorldTabCompletion())
+ {
+ Results = cRoot::Get()->GetPlayerTabCompletionMultiWorld(a_Text);
+ }
+ else
+ {
+ m_Player->GetWorld()->TabCompleteUserName(a_Text, Results);
+ }
+
+ // Get command completions.
cRoot::Get()->GetPluginManager()->TabCompleteCommand(a_Text, Results, m_Player);
if (Results.empty())
{
return;
}
+
+ // Sort and send results.
std::sort(Results.begin(), Results.end());
SendTabCompletionResults(Results);
}