4
0

Pisg.pm 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. package Pisg;
  2. # Documentation(POD) for this module is found at the end of the file.
  3. # Copyright (C) 2001-2012 The pisg project
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. use strict;
  19. $^W = 1;
  20. sub new
  21. {
  22. my $type = shift;
  23. my %args = @_;
  24. my $self = {
  25. override_cfg => $args{override_cfg},
  26. use_configfile => $args{use_configfile},
  27. search_path => $args{search_path},
  28. chans => [],
  29. users => {},
  30. cfg => {},
  31. tmps => {},
  32. };
  33. # Set the default configuration settings.
  34. get_default_config_settings($self);
  35. # Import common functions in Pisg::Common
  36. require Pisg::Common;
  37. Pisg::Common->import();
  38. bless($self, $type);
  39. return $self;
  40. }
  41. sub run
  42. {
  43. my $self = shift;
  44. print "pisg v$self->{cfg}->{version} - Perl IRC Statistics Generator\n\n"
  45. unless ($self->{cfg}->{silent});
  46. # Init the configuration file (aliases, ignores, channels, etc)
  47. my $r;
  48. if ($self->{use_configfile}) {
  49. foreach my $c ($self->{cfg}->{configfile}, $self->{search_path} . "/$self->{cfg}->{configfile}") {
  50. if (open(CONFIG, $c)) {
  51. $self->{cfg}->{configfile} = $c;
  52. print "Using config file: $self->{cfg}->{configfile}\n\n"
  53. unless ($self->{cfg}->{silent});
  54. $r = $self->init_config(\*CONFIG);
  55. last;
  56. } else {
  57. print STDERR "Warning: $c: $!\n\n" if -e $c;
  58. }
  59. }
  60. }
  61. # Get translations from langfile
  62. $self->get_language_templates();
  63. # Parse any channels in <channel> statements
  64. $self->parse_channels();
  65. # Optionaly parse the channel we were given in override_cfg.
  66. $self->do_channel()
  67. if (!$self->{cfg}->{chan_done}{$self->{cfg}->{channel}});
  68. }
  69. sub get_default_config_settings
  70. {
  71. my $self = shift;
  72. # This is all the default settings of pisg. They can be overriden by the
  73. # pisg.cfg file, or by using the override_cfg argument to the new
  74. # constructor.
  75. $self->{cfg} = {
  76. channel => '',
  77. logtype => 'Logfile',
  78. logfile => [],
  79. format => '',
  80. network => 'SomeIRCNet',
  81. outputfile => 'index.html',
  82. outputtag => '',
  83. maintainer => 'MAINTAINER',
  84. pagehead => 'none',
  85. pagefoot => 'none',
  86. configfile => 'pisg.cfg',
  87. imagepath => '',
  88. imageglobpath => '',
  89. defaultpic => '',
  90. logdir => [],
  91. nfiles => 0,
  92. lang => 'EN',
  93. langfile => 'lang.txt',
  94. cssdir => 'layout/',
  95. colorscheme => 'default',
  96. altcolorscheme => 'none',
  97. logprefix => '',
  98. logsuffix => '',
  99. silent => 0,
  100. cachedir => '',
  101. channelindex => 'channels.json',
  102. userpics => 'y',
  103. # Colors / Layout
  104. hicell => '#BABADD', # FIXME
  105. hicell2 => '#CCCCCC', # FIXME
  106. picwidth => '',
  107. picheight => '',
  108. pic_v_0 => 'blue-v',
  109. pic_v_6 => 'green-v',
  110. pic_v_12 => 'yellow-v',
  111. pic_v_18 => 'red-v',
  112. pic_h_0 => 'blue-h',
  113. pic_h_6 => 'green-h',
  114. pic_h_12 => 'yellow-h',
  115. pic_h_18 => 'red-h',
  116. piclocation => '.',
  117. # Stats settings
  118. showactivetimes => 1,
  119. showactivenicks => 1,
  120. showbignumbers => 1,
  121. showtopics => 1,
  122. showlinetime => 0,
  123. showwordtime => 0,
  124. showlines => 1,
  125. showtime => 1,
  126. showwords => 0,
  127. showwpl => 0,
  128. showcpl => 0,
  129. showlastseen => 1,
  130. showlegend => 1,
  131. showkickline => 1,
  132. showactionline => 1,
  133. showfoulline => 0,
  134. showfouldecimals => 1,
  135. showshoutline => 1,
  136. showviolentlines => 1,
  137. showrandquote => 1,
  138. showmuw => 1,
  139. showmrn => 1,
  140. showsmileys => 0,
  141. showkarma => 0,
  142. showmru => 1,
  143. showcharts => 0,
  144. showops => 1,
  145. showvoices => 0,
  146. showhalfops => 0,
  147. showmostnicks => 0,
  148. showactivegenders => 0,
  149. showmostactivebyhour => 0,
  150. showmostactivebyhourgraph => 1,
  151. showonlytop => 0,
  152. # Less important things
  153. timeoffset => '+0',
  154. minquote => 25,
  155. maxquote => 65,
  156. quotewidth => 80,
  157. bignumbersthreshold => 'sqrt',
  158. wordlength => 5,
  159. dailyactivity => 0,
  160. activenicks => 25,
  161. activenicks2 => 30,
  162. activenicksbyhour => 10,
  163. topichistory => 3,
  164. urlhistory => 5,
  165. chartshistory => 5,
  166. nickhistory => 5,
  167. smileyhistory => 10,
  168. karmahistory => 5,
  169. wordhistory => 10,
  170. mostnickshistory => 5,
  171. mostnicksverbose => 1,
  172. nicklimit => 10,
  173. nicktracking => 0,
  174. charset => 'iso-8859-1',
  175. logcharset => '',
  176. logcharsetfallback => '',
  177. # sorting
  178. sortbywords => 0,
  179. # Misc settings
  180. foulwords => 'ass fuck bitch shit scheisse scheiße kacke arsch ficker ficken schlampe',
  181. violentwords => 'slaps beats smacks',
  182. chartsregexp => '(?:is )?(?:np:|(?:now )?playing:? |listening to:? )(?:MPEG stream from)?\s*(.*)',
  183. ignorewords => '',
  184. badurls => '',
  185. shownavbar => 1,
  186. homelink => '',
  187. showoverview => 1,
  188. showrelations => 1,
  189. relationnicks => 30,
  190. relationminweight => 3,
  191. showtimepersonalities => 1,
  192. showconcentration => 1,
  193. showsignaturewords => 1,
  194. noignoredquotes => 0,
  195. tablewidth => 574,
  196. regexpaliases => 0,
  197. botnicks => '', # Needed for DCpp format (non-irc)
  198. statsdump => '', # Debug option
  199. modules_dir => '', # set in get_cmdline_options
  200. cchannels => '', # set in get_cmdline_options
  201. version => "1.0.a"
  202. };
  203. # This enables us to use the search_path in other modules
  204. $self->{cfg}->{search_path} = $self->{search_path};
  205. # Parse the optional overriden configuration variables
  206. foreach my $key (keys %{$self->{override_cfg}}) {
  207. if ($self->{override_cfg}->{$key}) {
  208. unless (defined($self->{cfg}->{$key})) {
  209. print STDERR "Warning: No such configuration option: -cfg $key\n";
  210. next;
  211. }
  212. $self->{cfg}->{$key} = $self->{override_cfg}->{$key};
  213. }
  214. }
  215. }
  216. sub get_language_templates
  217. {
  218. my $self = shift;
  219. open(FILE, $self->{cfg}->{langfile}) or open (FILE, $self->{search_path} . "/$self->{cfg}->{langfile}") or die("$0: Unable to open language file($self->{cfg}->{langfile}): $!\n");
  220. while (my $line = <FILE>)
  221. {
  222. next if ($line =~ /^#/);
  223. if ($line =~ /<lang name=\"([^"]+)\"(?: charset=\"(.*)\")?>/i) {
  224. # Found start tag, setting the current language
  225. my $current_lang = uc($1);
  226. $self->{tmps}->{$current_lang}{lang_charset} = lc($2);
  227. while (<FILE>) {
  228. next if ($_ =~ /^#/);
  229. last if ($_ =~ /<\/lang>/i);
  230. # Get 'template = "Text"' in language file:
  231. if ($_ =~ /^(\w+)\s*=\s*"(.*)"\s*$/) {
  232. warn "duplicate translation $1 -> $2"
  233. if $self->{tmps}->{$current_lang}{$1} and !$self->{cfg}->{silent};
  234. $self->{tmps}->{$current_lang}{$1} = $2;
  235. }
  236. }
  237. }
  238. }
  239. close(FILE);
  240. }
  241. sub init_config
  242. {
  243. my $self = shift;
  244. my $fh = shift;
  245. while (my $line = <$fh>)
  246. {
  247. next if ($line =~ /^\s*#/);
  248. chomp $line;
  249. if ($line =~ /<user.*>/) {
  250. my $nick;
  251. if ($line =~ /\bnick=(["'])(.+?)\1/) {
  252. $nick = $2;
  253. add_alias($nick, $nick);
  254. } else {
  255. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: No nick specified\n";
  256. next;
  257. }
  258. if ($line =~ /\balias=(["'])(.+?)\1/) {
  259. my @thisalias = split(/\s+/, lc($2));
  260. foreach (@thisalias) {
  261. if ($self->{cfg}->{regexpaliases} and /[\|\[\]\{\}\(\)\?\+\.\*\^\\]/) {
  262. add_aliaswild($nick, $_);
  263. } elsif (not $self->{cfg}->{regexpaliases} and s/\*/\.\*/g) {
  264. # quote it if it is a wildcard
  265. s/([\|\[\]\{\}\(\)\?\+\^\\])/\\$1/g;
  266. add_aliaswild($nick, $_);
  267. } else {
  268. add_alias($nick, $_);
  269. }
  270. }
  271. }
  272. if ($line =~ /\bpic=(["'])(.+?)\1/) {
  273. $self->{users}->{userpics}{$nick} = $2;
  274. }
  275. if ($line =~ /\bbigpic=(["'])(.+?)\1/) {
  276. $self->{users}->{biguserpics}{$nick} = $2;
  277. }
  278. if ($line =~ /\blink=(["'])(.+?)\1/) {
  279. $self->{users}->{userlinks}{$nick} = $2;
  280. }
  281. if ($line =~ /\bignore=(["'])Y\1/i) {
  282. add_ignore($nick);
  283. }
  284. if ($line =~ /\bsex=(["'])([MmFfBb])\1/) {
  285. $self->{users}->{sex}{$nick} = lc($2);
  286. }
  287. } elsif ($line =~ /<link(.*)>/) {
  288. if ($line =~ /\burl=(["'])(.+?)\1/) {
  289. my $url = $2;
  290. if ($line =~ /ignore="Y"/i) {
  291. add_url_ignore($url);
  292. }
  293. } else {
  294. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: No URL specified\n";
  295. }
  296. } elsif ($line =~ /<set(.*)>/) {
  297. my $settings = $1;
  298. if ($settings !~ /=["'](.*)["']/ || $settings =~ /(\w)>/ ) {
  299. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Missing or wrong quotes near $1\n";
  300. }
  301. while ($settings =~ s/[ \t]([^=]+?)=(["'])(.*?)\2//) {
  302. my $var = lc($1);
  303. my $val = $3;
  304. $var =~ s/ //; # Remove whitespace
  305. if (!defined($self->{cfg}->{$var})) {
  306. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: No such configuration option: '$var'\n";
  307. next;
  308. }
  309. unless (($self->{cfg}->{$var} eq $val) || $self->{override_cfg}->{$var}) {
  310. $self->{cfg}->{$var} = $val;
  311. }
  312. }
  313. } elsif ($line =~ /<channel=(['"])(.+?)\1(.*)>/i) {
  314. my ($channel, $settings, $tmp) = ($2, $3, {});
  315. $tmp->{$channel}->{channel} = $channel;
  316. $self->{cfg}->{chan_done}{$self->{cfg}->{channel}} = 1; # don't parse channel in $self->{cfg}->{channel} if a channel statement is present
  317. while ($settings =~ s/\s([^=]+)=(["'])(.*?)\2//) {
  318. my $var = lc($1);
  319. my $val = $3;
  320. if ($var eq "logdir" || $var eq "logfile") {
  321. push(@{$tmp->{$channel}{$var}}, $val);
  322. } else {
  323. $tmp->{$channel}{$var} = $val;
  324. }
  325. }
  326. while (<$fh>) {
  327. next if /^\s*#/;
  328. if ($_ =~ /<\/*channel>/i) {
  329. push @{ $self->{chans} }, $tmp;
  330. last;
  331. }
  332. if ($_ =~ /^\s*(\w+)\s*=\s*(["'])(.*?)\2/) {
  333. my $var = lc($1);
  334. my $val = $3;
  335. unless ((($var eq "logdir" || $var eq "logfile") && scalar(@{$self->{override_cfg}->{$var}}) > 0) || (($var ne "logdir" && $var ne "logfile") && $self->{override_cfg}->{$var})) {
  336. if($var eq "logdir" || $var eq "logfile") {
  337. push @{$tmp->{$channel}{$var}}, $val;
  338. } else {
  339. $tmp->{$channel}{$var} = $val;
  340. }
  341. }
  342. } elsif ($_ !~ /^$/) {
  343. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Unrecognized line: $_";
  344. }
  345. }
  346. } elsif ($line =~ /<include\s*=\s*(["'])(.+?)\1\s*>/) {
  347. my $include_cfg = $2;
  348. my $backup_cfg = $self->{cfg}->{configfile};
  349. $self->{cfg}->{configfile} = $include_cfg;
  350. my $r;
  351. foreach my $c ($self->{cfg}->{configfile}, $self->{search_path} . "/$self->{cfg}->{configfile}") {
  352. if (open(INCLUDE, $c)) {
  353. $self->{cfg}->{configfile} = $c;
  354. $r = $self->init_config(\*INCLUDE);
  355. last;
  356. } else {
  357. print STDERR "Warning: $backup_cfg, line $.: $c: $!\n"
  358. if -e $c;
  359. }
  360. }
  361. print "Included config file: $self->{cfg}->{configfile}\n\n"
  362. if ($r && !$self->{cfg}->{silent});
  363. print STDERR "Warning: $backup_cfg, line $.: $self->{cfg}->{configfile} not found\n"
  364. if (!$r);
  365. $self->{cfg}->{configfile} = $backup_cfg;
  366. } elsif ($line =~ /<(\w+)?.*[^>]$/) {
  367. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Missing end on element <$1 (probably multi-line?)\n";
  368. } elsif ($line =~ /\S/) {
  369. $line =~ s/\n//;
  370. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Unrecognized line: $line\n";
  371. }
  372. }
  373. close($fh);
  374. }
  375. sub init_pisg
  376. {
  377. my $self = shift;
  378. my $timestamp = time();
  379. $self->{cfg}->{start} = time();
  380. if ($self->{cfg}->{timeoffset} =~ /\+(\d+)/) {
  381. # We must plus some hours to the time
  382. $timestamp += 3600 * $1; # 3600 seconds per hour
  383. } elsif ($self->{cfg}->{timeoffset} =~ /-(\d+)/) {
  384. # We must remove some hours from the time
  385. $timestamp -= 3600 * $1; # 3600 seconds per hour
  386. }
  387. $self->{cfg}->{timestamp} = $timestamp;
  388. # convert wordlists
  389. $self->{cfg}->{foulwords} = wordlist_regexp($self->{cfg}->{foulwords}, $self->{cfg}->{regexpaliases});
  390. $self->{cfg}->{ignorewords} = wordlist_regexp($self->{cfg}->{ignorewords}, $self->{cfg}->{regexpaliases});
  391. $self->{cfg}->{violentwords} = wordlist_regexp($self->{cfg}->{violentwords}, $self->{cfg}->{regexpaliases});
  392. # Add trailing slash when it's not there..
  393. $self->{cfg}->{imagepath} =~ s/([^\/])$/$1\//;
  394. # Set ImageGlobPath default
  395. $self->{cfg}->{imageglobpath} ||= $self->{cfg}->{imagepath};
  396. $self->{cfg}->{imageglobpath} =~ s/([^\/])$/$1\//;
  397. # Set number of picture columns to show
  398. if ($self->{cfg}->{userpics} =~ /^n/i) {
  399. $self->{cfg}->{userpics} = 0;
  400. } elsif ($self->{cfg}->{userpics} =~ /^y/i) {
  401. $self->{cfg}->{userpics} = 1;
  402. } elsif ($self->{cfg}->{userpics} !~ /^\d+$/) {
  403. print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Invalid UserPics setting\n";
  404. }
  405. unless ($self->{cfg}->{silent}) {
  406. print "Statistics for channel $self->{cfg}->{channel} \@ $self->{cfg}->{network} by $self->{cfg}->{maintainer}\n\n";
  407. }
  408. }
  409. sub do_channel
  410. {
  411. my $self = shift;
  412. if (!$self->{cfg}->{channel}) {
  413. print STDERR "No channels defined.\n";
  414. } elsif ((!@{$self->{cfg}->{logfile}}) && (!@{$self->{cfg}->{logdir}})) {
  415. print STDERR "No logfile or logdir defined for " . $self->{cfg}->{channel} . "\n";
  416. } elsif (!$self->{cfg}->{format}) {
  417. print STDERR "No format defined for $self->{cfg}->{channel}.\n";
  418. } else {
  419. $self->init_pisg(); # Init some general things
  420. $self->{aliases_stored} = 1;
  421. store_aliases(); # Save the aliases so we can restore them
  422. # later, we don't want to add the aliases
  423. # for this channel to the next channel
  424. # Pick our stats generator.
  425. my $analyzer;
  426. eval <<_END;
  427. use Pisg::Parser::$self->{cfg}->{logtype};
  428. \$analyzer = new Pisg::Parser::$self->{cfg}->{logtype}(
  429. { cfg => \$self->{cfg}, users => \$self->{users} }
  430. );
  431. _END
  432. if ($@) {
  433. print STDERR "Could not load stats analyzer for '$self->{cfg}->{logtype}': $@\n";
  434. return undef;
  435. }
  436. my $stats = $analyzer->analyze();
  437. $self->{cfg}->{analyzer} = $analyzer; # we need the parser in _format_line
  438. # Initialize HTMLGenerator object
  439. my $generator;
  440. eval <<_END;
  441. use Pisg::HTMLGenerator;
  442. \$generator = new Pisg::HTMLGenerator(
  443. cfg => \$self->{cfg},
  444. stats => \$stats,
  445. users => \$self->{users},
  446. tmps => \$self->{tmps}
  447. );
  448. _END
  449. if ($@) {
  450. print STDERR "Could not load stats generator (Pisg::HTMLGenerator): $@\n";
  451. return undef;
  452. }
  453. # Create our HTML page if the logfile has any data.
  454. if (defined $stats) {
  455. if ($stats->{parsedlines} > 0) {
  456. foreach my $lang (split /\s*,\s*/, uc $self->{cfg}->{lang}) {
  457. $lang =~ s/-/_/g; # PT_BR was called PT-BR before
  458. die sprintf "No such language: %s\n", $_ unless $self->{tmps}->{$lang};
  459. $generator->create_output($lang);
  460. }
  461. } else {
  462. print STDERR <<_END unless $self->{cfg}->{silent};
  463. No parseable lines found in logfile ($stats->{totallines} total lines). Skipping.
  464. -> You might be using the wrong format.
  465. -> A common error is that the logs do not contain timestamps for each line.
  466. _END
  467. }
  468. }
  469. restore_aliases();
  470. $self->{aliases_stored} = 0;
  471. $self->{cfg}->{chan_done}{$self->{cfg}->{channel}} = 1;
  472. }
  473. }
  474. sub parse_channels
  475. {
  476. my $self = shift;
  477. my %origcfg = %{ $self->{cfg} };
  478. # make a list of channels to do
  479. my @chanlist;
  480. if (scalar @ {$self->{cfg}->{cchannels} } > 0) {
  481. foreach my $channel (@{ $self->{cfg}->{cchannels} }) {
  482. my $hits = 0;
  483. foreach ( @{ $self->{chans} }) {
  484. my $chan = (keys %{ $_ })[0];
  485. if (lc($channel) eq lc($chan)) {
  486. push @chanlist, $_;
  487. $hits++;
  488. }
  489. }
  490. if ($hits < 1) {
  491. print STDERR "Channel $channel not in config file, ignoring\n";
  492. }
  493. }
  494. } else {
  495. push @chanlist, $_ foreach (@{ $self->{chans} });
  496. }
  497. foreach my $channel (@chanlist) {
  498. foreach my $chan (keys %{ $channel }) { # import channel specific config
  499. $self->{cfg}->{$_} = $channel->{$chan}->{$_} foreach (keys %{ $channel->{$chan} });
  500. }
  501. # One channel that cannot be read (a missing log folder, a bad format) must not stop the others:
  502. # say so, carry on, and let the exit status tell cron that something failed.
  503. my $name = $self->{cfg}->{channel};
  504. unless (eval { $self->do_channel(); 1 }) {
  505. my $why = $@; $why =~ s/\s+$//;
  506. print STDERR "Skipped channel $name: $why\n";
  507. $self->{failed_channels}++;
  508. restore_aliases() if $self->{aliases_stored};
  509. $self->{aliases_stored} = 0;
  510. }
  511. $origcfg{chan_done} = $self->{cfg}->{chan_done};
  512. %{ $self->{cfg} } = %origcfg;
  513. }
  514. }
  515. 1;
  516. __END__
  517. =head1 NAME
  518. Pisg - Perl IRC Statistics Generator main module
  519. =head1 SYNOPSIS
  520. use Pisg;
  521. $pisg = new Pisg(
  522. use_configfile => '1',
  523. override_cfg => { network => 'MyNetwork', format => 'eggdrop' }
  524. );
  525. $pisg->run();
  526. =head1 DESCRIPTION
  527. C<Pisg> is a statistic generator for IRC logfiles or the like, delivering
  528. the results in a HTML page.
  529. =head1 CONSTRUCTOR
  530. =over 4
  531. =item new ( [ OPTIONS ] )
  532. This is the constructor for a new Pisg object. C<OPTIONS> are passed in a hash like fashion, using key and value pairs.
  533. Possible options are:
  534. B<use_configfile> - When set to 1, pisg will look up it's channels in it's
  535. configuration file, defined by the configuration option 'configfile'.
  536. B<override_cfg> - This defines whichever configuration variables you want to
  537. override from the configuration file. If you set use_configfile to 0, then
  538. you'll have to set at least channel and logfile here.
  539. B<search_path> - This defines an optional search path. It's used when you want to hardcode an alternative path where pisg should look after its language and config file.
  540. =back
  541. =head1 AUTHOR
  542. Morten Brix Pedersen <morten@wtf.dk>
  543. Christoph Berg <cb@df7cb.de>
  544. James "HM2K" <james@hm2k.org>
  545. =head1 COPYRIGHT
  546. Copyright (C) 2001-2012 The pisg project. All rights reserved.
  547. This program is free software; you can redistribute it and/or modify it
  548. under the terms of the GPL, license is included with the distribution of
  549. this file.
  550. =cut