X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChatLog.php;h=79eab97debff1a56a6ee081efbdf59951f22a5d9;hb=1d3c8c6a96fc45d839f0e3719baca790059d189f;hp=8564ff097b55abbe7eb12e4072568222bb60c944;hpb=47d864b96b80abb11fdf8e2fdc8920e93916d5b9;p=alttp.git diff --git a/app/Models/ChatLog.php b/app/Models/ChatLog.php index 8564ff0..79eab97 100644 --- a/app/Models/ChatLog.php +++ b/app/Models/ChatLog.php @@ -134,7 +134,8 @@ class ChatLog extends Model { } } - public static function spammyText($text) { + public static function spammyText($raw_text) { + $text = strtolower($raw_text); if (substr($text, 0, 1) == '!') { return true; } @@ -153,6 +154,9 @@ class ChatLog extends Model { if (strpos($text, 'followers') !== false) { return true; } + if (strpos($text, 'horstie') !== false) { + return true; + } if (strpos($text, 'promotion') !== false) { return true; } @@ -162,11 +166,17 @@ class ChatLog extends Model { if (strpos($text, 'view ers') !== false) { return true; } + if (strpos($text, 'vielen dank für den raid') !== false) { + return true; + } + if (strpos($text, 'willkommen auf starbase 47') !== false) { + return true; + } return false; } protected function scanForSpam() { - if (is_numeric($text)) { + if (is_numeric($this->text_content)) { return true; } return static::spammyText($this->text_content);