Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
09fe516871 | |||
9af555e757 |
@@ -91,7 +91,7 @@ final class index extends core
|
||||
&& rand(0, 100) < 16
|
||||
and levenshtein($_word, $arsen, 2, 2, 1) < 3
|
||||
|| levenshtein($_word, $arsenchik, 2, 1, 2) < 4
|
||||
|| levenshtein($_word, $senya, 2, 2, 1) < 3
|
||||
|| (levenshtein($_word, $senya, 2, 2, 1) < 2 && $word !== 'меня' && $word !== 'тебя')
|
||||
) {
|
||||
// Найдено обращение к Арсену, он не в сети и шанс 15%
|
||||
|
||||
@@ -122,13 +122,14 @@ final class index extends core
|
||||
$_word = self::ascii(mb_strtolower($word), $buffer);
|
||||
|
||||
if (
|
||||
levenshtein($_word, $marina, 2, 2, 1) < 3
|
||||
rand(0, 100) < 31
|
||||
and levenshtein($_word, $marina, 2, 2, 1) < 3
|
||||
|| levenshtein($_word, $marishka, 2, 1, 2) < 4
|
||||
|| levenshtein($_word, $marinochka, 2, 1, 2) < 4
|
||||
|| levenshtein($_word, $marinushka, 2, 1, 2) < 4
|
||||
|| (levenshtein($_word, $marya, 3, 3, 1) < 3 && $word !== 'мария')
|
||||
) {
|
||||
// Найдено обращение к Марине
|
||||
// Найдено обращение к Марине и шанс 30%
|
||||
|
||||
// Отправка сообщения
|
||||
$message->reply(_message::new()->setContent('ЗДАРОВА'));
|
||||
|
Reference in New Issue
Block a user