line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::FonBot::Plugin::Config; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
11
|
use v5.14; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
6
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
416
|
use parent qw/Exporter/; |
|
1
|
|
|
|
|
269
|
|
|
1
|
|
|
|
|
3
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
500
|
use Apache2::Authen::Passphrase; |
|
1
|
|
|
|
|
27311
|
|
|
1
|
|
|
|
|
43
|
|
12
|
1
|
|
|
1
|
|
7
|
use Log::Log4perl qw//; |
|
1
|
|
|
|
|
53
|
|
|
1
|
|
|
|
|
193
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @EXPORT_OK=qw/$oftc_enabled $oftc_nick @oftc_channels $oftc_nickserv_password $bitlbee_enabled $bitlbee_nick $bitlbee_server $bitlbee_port $bitlbee_password $dir $user $group @supplementary_groups $httpd_port $email_batch_seconds $email_from $email_subject/; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
################################################## |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our ($oftc_enabled, $oftc_nick, @oftc_channels, $oftc_nickserv_password); |
19
|
|
|
|
|
|
|
our ($bitlbee_enabled, $bitlbee_nick, $bitlbee_server, $bitlbee_port, $bitlbee_password); |
20
|
|
|
|
|
|
|
our ($dir, $user, $group, @supplementary_groups); |
21
|
|
|
|
|
|
|
our ($httpd_port); |
22
|
|
|
|
|
|
|
our ($email_batch_seconds, $email_from, $email_subject); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
################################################## |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $log=Log::Log4perl->get_logger(__PACKAGE__); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub init{ |
29
|
0
|
|
|
0
|
1
|
|
$log->info('reading config file'); |
30
|
0
|
0
|
|
|
|
|
unless (my $ret = do '/etc/fonbotd/config.pl') { |
31
|
0
|
0
|
|
|
|
|
die "Cannot parse config file: $@" if $@; |
32
|
0
|
0
|
|
|
|
|
die "Cannot run config file: $!" unless $ret; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub fini{ |
37
|
|
|
|
|
|
|
#no-op |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |