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.
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
1 | use Purple; |
| 6529 | 2 | |
| 3 | %PLUGIN_INFO = ( | |
| 4 | perl_api_version => 2, | |
| 5 | name => 'Test Perl Plugin', | |
| 6 | version => '1.0', | |
| 7 | summary => 'Provides as a test base for the perl plugin.', | |
| 8 | description => 'Provides as a test base for the perl plugin.', | |
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
9 | author => 'Etan Reisner <deryni\@pidgin.im>', |
|
16245
d50689fa41c9
Point to the Pidgin website.
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
10 | url => 'http://pidgin.im', |
| 6529 | 11 | |
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
12 | load => "plugin_load" |
| 6529 | 13 | ); |
| 14 | ||
| 15 | sub plugin_init { | |
| 16 | return %PLUGIN_INFO; | |
| 17 | } | |
| 18 | ||
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
19 | sub account_status_cb { |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
20 | my ($account, $old, $new, $data) = @_; |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
21 | |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
22 | Purple::Debug::info("perl test plugin", "In account_status_cb\n"); |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
23 | |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
24 | Purple::Debug::info("perl test plugin", "Account " . |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
25 | $account->get_username() . " changed status.\n"); |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
26 | Purple::Debug::info("perl test plugin", $data . "\n"); |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
27 | } |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
28 | |
| 6529 | 29 | sub plugin_load { |
| 30 | my $plugin = shift; | |
| 31 | ||
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
32 | Purple::Debug::info("perl test plugin", "plugin_load\n"); |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
33 | |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
34 | Purple::Debug::info("perl test plugin", "Listing accounts.\n"); |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
35 | foreach $account (Purple::Accounts::get_all()) { |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
36 | Purple::Debug::info("perl test plugin", $account->get_username() . "\n"); |
| 6529 | 37 | } |
|
6592
1ce027571e8a
[gaim-migrate @ 7116]
Christian Hammond <chipx86@chipx86.com>
parents:
6529
diff
changeset
|
38 | |
|
22485
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
39 | Purple::Signal::connect(Purple::Accounts::get_handle(), |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
40 | "account-status-changed", $plugin, |
|
dbb14925ce01
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <deryni@pidgin.im>
parents:
22240
diff
changeset
|
41 | \&account_status_cb, "test"); |
| 6529 | 42 | } |