1 changed files with 29 additions and 0 deletions
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
package NetDemo; |
||||
|
||||
use Milkbone; |
||||
|
||||
use strict; |
||||
use warnings; |
||||
|
||||
register_hook "protocol_signon", sub { |
||||
hook("after", -time => 10, -code => sub { hook("signed_in") }); |
||||
|
||||
register_hook "protocol_add_buddy", sub { hook("buddy_in", -buddy => |
||||
$ARGS{-buddy}, -group => $ARGS{-group}); }; |
||||
|
||||
register_hook "protocol_get_groups", sub { return ["Buddies", "You"] }; |
||||
register_hook "protocol_get_realname", sub { return uc $ARGS{-user} }; |
||||
register_hook "protocol_request_info", sub { |
||||
hook("protocol_info_received_$ARGS{-user}", |
||||
-profile => 'test', -away => 'test'); |
||||
}; |
||||
|
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("buddy_in", -group => 'Buddies', -buddy => $_); }) |
||||
for qw(althor57 perlmonk86); |
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("msg_in", -user => 'thatguy', -msg => '<b>hey</b>'); |
||||
}); |
||||
}; |
||||
|
||||
1; |
Loading…
Reference in new issue