Extend weather command list, add !weather, !погода, !погадка, !погодка, also allow oboobs and obutts plugins in private conversation

This commit is contained in:
eleksir
2021-12-18 17:14:18 +03:00
parent 8d35bb2452
commit f223ba04ae
3 changed files with 43 additions and 16 deletions

View File

@@ -198,20 +198,32 @@ sub __on_msg {
}
if ($just_message_in_chat) {
my $str = $hailo->{$msg->chat->id}->learn_reply ($text);
if ($text =~ /^кто +все +эти +люди *\?$/i) {
$reply = 'Какие люди? Мы здесь вдвоём, только ты и я.';
} elsif ($text =~ /покажи +(сиськи|сиси|титьки) *$/i) {
$reply = Oboobs ();
} elsif ($text =~ /show +(titts|tities|boobs) *$/i) {
$reply = Oboobs ();
} elsif ($text =~ /покажи +(попку|попу) *$/i) {
$reply = Obutts ();
} elsif ($text =~ /show +(ass|butt|butty) *$/i) {
$reply = Obutts ();
} else {
my $str = $hailo->{$msg->chat->id}->learn_reply ($text);
if (defined ($str) && $str ne '') {
$reply = $str;
$phrase = trim $text;
if (defined ($str) && $str ne '') {
$reply = $str;
$phrase = trim $text;
while ($phrase =~ /[\.|\,|\?|\!]$/) {
chop $phrase;
}
while ($phrase =~ /[\.|\,|\?|\!]$/) {
chop $phrase;
}
$phrase = lc $phrase;
$phrase = lc $phrase;
if (fmatch (lc ($reply), $phrase)) {
$reply = RandomCommonPhrase ();
if (fmatch (lc ($reply), $phrase)) {
$reply = RandomCommonPhrase ();
}
}
}
}