diff --git a/src/Automod/ModAction/BanUser/AbstractBanUserModAction.php b/src/Automod/ModAction/BanUser/AbstractBanUserModAction.php index 1ec91a7..dfa3a7f 100644 --- a/src/Automod/ModAction/BanUser/AbstractBanUserModAction.php +++ b/src/Automod/ModAction/BanUser/AbstractBanUserModAction.php @@ -37,6 +37,10 @@ public function getDescription(): ?string public function shouldRun(object $object): bool { + $author = $this->getAuthor($object); + if ($author->banned) { + return false; + } foreach ($this->getTextsToCheck($object) as $text) { if ($text === null) { continue; @@ -50,7 +54,7 @@ public function shouldRun(object $object): bool } } - if ($this->findMatchingUsernameRule($this->getAuthor($object)->name)) { + if ($this->findMatchingUsernameRule($author->name)) { return true; }