diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-24 22:15:48 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-24 22:15:48 +0200 |
commit | bd5df3d3b975c448e3d8f4227d86a742d0ad3b12 (patch) | |
tree | 30193169848d8ea39e2e5a423bd9e1a8e189c5f6 /src/ClientHandle.h | |
parent | Conforms to standards (diff) | |
parent | Merge pull request #1125 from Howaner/Entities (diff) | |
download | cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar.gz cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar.bz2 cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar.lz cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar.xz cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.tar.zst cuberite-bd5df3d3b975c448e3d8f4227d86a742d0ad3b12.zip |
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r-- | src/ClientHandle.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 99d10c3aa..d6e086bd2 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -63,7 +63,7 @@ public: const AString & GetIPString(void) const { return m_IPString; } - cPlayer* GetPlayer() { return m_Player; } // tolua_export + cPlayer * GetPlayer(void) { return m_Player; } // tolua_export const AString & GetUUID(void) const { return m_UUID; } // tolua_export void SetUUID(const AString & a_UUID) { m_UUID = a_UUID; } @@ -76,9 +76,16 @@ public: /** 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. */ + Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. + Returns a 36-char UUID (with dashes). */ static AString GenerateOfflineUUID(const AString & a_Username); // tolua_export + /** Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. + We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. + Accepts both 32-char and 36-char UUIDs (with and without dashes). + If the string given is not a valid UUID, returns false. */ + static bool IsUUIDOnline(const AString & a_UUID); // tolua_export + /** Formats the type of message with the proper color and prefix for sending to the client. **/ static AString FormatMessageType(bool ShouldAppendChatPrefixes, eMessageType a_ChatPrefix, const AString & a_AdditionalData); |