summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-06-13 13:16:16 -0600
committerJared Adams <jaxad0127@gmail.com>2010-06-13 13:16:16 -0600
commite8bea8a6edf69e824a922adeb5e697111ceabe90 (patch)
treedb1937956bc585b300f2a2c8312af4ad5bf924de /src/playerrelations.cpp
parent593fd2b831304c8e421589aab0fb158e4b7e9c35 (diff)
parent0b15a3ad32838134384524ce4af95d65b0b4e5da (diff)
downloadmana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.gz
mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.bz2
mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.xz
mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.zip
Merge remote branch '1.0/1.0'
Conflicts: data/graphics/CMakeLists.txt data/graphics/Makefile.am src/client.cpp
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 77d3fddd..f5d3d01b 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -90,13 +90,20 @@ PlayerRelation::PlayerRelation(Relation relation)
PlayerRelationsManager::PlayerRelationsManager() :
mPersistIgnores(false),
mDefaultPermissions(PlayerRelation::DEFAULT),
- mIgnoreStrategy(NULL)
+ mIgnoreStrategy(0)
{
}
PlayerRelationsManager::~PlayerRelationsManager()
{
delete_all(mIgnoreStrategies);
+
+ for (std::map<std::string,
+ PlayerRelation *>::const_iterator it = mRelations.begin();
+ it != mRelations.end(); it++)
+ {
+ delete it->second;
+ }
}
void PlayerRelationsManager::clear()
@@ -104,7 +111,9 @@ void PlayerRelationsManager::clear()
std::vector<std::string> *names = getPlayers();
for (std::vector<std::string>::const_iterator
it = names->begin(); it != names->end(); it++)
+ {
removePlayer(*it);
+ }
delete names;
}