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

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.303 by root, Wed Jul 11 15:57:31 2007 UTC vs.
Revision 1.305 by root, Thu Jul 12 08:40:14 2007 UTC

1489 my ($path) = @_; 1489 my ($path) = @_;
1490 1490
1491 my ($match, $specificity); 1491 my ($match, $specificity);
1492 1492
1493 for my $region (list) { 1493 for my $region (list) {
1494 if ($region->match && $path =~ $region->match) { 1494 if ($region->{match} && $path =~ $region->{match}) {
1495 ($match, $specificity) = ($region, $region->specificity) 1495 ($match, $specificity) = ($region, $region->specificity)
1496 if $region->specificity > $specificity; 1496 if $region->specificity > $specificity;
1497 } 1497 }
1498 } 1498 }
1499 1499
2465=cut 2465=cut
2466 2466
2467sub cf::client::ext_event($$%) { 2467sub cf::client::ext_event($$%) {
2468 my ($self, $type, %msg) = @_; 2468 my ($self, $type, %msg) = @_;
2469 2469
2470 return unless $self->extcmd;
2471
2470 $msg{msgtype} = "event_$type"; 2472 $msg{msgtype} = "event_$type";
2471 $self->send_packet ("ext " . $self->{json_coder}->encode (\%msg)); 2473 $self->send_packet ("ext " . $self->{json_coder}->encode (\%msg));
2472} 2474}
2473 2475
2474=item $success = $client->query ($flags, "text", \&cb) 2476=item $success = $client->query ($flags, "text", \&cb)
2783} 2785}
2784 2786
2785sub reload_regions { 2787sub reload_regions {
2786 load_resource_file "$MAPDIR/regions" 2788 load_resource_file "$MAPDIR/regions"
2787 or die "unable to load regions file\n"; 2789 or die "unable to load regions file\n";
2790
2791 for (cf::region::list) {
2792 $_->{match} = qr/$_->{match}/
2793 if exists $_->{match};
2794 }
2788} 2795}
2789 2796
2790sub reload_facedata { 2797sub reload_facedata {
2791 load_facedata "$DATADIR/facedata" 2798 load_facedata "$DATADIR/facedata"
2792 or die "unable to load facedata\n"; 2799 or die "unable to load facedata\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines