summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-14 22:52:59 +0200
committermadmaxoft <github@xoft.cz>2014-04-14 22:52:59 +0200
commitd12d7b671523f79f760403f3f4c0ef4efb497c79 (patch)
tree7fe960574b01b1bc1b76327a3f163fd2f69d06ce /src/ClientHandle.h
parentA client UUID is generated when the server is in offline mode. (diff)
downloadcuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar.gz
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar.bz2
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar.lz
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar.xz
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.tar.zst
cuberite-d12d7b671523f79f760403f3f4c0ef4efb497c79.zip
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r--src/ClientHandle.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h
index 90b971e16..12e0256de 100644
--- a/src/ClientHandle.h
+++ b/src/ClientHandle.h
@@ -65,10 +65,16 @@ public:
const AString & GetUUID(void) const { return m_UUID; } // tolua_export
void SetUUID(const AString & a_UUID) { m_UUID = a_UUID; }
+ /** Generates an UUID based on the username stored for this client, and stores it in the m_UUID member.
+ This is used for the offline (non-auth) mode, when there's no UUID source.
+ Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same.
+ Internally calls the GenerateOfflineUUID static function. */
+ void GenerateOfflineUUID(void);
+
/** Generates an UUID based on the player name provided.
This is used for the offline (non-auth) mode, when there's no UUID source.
Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. */
- void GenerateOfflineUUID(void);
+ static AString GenerateOfflineUUID(const AString & a_Username); // tolua_export
void Kick(const AString & a_Reason); // tolua_export
void Authenticate(const AString & a_Name, const AString & a_UUID); // Called by cAuthenticator when the user passes authentication