annotate plugins/gaim.pl @ 806:67bdecdecbb7

[gaim-migrate @ 816] yay, i think perl is finally working well committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 31 Aug 2000 01:40:58 +0000
parents
children 190cef255530
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 AIM::register("gaim test", "0.0.1", "goodbye", "");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 $ver = AIM::get_info(0);
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 $nam = AIM::get_info(1);
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 $pro = AIM::get_info(2);
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 AIM::print("Perl Says", "Gaim $ver, $nam using $pro");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 # i should probably do something with these to actually test them, huh
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 @bud = AIM::buddy_list();
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 @onl = AIM::online_list();
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 @den = AIM::deny_list();
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 AIM::command("idle", "60000") if ($pro ne "Offline");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 AIM::add_event_handler("event_buddy_signon", "say_hello");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 AIM::add_timeout_handler(600, "notify");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 sub echo_reply {
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 $args = @_;
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 $args =~ s/\"//g;
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 AIM::print_to_conv($args, "Hello");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 }
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 sub notify {
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 AIM::print("10 minutes", "gaim test has been loaded for 10 minutes");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 }
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 sub goodbye {
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 AIM::print("You Bastard!", "You killed Kenny!");
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 }