ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/NPC_Dialogue.pm
(Generate patch)

Comparing deliantra/server/ext/NPC_Dialogue.pm (file contents):
Revision 1.2 by elmex, Thu Jan 4 15:20:11 2007 UTC vs.
Revision 1.4 by root, Sat Jun 16 14:35:41 2007 UTC

25 $_[0] 25 $_[0]
26} 26}
27 27
28sub new { 28sub 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines