]>
iEval git - app-fonbot-daemon.git/blob - OFTC.pm
ea4b701680a86fc25db4b6dbb70d81b3ae895db3
1 package App
:: FonBot
:: Plugin
:: OFTC
;
3 our $VERSION = '0.000_5' ;
9 use parent qw
/App::FonBot::Plugin::IRC/ ;
12 use POE
:: Component
:: IRC
:: Plugin
:: AutoJoin
;
13 use POE
:: Component
:: IRC
:: Plugin
:: Connector
;
14 use POE
:: Component
:: IRC
:: Plugin
:: NickServID
;
16 use App
:: FonBot
:: Plugin
:: Config qw
/$oftc_enabled $oftc_nick @oftc_channels $oftc_nickserv_password/ ;
18 ##################################################
21 return unless $oftc_enabled ;
24 $self ->{ irc
} = POE
:: Component
:: IRC
-> spawn (
26 Username
=> $oftc_nick ,
27 Ircname
=> 'FonBot OFTC Transport' ,
28 Server
=> 'irc.oftc.net' ,
32 $self ->{ irc
}-> yield ( register
=> qw
/msg/ );
33 $self ->{ irc
}-> yield ( connect => {});
35 $self ->{ irc
}-> plugin_add ( Connector
=> POE
:: Component
:: IRC
:: Plugin
:: Connector
-> new );
36 $self ->{ irc
}-> plugin_add ( AutoJoin
=> POE
:: Component
:: IRC
:: Plugin
:: AutoJoin
-> new (
37 Channels
=> \
@oftc_channels
40 $self ->{ irc
}-> plugin_add ( NickServID
=> POE
:: Component
:: IRC
:: Plugin
:: NickServID
-> new (
41 Password
=> $oftc_nickserv_password
44 $_ [ KERNEL
]-> alias_set ( 'OFTC' );
53 App::FonBot::Plugin::OFTC - FonBot pluginthat provides the OFTC user interface
57 use App::FonBot::Plugin::OFTC;
58 App::FonBot::Plugin::OFTC->init;
60 END {App::FonBot::Plugin::OFTC->fini};
64 This is one of the two implementations of C<App::FonBot::Plugin::IRC>. It connects to OFTC, joins C<$oftc_channel>, identifies with NickServ using the C<$oftc_nickserv_password> password, and processes received commands.
66 =head1 CONFIGURATION VARIABLES
68 These are the L<App::FonBot::Plugin::Config> configuration variables used in this module
72 =item C<$oftc_enabled>
74 If false, the OFTC plugin is disabled.
80 =item C<@oftc_channels>
82 List of channels to join.
84 =item C<$oftc_nickserv_password>
86 Password to identify to NickServ with.
92 Marius Gavrilescu C<< <marius@ieval.ro> >>
94 =head1 COPYRIGHT AND LICENSE
96 Copyright 2013 Marius Gavrilescu
98 This file is part of fonbotd.
100 fonbotd is free software: you can redistribute it and/or modify
101 it under the terms of the GNU Affero General Public License as published by
102 the Free Software Foundation, either version 3 of the License, or
103 (at your option) any later version.
105 fonbotd is distributed in the hope that it will be useful,
106 but WITHOUT ANY WARRANTY; without even the implied warranty of
107 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
108 GNU Affero General Public License for more details.
110 You should have received a copy of the GNU Affero General Public License
111 along with fonbotd. If not, see <http://www.gnu.org/licenses/>
This page took 0.052465 seconds and 3 git commands to generate.