root/lang/perl/plagger/lib/Plagger/Plugin/Notify/XMPP.pm

Revision 37848, 1.7 kB (checked in by hirose31, 20 months ago)

plagger-xmppbot is obsolete.

Line 
1package Plagger::Plugin::Notify::XMPP;
2use strict;
3use base qw( Plagger::Plugin );
4
5BEGIN {
6    warn <<'EOM';
7This "plagger-xmppbot" is now obsolete.
8I recommend "plagger-xmppanyeventbot.pl" instead.
9http://github.com/yusukebe/Plagger-Plugin-Notify-XMPP-AnyEvent
10
11EOM
12}
13
14our $VERSION = '0.06';
15
16sub 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
28sub 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
391;
40__END__
41
42=head1 NAME
43
44Plagger::Plugin::Notify::XMPP - Notify feed updates to XMPP client
45
46=head1 SYNOPSIS
47
48jabber.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
59Google 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
72If you want to connect server directly (not via plagger-xmppbot),
73add "direct: yes" to config section.
74
75=head1 DESCRIPTION
76
77This plugin allows you to notify feed updates to XMPP clients (jabber,
78Google Talk).
79
80=head1 AUTHOR
81
82HIROSE Masaaki (hirose31)
83
84=head1 SEE ALSO
85
86L<Plagger>, L<plagger-xmppbot>,
87L<Plagger::Plugin::Notify::XMPP::IKC>,
88L<Plagger::Plugin::Notify::XMPP::Direct>
89
90=cut
Note: See TracBrowser for help on using the browser.