annotate plugins/gaim.pl @ 3345:037e172e4f3c

[gaim-migrate @ 3364] lalal committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 02 Jul 2002 23:51:05 +0000
parents a83b4a5ffcd6
children cd938f18f3f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1526
190cef255530 [gaim-migrate @ 1536]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 806
diff changeset
1 GAIM::register("gaim test", "0.0.1", "goodbye", "");
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2
1526
190cef255530 [gaim-migrate @ 1536]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 806
diff changeset
3 $ver = GAIM::get_info(0);
2355
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
4 @ids = GAIM::get_info(1);
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5
2355
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
6 $msg = "Gaim $ver:";
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
7 foreach $id (@ids) {
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
8 $pro = GAIM::get_info(7, $id);
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
9 $nam = GAIM::get_info(3, $id);
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
10 $msg .= "\n$nam using $pro";
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
11 }
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12
2355
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
13 GAIM::print("Perl Says", $msg);
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
14
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
15 GAIM::command("idle", 6000);
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
16
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
17 GAIM::add_event_handler("event_buddy_signon", "echo_reply");
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
18 GAIM::add_timeout_handler(60, "notify");
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 sub echo_reply {
2511
a83b4a5ffcd6 [gaim-migrate @ 2524]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2355
diff changeset
21 $index = $_[0];
a83b4a5ffcd6 [gaim-migrate @ 2524]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2355
diff changeset
22 $who = $_[1];
a83b4a5ffcd6 [gaim-migrate @ 2524]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2355
diff changeset
23 GAIM::print_to_conv($index, $who, "Hello", 0);
806
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
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 sub notify {
2355
571971659533 [gaim-migrate @ 2368]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1526
diff changeset
27 GAIM::print("1 minute", "gaim test has been loaded for 1 minute");
806
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
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 sub goodbye {
1526
190cef255530 [gaim-migrate @ 1536]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 806
diff changeset
31 GAIM::print("You Bastard!", "You killed Kenny!");
806
67bdecdecbb7 [gaim-migrate @ 816]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 }