From 1385a107bf5ded851436fc7efeefcafa649a014f Mon Sep 17 00:00:00 2001 From: eleksir Date: Wed, 15 Jan 2020 21:37:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D0=BB=D0=B5=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=B1=D0=BE=D1=82=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B0=D0=B3=D0=B8=D1=80=D1=83=D0=B5=D1=82=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D0=B2=D0=BE=D1=91=20=D0=B8=D0=BC=D1=8F=20?= =?UTF-8?q?=D0=B2=20=D0=BB=D1=8E=D0=B1=D0=BE=D0=BC=20=D1=80=D0=B5=D0=B3?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D1=80=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/telegrambot.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/telegrambot.pm b/lib/telegrambot.pm index 66f58f5..b14b718 100644 --- a/lib/telegrambot.pm +++ b/lib/telegrambot.pm @@ -53,13 +53,13 @@ sub __on_msg { } # phrase directed to bot - if (($text =~ /^${qname}[\,|\:]? (.+)/) or ($text =~ /^${qtname}[\,|\:]? (.+)/)){ + if ((lc($text) =~ /^${qname}[\,|\:]? (.+)/) or (lc($text) =~ /^${qtname}[\,|\:]? (.+)/)){ $reply = $hailo->learn_reply(decode('utf-8', $1)); # bot mention by name - } elsif (($text =~ /.+ ${qname}[\,|\!|\?|\.| ]/) or ($text =~ / $qname$/)) { + } elsif ((lc($text) =~ /.+ ${qname}[\,|\!|\?|\.| ]/) or (lc($text) =~ / $qname$/)) { $reply = $hailo->reply(decode('utf-8', $text)); # bot mention by teleram name - } elsif (($text =~ /.+ ${qtname}[\,|\!|\?|\.| ]/) or ($text =~ / $qtname$/)) { + } elsif ((lc($text) =~ /.+ ${qtname}[\,|\!|\?|\.| ]/) or (lc($text) =~ / $qtname$/)) { $reply = $hailo->reply(decode('utf-8', $text)); # just message in chat } else {