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

Comparing deliantra/server/ext/ipo.ext (file contents):
Revision 1.1 by root, Fri Dec 15 19:29:18 2006 UTC vs.
Revision 1.2 by root, Thu Dec 21 22:41:34 2006 UTC

72 my $r = $cb->($o, @a); 72 my $r = $cb->($o, @a);
73 $map->insert_object ($o, $x, $y); 73 $map->insert_object ($o, $x, $y);
74 $r 74 $r
75} 75}
76 76
77# this handler handles to notice the player that he has got mail 77# this handler notifies the player of new mail
78cf::attach_to_players 78cf::player->attach (
79 on_login => sub { 79 on_login => sub {
80 my ($pl) = @_; 80 my ($pl) = @_;
81 81
82 my $mails = CFMail::get_mail ($pl->ob->name); 82 my $mails = CFMail::get_mail ($pl->ob->name);
83 83
89 $pl->ob->message ("You got $cnt mails."); 89 $pl->ob->message ("You got $cnt mails.");
90 } else { 90 } else {
91 $pl->ob->message ("You haven't got any mail."); 91 $pl->ob->message ("You haven't got any mail.");
92 } 92 }
93 }, 93 },
94; 94);
95 95
96# this event handler handles receiving of mails 96# this event handler handles receiving of mails
97cf::register_attachment ipo_mailbox => 97cf::object::attachment ipo_mailbox =>
98 on_apply => sub { 98 on_apply => sub {
99 my ($box, $pl) = @_; 99 my ($box, $pl) = @_;
100 100
101 my $cnt; 101 my $cnt;
102 my $mails = CFMail::get_mail ($pl->name) || []; 102 my $mails = CFMail::get_mail ($pl->name) || [];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines