summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 95463192..113ce224 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -221,10 +221,9 @@ bool PlayerRelationsManager::hasPermission(const std::string &name,
// execute `ignore' strategy, if possible
if (mIgnoreStrategy)
{
- Player *to_ignore = dynamic_cast<Player *>(beingManager->findBeingByName(name, Being::PLAYER));
-
- if (to_ignore)
- mIgnoreStrategy->ignore(to_ignore, rejections);
+ Being *b = beingManager->findBeingByName(name, Being::PLAYER);
+ if (b->getType() == Being::PLAYER)
+ mIgnoreStrategy->ignore(static_cast<Player *>(b), rejections);
}
}