From 2fb3eb3532c2c40e21def269cb9d5ca6eb11ef6d Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 28 Sep 2014 02:17:32 +0200 Subject: cRankManager: Added GetAllPlayers() and GetPlayerName() --- src/RankManager.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/RankManager.h') diff --git a/src/RankManager.h b/src/RankManager.h index f364bba6a..ebdba17a0 100644 --- a/src/RankManager.h +++ b/src/RankManager.h @@ -60,6 +60,10 @@ public: If the player has no rank assigned, returns an empty string (NOT the default rank). */ AString GetPlayerRankName(const AString & a_PlayerUUID); + /** Returns the last name that the specified player has. + If the player isn't in the database, this returns an empty string. */ + AString GetPlayerName(const AString & a_PlayerUUID); + /** Returns the names of Groups that the specified player has assigned to them. */ AStringVector GetPlayerGroups(const AString & a_PlayerUUID); @@ -79,6 +83,9 @@ public: Returns an empty vector if the rank doesn't exist. Any non-existent groups are ignored. */ AStringVector GetRankPermissions(const AString & a_RankName); + /** Returns the short uuids of all defined players. */ + AStringVector GetAllPlayers(void); + /** Returns the names of all defined ranks. */ AStringVector GetAllRanks(void); @@ -210,6 +217,9 @@ public: /** Returns the name of the default rank. */ const AString & GetDefaultRank(void) const { return m_DefaultRank; } + + /** Updates the playername that is saved with this uuid. Returns false if a error occurred */ + bool UpdatePlayerName(const AString & a_PlayerUUID, const AString & a_NewPlayerName); protected: -- cgit v1.2.3