X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChatLib.php;h=f4ab93f4798b28ebc87383b94f68e75728bbc7c9;hb=e1e352a985c2da1cc0e4ad4716244261445a2604;hp=ea16a2bd740efb4916a54881bceda3ff3b388f35;hpb=710b9c7447f9776ce8f8e0a4ca281c17ac141a7a;p=alttp.git diff --git a/app/Models/ChatLib.php b/app/Models/ChatLib.php index ea16a2b..f4ab93f 100644 --- a/app/Models/ChatLib.php +++ b/app/Models/ChatLib.php @@ -164,8 +164,8 @@ class ChatLib { $str = ''; foreach ($tokens as $token) { $replaced = preg_replace('/\d+/u', '0', $token); - $replaced = preg_replace('/\s+/u', ' ', $token); - $replaced = preg_replace('/(.)\1{2,}/u', '$1$1', $token); + $replaced = preg_replace('/\s+/u', ' ', $replaced); + $replaced = preg_replace('/(.)\1{2,}/u', '$1$1', $replaced); $replaced = strtolower($replaced); foreach ($this->aliases as $canonical => $variants) { if (in_array($replaced, $variants)) {