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