… | |
… | |
42 | } |
42 | } |
43 | |
43 | |
44 | sub tell { |
44 | sub tell { |
45 | my ($self, $msg) = @_; |
45 | my ($self, $msg) = @_; |
46 | |
46 | |
|
|
47 | $msg = lc $msg; |
|
|
48 | |
47 | for my $match (@{ $self->{match} }) { |
49 | for my $match (@{ $self->{match} }) { |
48 | for (split /\|/, $match->[0]) { |
50 | for (split /\|/, $match->[0]) { |
49 | if ($_ eq "*" || $_ eq $msg) { |
51 | if ($_ eq "*" || $msg eq lc) { |
50 | my $reply = $match->[1]; |
52 | my $reply = $match->[1]; |
51 | |
53 | |
52 | # combine lines into paragraphs |
54 | # combine lines into paragraphs |
53 | $reply =~ s/(?<=\S)\n(?=\w)/ /g; |
55 | $reply =~ s/(?<=\S)\n(?=\w)/ /g; |
54 | $reply =~ s/\n\n/\n/g; |
56 | $reply =~ s/\n\n/\n/g; |