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.484 by root, Mon Oct 12 14:00:58 2009 UTC vs.
Revision 1.485 by root, Mon Oct 12 14:12:54 2009 UTC

3383 3383
3384 warn "finished reloading resource files\n"; 3384 warn "finished reloading resource files\n";
3385} 3385}
3386 3386
3387sub reload_config { 3387sub reload_config {
3388 warn "reloading config file...\n";
3389
3388 open my $fh, "<:utf8", "$CONFDIR/config" 3390 open my $fh, "<:utf8", "$CONFDIR/config"
3389 or return; 3391 or return;
3390 3392
3391 local $/; 3393 local $/;
3392 *CFG = YAML::XS::Load <$fh>; 3394 *CFG = YAML::XS::Load scalar <$fh>;
3393 3395
3394 $EMERGENCY_POSITION = $CFG{emergency_position} || ["/world/world_105_115", 5, 37]; 3396 $EMERGENCY_POSITION = $CFG{emergency_position} || ["/world/world_105_115", 5, 37];
3395 3397
3396 $cf::map::MAX_RESET = $CFG{map_max_reset} if exists $CFG{map_max_reset}; 3398 $cf::map::MAX_RESET = $CFG{map_max_reset} if exists $CFG{map_max_reset};
3397 $cf::map::DEFAULT_RESET = $CFG{map_default_reset} if exists $CFG{map_default_reset}; 3399 $cf::map::DEFAULT_RESET = $CFG{map_default_reset} if exists $CFG{map_default_reset};
3401 $CFG{mlockall} ? eval "mlockall()" : eval "munlockall()" 3403 $CFG{mlockall} ? eval "mlockall()" : eval "munlockall()"
3402 and die "WARNING: m(un)lockall failed: $!\n"; 3404 and die "WARNING: m(un)lockall failed: $!\n";
3403 }; 3405 };
3404 warn $@ if $@; 3406 warn $@ if $@;
3405 } 3407 }
3408
3409 warn "finished reloading resource files\n";
3406} 3410}
3407 3411
3408sub pidfile() { 3412sub pidfile() {
3409 sysopen my $fh, $PIDFILE, O_RDWR | O_CREAT 3413 sysopen my $fh, $PIDFILE, O_RDWR | O_CREAT
3410 or die "$PIDFILE: $!"; 3414 or die "$PIDFILE: $!";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines