diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-22 16:05:02 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-22 16:05:02 +0200 |
commit | c13cffcd30da6b7f4e040de935d5958a30326f8c (patch) | |
tree | 7967052d180cad38d4c10981241f9b98ec5000b9 /src/ClientHandle.h | |
parent | Fixed another daylight sensor bug (diff) | |
parent | Fixed missing break (diff) | |
download | cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar.gz cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar.bz2 cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar.lz cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar.xz cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.tar.zst cuberite-c13cffcd30da6b7f4e040de935d5958a30326f8c.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 0d883f3af..3e18cbdad 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); |