summaryrefslogtreecommitdiffstats
path: root/src/RankManager.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-21 16:55:39 +0200
committerMattes D <github@xoft.cz>2014-08-21 16:55:39 +0200
commit326dd7e4c6baa6070d35a2a46ca20404c623c8e1 (patch)
treec87ad1a554656a97f706c067ee23956849be55a3 /src/RankManager.cpp
parentRemoved last remnant of cGroup. (diff)
downloadcuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.gz
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.bz2
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.lz
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.xz
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.zst
cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.zip
Diffstat (limited to 'src/RankManager.cpp')
-rw-r--r--src/RankManager.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/RankManager.cpp b/src/RankManager.cpp
index 96c4baa56..65e5d264c 100644
--- a/src/RankManager.cpp
+++ b/src/RankManager.cpp
@@ -1424,6 +1424,29 @@ void cRankManager::SetPlayerRank(const AString & a_PlayerUUID, const AString & a
+void cRankManager::RemovePlayerRank(const AString & a_PlayerUUID)
+{
+ ASSERT(m_IsInitialized);
+ cCSLock Lock(m_CS);
+
+ try
+ {
+ SQLite::Statement stmt(m_DB, "DELETE FROM PlayerRank WHERE PlayerUUID = ?");
+ stmt.bind(1, a_PlayerUUID);
+ stmt.exec();
+ }
+ catch(const SQLite::Exception & ex)
+ {
+ LOGWARNING("%s: Failed to remove rank from player UUID %s: %s",
+ __FUNCTION__, a_PlayerUUID.c_str(), ex.what()
+ );
+ }
+}
+
+
+
+
+
void cRankManager::SetRankVisuals(
const AString & a_RankName,
const AString & a_MsgPrefix,