… | |
… | |
25 | $_[0] |
25 | $_[0] |
26 | } |
26 | } |
27 | |
27 | |
28 | sub new { |
28 | sub new { |
29 | my ($class, %arg) = @_; |
29 | my ($class, %arg) = @_; |
|
|
30 | |
|
|
31 | $arg{ob} = $arg{pl}->ob; |
30 | |
32 | |
31 | my $self = bless { |
33 | my $self = bless { |
32 | %arg, |
34 | %arg, |
33 | }, $class; |
35 | }, $class; |
34 | |
36 | |
… | |
… | |
196 | my $lcmsg = lc $msg; |
198 | my $lcmsg = lc $msg; |
197 | |
199 | |
198 | topic: |
200 | topic: |
199 | for my $match (@{ $self->{match} }) { |
201 | for my $match (@{ $self->{match} }) { |
200 | for (split /\|/, $match->[0]) { |
202 | for (split /\|/, $match->[0]) { |
201 | if ($_ eq "*" || $lcmsg eq lc) { |
203 | if ($_ eq "*" || $lcmsg =~ /\b\Q$_\E\b/i) { |
202 | my $reply = $match->[1]; |
204 | my $reply = $match->[1]; |
203 | my @kw; |
205 | my @kw; |
204 | |
206 | |
205 | my @replies; |
207 | my @replies; |
206 | my @match; # @match/@parse command results |
208 | my @match; # @match/@parse command results |