diff options
author | Mattes D <github@xoft.cz> | 2014-08-21 16:55:39 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-21 16:55:39 +0200 |
commit | 326dd7e4c6baa6070d35a2a46ca20404c623c8e1 (patch) | |
tree | c87ad1a554656a97f706c067ee23956849be55a3 /src/RankManager.cpp | |
parent | Removed last remnant of cGroup. (diff) | |
download | cuberite-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.cpp | 23 |
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, |