diff options
author | bibo38 <bibo38@github.com> | 2016-01-13 07:55:05 +0100 |
---|---|---|
committer | bibo38 <bibo38@github.com> | 2016-01-13 09:55:48 +0100 |
commit | 41aa7cf1232941ebe13efb6f64439d38963beb22 (patch) | |
tree | 2c5d0cbf249b30b2ff3c4803cf895d0a1ae4fcd8 /src/ClientHandle.cpp | |
parent | Merge pull request #2864 from LogicParrot/compile (diff) | |
download | cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.gz cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.bz2 cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.lz cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.xz cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.zst cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 0f1164a1e..377a84ce9 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1719,6 +1719,12 @@ bool cClientHandle::CheckMultiLogin(const AString & a_Username) bool cClientHandle::HandleHandshake(const AString & a_Username) { + if (a_Username.length() > 16) + { + Kick("Your username is too long(>16 characters)"); + return false; + } + if (!cRoot::Get()->GetPluginManager()->CallHookHandshake(*this, a_Username)) { if (cRoot::Get()->GetServer()->GetNumPlayers() >= cRoot::Get()->GetServer()->GetMaxPlayers()) |