aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-03-17 16:16:59 +1300
committerDavid Phillips <david@sighup.nz>2017-03-17 16:16:59 +1300
commitcc613822bf78d1a73e02bc3ddf99bea68babe3ad (patch)
tree1c55c89f306dcf814126c6fcb9d73b251daa5feb
parent63afa0e25d793ef5304ea2ebf7f9d822f0ca76b2 (diff)
downloadidalius-cc613822bf78d1a73e02bc3ddf99bea68babe3ad.tar.xz
Return case-insensitive operation, remove debug print
-rwxr-xr-xsaxrobot5
1 files changed, 2 insertions, 3 deletions
diff --git a/saxrobot b/saxrobot
index 984fd7b..0dcd5f1 100755
--- a/saxrobot
+++ b/saxrobot
@@ -84,15 +84,14 @@ sub irc_public {
my $me = $irc->nick_name;
my $collected_response = "";
- print $config{triggers};
my @expressions = (keys %{$config{triggers}});
my $expression = join '|', @expressions;
- while ($what =~ /($expression)/g) {
+ while ($what =~ /($expression)/gi) {
my $matched = $1;
my $key;
# figure out which key matched
foreach (@expressions) {
- if ($matched =~ /$_/) {
+ if ($matched =~ /$_/i) {
$key = $_;
last;
}