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.216 by root, Thu Feb 15 14:30:21 2007 UTC vs.
Revision 1.217 by root, Thu Feb 15 21:07:49 2007 UTC

2242} 2242}
2243 2243
2244############################################################################# 2244#############################################################################
2245# the server's init and main functions 2245# the server's init and main functions
2246 2246
2247sub load_resources { 2247sub init_resources {
2248 load_regions sprintf "%s/%s/regions", cf::datadir, cf::mapdir 2248 load_resource_file sprintf "%s/%s/regions", cf::datadir, cf::mapdir
2249 or die "unable to load regions file\n";#d# 2249 or die "unable to load regions file\n";#d#
2250} 2250}
2251 2251
2252sub cfg_load { 2252sub cfg_load {
2253 open my $fh, "<:utf8", cf::confdir . "/config" 2253 open my $fh, "<:utf8", cf::confdir . "/config"
2269 warn $@ if $@; 2269 warn $@ if $@;
2270 } 2270 }
2271} 2271}
2272 2272
2273sub init { 2273sub init {
2274 load_resources; 2274 init_resources;
2275} 2275}
2276 2276
2277sub main { 2277sub main {
2278 # we must not ever block the main coroutine 2278 # we must not ever block the main coroutine
2279 local $Coro::idle = sub { 2279 local $Coro::idle = sub {
2453 _global_reattach; 2453 _global_reattach;
2454 warn "reattaching attachments to maps"; 2454 warn "reattaching attachments to maps";
2455 reattach $_ for values %MAP; 2455 reattach $_ for values %MAP;
2456 2456
2457 warn "loading reloadable resources"; 2457 warn "loading reloadable resources";
2458 load_resources; 2458 init_resources;
2459 2459
2460 warn "leaving sync_job"; 2460 warn "leaving sync_job";
2461 2461
2462 1 2462 1
2463 } or do { 2463 } or do {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines