--- deliantra/server/ext/ipo.ext 2006/12/15 19:29:18 1.1 +++ deliantra/server/ext/ipo.ext 2007/01/07 02:39:14 1.4 @@ -54,7 +54,7 @@ # lets message player ingame: this is a NEW feature from the perl IPO :-) for (keys %sent_targets) { - if (my $player = cf::player::find $_) { + if (my $player = cf::player::find_active $_) { my $cnt = $sent_targets{$_}; if ($cnt == 1) { @@ -74,8 +74,8 @@ $r } -# this handler handles to notice the player that he has got mail -cf::attach_to_players +# this handler notifies the player of new mail +cf::player->attach ( on_login => sub { my ($pl) = @_; @@ -91,10 +91,10 @@ $pl->ob->message ("You haven't got any mail."); } }, -; +); # this event handler handles receiving of mails -cf::register_attachment ipo_mailbox => +cf::object::attachment ipo_mailbox => on_apply => sub { my ($box, $pl) = @_; @@ -169,7 +169,7 @@ my ($cmd, $arguments) = split /\s+/, $msg, 2; $cmd = lc $cmd; - my $pl = cf::player::find $who->name; + my $pl = cf::player::find_active $who->name; my ($x, $y) = ($pl->ob->x, $pl->ob->y); if (my $pr = $prices{$cmd}) { @@ -260,7 +260,7 @@ use POSIX qw/strftime/; use CFDB; -my $MAILDB = CFDB->new (db_file => cf::localdir . "/crossfiremail.perl"); +my $MAILDB = CFDB->new (db_file => cf::localdir . "/crossfiremail"); sub get_mail { my ($toname) = @_;