ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-tags.ext
(Generate patch)

Comparing deliantra/server/ext/map-tags.ext (file contents):
Revision 1.8 by root, Mon Sep 17 11:45:41 2007 UTC vs.
Revision 1.11 by root, Wed Nov 14 10:05:16 2007 UTC

104} 104}
105 105
106sub reload { 106sub reload {
107 my $guard = cf::lock_acquire "map-tags::reload"; 107 my $guard = cf::lock_acquire "map-tags::reload";
108 108
109 my $start = Event::time; 109 my $start = EV::time;
110 110
111 # 1. check for maps no longer existing 111 # 1. check for maps no longer existing
112 { 112 {
113 my @delkeys; 113 my @delkeys;
114 114
169# delete $map->{deny_reset}; 169# delete $map->{deny_reset};
170# } 170# }
171# } 171# }
172# } 172# }
173 173
174 warn sprintf "map-tag scan (%fs)", Event::time - $start; 174 warn sprintf "map-tag scan (%fs)", EV::time - $start;
175} 175}
176 176
177our $RELOAD_SCHEDULER = Event->timer ( 177our $RELOAD_SCHEDULER = cf::periodic $SCHEDULE_INTERVAL, Coro::unblock_sub {
178 after => 0,
179 interval => $SCHEDULE_INTERVAL,
180 data => cf::WF_AUTOCANCEL,
181 cb => Coro::unblock_sub {
182 $Coro::current->prio (Coro::PRIO_MIN); 178 $Coro::current->prio (Coro::PRIO_MIN);
179 $Coro::current->desc ("map-tag scanner");
183 reload; 180 reload;
184 }, 181};
185);
186 182
187# find all objects with the given tag, or at least try to 183# find all objects with the given tag, or at least try to
188sub find($) { 184sub find($) {
189 my ($tag) = @_; 185 my ($tag) = @_;
190 186

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines