|
Revision 37848, 1.7 kB
(checked in by hirose31, 20 months ago)
|
|
plagger-xmppbot is obsolete.
|
| Line | |
|---|
| 1 | package Plagger::Plugin::Notify::XMPP; |
|---|
| 2 | use strict; |
|---|
| 3 | use base qw( Plagger::Plugin ); |
|---|
| 4 | |
|---|
| 5 | BEGIN { |
|---|
| 6 | warn <<'EOM'; |
|---|
| 7 | This "plagger-xmppbot" is now obsolete. |
|---|
| 8 | I recommend "plagger-xmppanyeventbot.pl" instead. |
|---|
| 9 | http://github.com/yusukebe/Plagger-Plugin-Notify-XMPP-AnyEvent |
|---|
| 10 | |
|---|
| 11 | EOM |
|---|
| 12 | } |
|---|
| 13 | |
|---|
| 14 | our $VERSION = '0.06'; |
|---|
| 15 | |
|---|
| 16 | sub init { |
|---|
| 17 | my $self = shift; |
|---|
| 18 | $self->SUPER::init(@_); |
|---|
| 19 | |
|---|
| 20 | my $class = 'Plagger::Plugin::Notify::XMPP::' . ($self->conf->{direct} =~ /yes/i ? 'Direct' : 'IKC'); |
|---|
| 21 | eval "require $class;"; |
|---|
| 22 | if ($@) { |
|---|
| 23 | Plagger->context->error("failed to load $class"); |
|---|
| 24 | } |
|---|
| 25 | bless $self, $class; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | sub register { |
|---|
| 29 | my($self, $context) = @_; |
|---|
| 30 | |
|---|
| 31 | $context->register_hook( |
|---|
| 32 | $self, |
|---|
| 33 | 'plugin.init' => $self->can('initialize'), |
|---|
| 34 | 'publish.entry' => $self->can('notify'), |
|---|
| 35 | 'publish.finalize' => $self->can('finalize'), |
|---|
| 36 | ); |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | 1; |
|---|
| 40 | __END__ |
|---|
| 41 | |
|---|
| 42 | =head1 NAME |
|---|
| 43 | |
|---|
| 44 | Plagger::Plugin::Notify::XMPP - Notify feed updates to XMPP client |
|---|
| 45 | |
|---|
| 46 | =head1 SYNOPSIS |
|---|
| 47 | |
|---|
| 48 | jabber.org |
|---|
| 49 | |
|---|
| 50 | - module: Notify::XMPP |
|---|
| 51 | config: |
|---|
| 52 | jid: foo@jabber.org |
|---|
| 53 | password: plahplahplah |
|---|
| 54 | to: |
|---|
| 55 | - bar@jabber.org |
|---|
| 56 | - baz@gmail.com |
|---|
| 57 | - qux@jabber.jp |
|---|
| 58 | |
|---|
| 59 | Google Talk |
|---|
| 60 | |
|---|
| 61 | - module: Notify::XMPP |
|---|
| 62 | config: |
|---|
| 63 | jid: foo@gmail.com |
|---|
| 64 | password: plahplahplah |
|---|
| 65 | server_host: talk.google.com |
|---|
| 66 | tls: 1 |
|---|
| 67 | to: |
|---|
| 68 | - bar@jabber.org |
|---|
| 69 | - baz@gmail.com |
|---|
| 70 | - qux@jabber.jp |
|---|
| 71 | |
|---|
| 72 | If you want to connect server directly (not via plagger-xmppbot), |
|---|
| 73 | add "direct: yes" to config section. |
|---|
| 74 | |
|---|
| 75 | =head1 DESCRIPTION |
|---|
| 76 | |
|---|
| 77 | This plugin allows you to notify feed updates to XMPP clients (jabber, |
|---|
| 78 | Google Talk). |
|---|
| 79 | |
|---|
| 80 | =head1 AUTHOR |
|---|
| 81 | |
|---|
| 82 | HIROSE Masaaki (hirose31) |
|---|
| 83 | |
|---|
| 84 | =head1 SEE ALSO |
|---|
| 85 | |
|---|
| 86 | L<Plagger>, L<plagger-xmppbot>, |
|---|
| 87 | L<Plagger::Plugin::Notify::XMPP::IKC>, |
|---|
| 88 | L<Plagger::Plugin::Notify::XMPP::Direct> |
|---|
| 89 | |
|---|
| 90 | =cut |
|---|