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

Comparing deliantra/maps/perl/NPC_Dialogue.pm (file contents):
Revision 1.2 by root, Sat Jun 24 00:08:58 2006 UTC vs.
Revision 1.3 by root, Sat Jun 24 00:16:33 2006 UTC

42} 42}
43 43
44sub tell { 44sub 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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines