diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-28 15:16:11 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-28 15:16:11 +0200 |
commit | 63c53a8e23776cc3011fd0260857bd22274e2c62 (patch) | |
tree | 014d4498cffa77ce5bf504abe96e7d23832c9d5b /src/RankManager.cpp | |
parent | Updated api documentation. (diff) | |
download | cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.gz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.bz2 cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.lz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.xz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.zst cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.zip |
Diffstat (limited to 'src/RankManager.cpp')
-rw-r--r-- | src/RankManager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/RankManager.cpp b/src/RankManager.cpp index 0f267473a..fd5e58025 100644 --- a/src/RankManager.cpp +++ b/src/RankManager.cpp @@ -1817,6 +1817,25 @@ bool cRankManager::SetDefaultRank(const AString & a_RankName) +void cRankManager::ClearPlayerRanks(void) +{ + ASSERT(m_IsInitialized); + cCSLock Lock(m_CS); + + try { + SQLite::Statement stmt(m_DB, "DELETE FROM PlayerRank"); + stmt.exec(); + } + catch (SQLite::Exception & ex) + { + LOGWARNING("%s: Failed to remove/clear all players: %s", __FUNCTION__, ex.what()); + } +} + + + + + bool cRankManager::UpdatePlayerName(const AString & a_PlayerUUID, const AString & a_NewPlayerName) { ASSERT(m_IsInitialized); |