806
|
1 AIM::register("gaim test", "0.0.1", "goodbye", "");
|
|
2
|
|
3 $ver = AIM::get_info(0);
|
|
4 $nam = AIM::get_info(1);
|
|
5 $pro = AIM::get_info(2);
|
|
6
|
|
7 AIM::print("Perl Says", "Gaim $ver, $nam using $pro");
|
|
8
|
|
9 # i should probably do something with these to actually test them, huh
|
|
10 @bud = AIM::buddy_list();
|
|
11 @onl = AIM::online_list();
|
|
12 @den = AIM::deny_list();
|
|
13
|
|
14 AIM::command("idle", "60000") if ($pro ne "Offline");
|
|
15
|
|
16 AIM::add_event_handler("event_buddy_signon", "say_hello");
|
|
17 AIM::add_timeout_handler(600, "notify");
|
|
18
|
|
19 sub echo_reply {
|
|
20 $args = @_;
|
|
21 $args =~ s/\"//g;
|
|
22 AIM::print_to_conv($args, "Hello");
|
|
23 }
|
|
24
|
|
25 sub notify {
|
|
26 AIM::print("10 minutes", "gaim test has been loaded for 10 minutes");
|
|
27 }
|
|
28
|
|
29 sub goodbye {
|
|
30 AIM::print("You Bastard!", "You killed Kenny!");
|
|
31 }
|