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

Comparing deliantra/server/ext/rent.ext (file contents):
Revision 1.10 by root, Tue Jun 26 04:56:10 2007 UTC vs.
Revision 1.12 by root, Wed Nov 14 08:09:46 2007 UTC

44 $pl->{rent}{balance} += $offline + $online; 44 $pl->{rent}{balance} += $offline + $online;
45} 45}
46 46
47sub pay_balance { 47sub pay_balance {
48 my ($pl) = @_; 48 my ($pl) = @_;
49
50 cf::cede_to_tick;
49 51
50 update_balance $pl; 52 update_balance $pl;
51 53
52 return unless $pl->{rent}{balance} > 0; 54 return unless $pl->{rent}{balance} > 0;
53 55
181 reject_entry $pl; 183 reject_entry $pl;
182 } 184 }
183 }, 185 },
184; 186;
185 187
186our $RENT_TIMER = Event->timer ( 188our $RENT_TIMER = cf::periodic 3600, Coro::unblock_sub {
187 reentrant => 0,
188 after => 60,
189 interval => 3600,
190 data => cf::WF_AUTOCANCEL,
191 cb => sub {
192 pay_balance $_ for cf::player::list; 189 pay_balance $_ for cf::player::list;
193 }, 190};
194);
195 191

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines