2 changed files with 1 additions and 58 deletions
@ -1,57 +0,0 @@
@@ -1,57 +0,0 @@
|
||||
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 lc $ARGS{-user} }; |
||||
register_hook "protocol_request_info", sub { |
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("protocol_info_received_$ARGS{-user}", |
||||
-profile => 'test', -away => 'test'); |
||||
}); |
||||
}; |
||||
|
||||
register_hook "protocol_send_im", sub { |
||||
hook("after", -time => 500, -code => [sub { |
||||
hook("msg_sent_$_[0]", -user => $_[0], -msg => $_[1], -away => 0); |
||||
hook("after", -time => 500, sub { |
||||
hook("msg_in", -user => $_[0], -msg => $_[1], -away => 0); |
||||
hook("msg_in_$_[0]", -user => $_[0], -msg => $_[1], -away => 0); |
||||
}); |
||||
}, $ARGS{-dest}, $ARGS{-msg}]); |
||||
}; |
||||
register_hook "protocol_away_status", sub { 0 }; |
||||
|
||||
hook("after", -time => 1000, -code => sub { |
||||
hook("buddy_in", -group => 'Buddies', -buddy => 'test_user'); |
||||
}); |
||||
|
||||
# hook("after", -time => 1000, -code => sub { |
||||
# hook("msg_in", -user => 'thatguy', -msg => '<b>hey</b>'); |
||||
# }); |
||||
|
||||
# hook("after", -time => 1500, -code => sub { |
||||
# hook("protocol_send_im", -dest => 'thatguy', -msg => '<b>hey there</b>'); |
||||
|
||||
hook("after", -time => 500, -code => sub { |
||||
register_hook "protocol_chat_accept", sub { |
||||
hook("protocol_chat_joined", -name => 'erer', -user => 'er', |
||||
-url => 'ere'); |
||||
hook("protocol_chat_buddy_in_ere", -user => 'charles'); |
||||
}; |
||||
|
||||
hook("protocol_chat_invited", -user => 'thatguy', |
||||
-url => 'er'); |
||||
}); |
||||
}; |
||||
|
||||
1; |
Loading…
Reference in new issue