summaryrefslogtreecommitdiffstats
path: root/src/RankManager.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-21 20:47:52 +0200
committerMattes D <github@xoft.cz>2014-08-21 20:47:52 +0200
commit0c04bf962ed025789c1979c6d4fb122735b1a46b (patch)
tree45d95981acb121f8b14b27500489ef9d10e82fd2 /src/RankManager.h
parentRankMgr: Added cRankManager::RemovePlayerRank(). (diff)
downloadcuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar.gz
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar.bz2
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar.lz
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar.xz
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.tar.zst
cuberite-0c04bf962ed025789c1979c6d4fb122735b1a46b.zip
Diffstat (limited to 'src/RankManager.h')
-rw-r--r--src/RankManager.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/RankManager.h b/src/RankManager.h
index 532b4cd83..24030ef22 100644
--- a/src/RankManager.h
+++ b/src/RankManager.h
@@ -49,6 +49,8 @@ public:
/** Creates the rank manager. Needs to be initialized before other use. */
cRankManager(void);
+
+ ~cRankManager();
/** Initializes the rank manager. Performs migration and default-setting if no data is found in the DB.
The a_MojangAPI param is used when migrating from old ini files, to look up player UUIDs. */
@@ -194,6 +196,9 @@ public:
/** Returns true iff the specified group contains the specified permission. */
bool IsPermissionInGroup(const AString & a_Permission, const AString & a_GroupName);
+ /** Called by cMojangAPI whenever the playername-uuid pairing is discovered. Updates the DB. */
+ void NotifyNameUUID(const AString & a_PlayerName, const AString & a_UUID);
+
protected:
/** The database storage for all the data. Protected by m_CS. */
@@ -204,6 +209,10 @@ protected:
/** Set to true once the manager is initialized. */
bool m_IsInitialized;
+
+ /** The MojangAPI instance that is used for translating playernames to UUIDs.
+ Set in Initialize(), may be NULL. */
+ cMojangAPI * m_MojangAPI;
/** Returns true if all the DB tables are empty, indicating a fresh new install. */