--- deliantra/server/ext/map-tags.ext 2007/12/02 15:16:28 1.12 +++ deliantra/server/ext/map-tags.ext 2008/09/23 04:32:57 1.15 @@ -50,7 +50,7 @@ BDB::db_get $db_mapinfo, $txn, $key, my $data; unless ($!) { - $data = from_json $data; + $data = decode_json $data; return if $data->{hash} eq $hash; $old_tags = $data->{tags}; } @@ -61,7 +61,7 @@ or return; my @tags = sort $f->extract_tags; - $data = to_json { hash => $hash, tags => \@tags }; + $data = encode_json { hash => $hash, tags => \@tags }; BDB::db_put $db_mapinfo, $txn, $key, $data; @@ -117,7 +117,7 @@ BDB::db_c_get $cursor, my $key, my $data, BDB::NEXT; last if $!; - my $data = JSON::XS::from_json $data; + my $data = JSON::XS::decode_json $data; my ($ver, undef, undef, $path) = split /,/, $data->{hash}, 4; push @delkeys, [$key, $data->{tags}] if $ver != 1 || Coro::AIO::aio_stat $path; @@ -180,7 +180,9 @@ reload; }; -cf::async { reload }; # force at startup +cf::post_init { + $RELOAD_SCHEDULER->invoke (0); # force at startup +}; # find all objects with the given tag, or at least try to sub find($) {