diff --git a/src/Civ13/Moderator.php b/src/Civ13/Moderator.php index 3105fdfc..4648dab8 100644 --- a/src/Civ13/Moderator.php +++ b/src/Civ13/Moderator.php @@ -108,7 +108,7 @@ public function moderate(Gameserver $gameserver, string $ckey, string $string, a $lower = strtolower($string); $seenCategories = []; $infractions = array_filter($badwords_array, function($badwords) use ($lower, &$seenCategories) { - if ($badwords['category'] && ! isset($seenCategories[$badwords['category']]) && ModerationMethod::from($badwords['method'] ?? 'str_contains')->matches($lower, $badwords)) { + if ($badwords['category'] && ! isset($seenCategories[$badwords['category']]) && ModerationMethod::matches($lower, $badwords)) { $seenCategories[$badwords['category']] = true; return true; }