[gaim-migrate @ 4639]
[pidgin-git.git] / plugins / gaim.pl
blobc21c6c4f29027a5759923ee3b752b6f69a659478
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");
6 $handle = GAIM::register("Example", "1.0", "goodbye", "");
8 GAIM::print("Perl Says", "Handle $handle");
10 $ver = GAIM::get_info(0);
11 @ids = GAIM::get_info(1);
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";
21 GAIM::command("idle", 6000);
23 GAIM::add_event_handler($handle, "event_buddy_signon", "echo_reply");
24 GAIM::add_timeout_handler($handle, 60, "notify");
26 sub echo_reply {
27 $index = $_[0];
28 $who = $_[1];
29 GAIM::print_to_conv($index, $who, "Hello", 0);
32 sub notify {
33 GAIM::print("1 minute", "gaim test has been loaded for 1 minute");
36 sub goodbye {
37 GAIM::print("You Bastard!", "You killed Kenny!");