Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
| 12988 | 1 | $MODULE_NAME = "Plugin Action Test Plugin"; |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
2 | use Purple; |
| 12988 | 3 | |
| 4 | sub plugin_init { | |
| 5 | return %PLUGIN_INFO; | |
| 6 | } | |
| 7 | ||
| 8 | sub plugin_load { | |
| 9 | my $plugin = shift; | |
| 10 | } | |
| 11 | ||
| 12 | sub plugin_unload { | |
| 13 | my $plugin = shift; | |
| 14 | } | |
| 15 | ||
| 16 | sub fun1 { | |
| 17 | print "1\n"; | |
| 18 | } | |
| 19 | ||
| 20 | sub fun2 { | |
| 21 | print "2\n"; | |
| 22 | } | |
| 23 | ||
| 24 | sub fun3 { | |
| 25 | print "3\n"; | |
| 26 | } | |
| 27 | ||
| 28 | %plugin_actions = ( | |
| 29 | "Action 1" => \&fun1, | |
| 30 | "Action 2" => \&fun2, | |
| 31 | "Action 3" => \&fun3 | |
| 32 | # "Action 1" => sub { print "1\n"; }, | |
| 33 | # "Action 2" => sub { print "2\n"; }, | |
| 34 | # "Action 3" => sub { print "3\n"; } | |
| 35 | ); | |
| 36 | ||
| 37 | sub plugin_action_names { | |
| 38 | foreach $key (keys %plugin_actions) { | |
| 39 | push @array, $key; | |
| 40 | } | |
| 41 | ||
| 42 | return @array; | |
| 43 | } | |
| 44 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
45 | # All the information Purple gets about our nifty plugin |
| 12988 | 46 | %PLUGIN_INFO = ( |
| 47 | perl_api_version => 2, | |
| 48 | name => "Perl: $MODULE_NAME", | |
| 49 | version => "0.1", | |
| 50 | summary => "Test plugin for the Perl interpreter.", | |
| 51 | description => "Just a basic test plugin template.", | |
| 52 | author => "Etan Reisner <deryni\@gmail.com>", | |
| 53 | url => "http://sourceforge.net/users/deryni9/", | |
| 54 | ||
| 55 | load => "plugin_load", | |
| 56 | unload => "plugin_unload", | |
| 57 | plugin_action_sub => "plugin_action_names" | |
| 58 | ); |