| 1 | package Net::YMSG::NewFriendAlert; | ||
| 2 | use base 'Net::YMSG::Event'; | ||
| 3 | |||
| 4 | |||
| 5 | sub from | ||
| 6 | { | ||
| 7 | my $self = shift; | ||
| 8 | $self->_get_by_name('PROPOSERS_ID'); | ||
| 9 | } | ||
| 10 | |||
| 11 | |||
| 12 | sub to | ||
| 13 | { | ||
| 14 | my $self = shift; | ||
| 15 | $self->_get_by_name('NICKNAME'); | ||
| 16 | } | ||
| 17 | |||
| 18 | |||
| 19 | sub to_string | ||
| 20 | { | ||
| 21 | my $self = shift; | ||
| 22 | sprintf "New Friend Alert: %s added %s as a Friend\nand also sent the following message:\n%s\n", | ||
| 23 | $self->from, $self->to, $self->body; | ||
| 24 | } | ||
| 25 | |||
| 26 | 1; | ||
| 27 | __END__ |