14192
|
1 sub description {
|
|
2 my($a, $b, $c, $d, $e, $f) = @_;
|
|
3 ("Example", "1.0", "An example Gaim perl script that does nothing particularly useful:\n\t-Show a dialog on load\n\t-Set user idle for 6,000 seconds\n\t-Greets people signing on with \"Hello\"\n\t-Informs you when script has been loaded for one minute.", "Eric Warmenhoven <eric\@warmenhoven.org>", "http://gaim.sf.net", "/dev/null");
|
|
4 }
|
|
5
|
|
6 $handle = GAIM::register("Example", "1.0", "goodbye", "");
|
|
7
|
|
8 GAIM::print("Perl Says", "Handle $handle");
|
|
9
|
|
10 $ver = GAIM::get_info(0);
|
|
11 @ids = GAIM::get_info(1);
|
|
12
|
|
13 $msg = "Gaim $ver:";
|
|
14 foreach $id (@ids) {
|
|
15 $pro = GAIM::get_info(7, $id);
|
|
16 $nam = GAIM::get_info(3, $id);
|
|
17 $msg .= "\n$nam using $pro";
|
|
18 }
|
|
19
|
|
20
|
|
21 GAIM::command("idle", 6000);
|
|
22
|
|
23 GAIM::add_event_handler($handle, "event_buddy_signon", "echo_reply");
|
|
24 GAIM::add_timeout_handler($handle, 60, "notify");
|
|
25
|
|
26 sub echo_reply {
|
|
27 $index = $_[0];
|
|
28 $who = $_[1];
|
|
29 GAIM::print_to_conv($index, $who, "Hello", 0);
|
|
30 }
|
|
31
|
|
32 sub notify {
|
|
33 GAIM::print("1 minute", "gaim test has been loaded for 1 minute");
|
|
34 }
|
|
35
|
|
36 sub goodbye {
|
|
37 GAIM::print("You Bastard!", "You killed Kenny!");
|
|
38 }
|
|
39
|