summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 18587a91e..1778da0c3 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -409,6 +409,23 @@ void PlayerRelationsManager::ignoreTrade(std::string name)
}
}
+bool PlayerRelationsManager::checkBadRelation(std::string name)
+{
+ if (name.empty())
+ return true;
+
+ PlayerRelation::Relation relation = getRelation(name);
+
+ if (relation == PlayerRelation::IGNORED
+ || relation == PlayerRelation::DISREGARDED
+ || relation == PlayerRelation::BLACKLISTED
+ || relation == PlayerRelation::ERASED
+ || relation == PlayerRelation::ENEMY2)
+ {
+ return true;
+ }
+ return false;
+}
////////////////////////////////////////
// ignore strategies