Skip to content

Commit

Permalink
Update Moderator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Oct 1, 2024
1 parent 9924beb commit 1dbe747
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Civ13/Moderator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1dbe747

Please sign in to comment.