summaryrefslogtreecommitdiffstats
path: root/src/RankManager.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-08 10:02:25 +0200
committermadmaxoft <github@xoft.cz>2014-08-08 10:02:25 +0200
commit65b81b4ab7f580c98ca80b8e57a13de961f19131 (patch)
treee49982f7bc8ff53dec2afaa900be7f65fffc8e58 /src/RankManager.h
parentRankMgr: Renamed PermissionGroup to Group in API and PermGroup in DB. (diff)
downloadcuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar.gz
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar.bz2
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar.lz
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar.xz
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.tar.zst
cuberite-65b81b4ab7f580c98ca80b8e57a13de961f19131.zip
Diffstat (limited to '')
-rw-r--r--src/RankManager.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/RankManager.h b/src/RankManager.h
index 0b1db2fb8..0c35b555f 100644
--- a/src/RankManager.h
+++ b/src/RankManager.h
@@ -68,7 +68,7 @@ public:
/** Adds the specified permission group to the specified rank.
Fails if the rank or group names are not found.
Returns true if successful, false on error. */
- bool AddGroupToRank(const AString & a_RankName, const AString & a_GroupName);
+ bool AddGroupToRank(const AString & a_GroupName, const AString & a_RankName);
/** Adds the specified permission to the specified permission group.
Fails if the permission group name is not found.
@@ -113,6 +113,22 @@ public:
const AString & a_MsgSuffix,
const AString & a_MsgNameColorCode
);
+
+ /** Returns true iff the specified rank exists in the DB. */
+ bool RankExists(const AString & a_RankName);
+
+ /** Returns true iff the specified group exists in the DB. */
+ bool GroupExists(const AString & a_GroupName);
+
+ /** Returns true iff the specified player has a rank assigned to them in the DB. */
+ bool IsPlayerRankSet(const AString & a_PlayerUUID);
+
+ /** Returns true iff the specified rank contains the specified group. */
+ bool IsGroupInRank(const AString & a_GroupName, const AString & a_RankName);
+
+ /** Returns true iff the specified group contains the specified permission. */
+ bool IsPermissionInGroup(const AString & a_Permission, const AString & a_GroupName);
+
protected:
SQLite::Database m_DB;