]>
iEval git - app-fonbot-daemon.git/blob - BitlBee.pm
7e9aa8da0e2f9ca08274869489a55f626daa3357
1 package App
:: FonBot
:: Plugin
:: BitlBee
;
3 our $VERSION = '0.000_5' ;
9 use parent qw
/App::FonBot::Plugin::IRC/ ;
12 use POE
:: Component
:: IRC
:: Plugin
:: Connector
;
14 use App
:: FonBot
:: Plugin
:: Config qw
/$bitlbee_enabled $bitlbee_nick $bitlbee_server $bitlbee_port $bitlbee_password/ ;
16 ##################################################
19 return unless $bitlbee_enabled ;
22 $self ->{ irc
} = POE
:: Component
:: IRC
-> spawn (
24 Nick
=> $bitlbee_nick ,
25 Username
=> $bitlbee_nick ,
27 Server
=> $bitlbee_server ,
28 Port
=> $bitlbee_port ,
30 $self ->{ irc
}-> yield ( register
=> qw
/msg public/ );
31 $self ->{ irc
}-> yield ( connect => {});
32 $self ->{ irc
}-> plugin_add ( Connector
=> POE
:: Component
:: IRC
:: Plugin
:: Connector
-> new );
34 $_ [ KERNEL
]-> alias_set ( 'BITLBEE' )
38 my ( $self , $msg )= @_ [ OBJECT
, ARG2
];
39 $self ->{ irc
}-> yield ( privmsg
=> '&bitlbee' , "identify $bitlbee_password " ) if $msg =~ /^Welcome to the BitlBee gateway!$/ ;
40 $self ->{ irc
}-> yield ( privmsg
=> '&bitlbee' , 'yes' ) if $msg =~ /New request:/ ;
50 App::FonBot::Plugin::BitlBee - FonBot plugin that provides the BitlBee user interface
54 use App::FonBot::Plugin::BitlBee;
55 App::FonBot::Plugin::BitlBee->init;
57 END { App::FonBot::Plugin::BitlBee->fini }
61 This is one of the two implementations of C<App::FonBot::Plugin::IRC>. It identifies with a bitlbee server, accepts all buddy requests and processes received commands.
63 =head1 CONFIGURATION VARIABLES
65 These are the L<App::FonBot::Plugin::Config> configuration variables used in this module
69 =item C<$bitlbee_enabled>
71 If false, the BitlBee plugin is disabled.
73 =item C<$bitlbee_nick>
77 =item C<$bilbee_server>
79 BitlBee server hostname
81 =item C<$bitlbee_port>
85 =item C<$bitlbee_password>
87 BitlBee identify password
93 Marius Gavrilescu C<< <marius@ieval.ro> >>
95 =head1 COPYRIGHT AND LICENSE
97 Copyright 2013 Marius Gavrilescu
99 This file is part of fonbotd.
101 fonbotd is free software: you can redistribute it and/or modify
102 it under the terms of the GNU Affero General Public License as published by
103 the Free Software Foundation, either version 3 of the License, or
104 (at your option) any later version.
106 fonbotd is distributed in the hope that it will be useful,
107 but WITHOUT ANY WARRANTY; without even the implied warranty of
108 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109 GNU Affero General Public License for more details.
111 You should have received a copy of the GNU Affero General Public License
112 along with fonbotd. If not, see <http://www.gnu.org/licenses/>
This page took 0.05283 seconds and 3 git commands to generate.