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.1 by root, Mon Jun 19 10:19:51 2006 UTC vs.
Revision 1.2 by root, Sat Jun 24 00:08:58 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines