-$bot_release = "1.3.3";
-if ( -d "CVS" ) {
- use POSIX qw(strftime);
- $bot_release .= strftime(" cvs (%Y%m%d)", gmtime( (stat("CVS"))[9] ) );
-}
-$bot_version = "blootbot $bot_release -- $^O";
-$noreply = "NOREPLY";
+open(VERSION, '<VERSION');
+$bot_release = <VERSION> || "(unknown version)";
+chomp($bot_release);
+close(VERSION);
+$bot_version = "infobot $bot_release -- $^O";
+$noreply = 'NOREPLY';
if (!defined $chanconf{$c[0]}{$param} and ($c ne '_default')) {
return &getChanConf($param, '_default');
}
if (!defined $chanconf{$c[0]}{$param} and ($c ne '_default')) {
return &getChanConf($param, '_default');
}
if (!open(IN, "/proc/$$/status")) {
&ERROR("cannot open '/proc/$$/status'.");
return;
if (!open(IN, "/proc/$$/status")) {
&ERROR("cannot open '/proc/$$/status'.");
return;
&sqlOpenDB($param{'DBName'}, $param{'DBType'}, $param{'SQLUser'},
$param{'SQLPass'});
&checkTables();
&sqlOpenDB($param{'DBName'}, $param{'DBType'}, $param{'SQLUser'},
$param{'SQLPass'});
&checkTables();
- &status("Setup: ". &countKeys("factoids") ." factoids.");
- &getChanConfDefault("sendPrivateLimitLines", 3, $chan);
- &getChanConfDefault("sendPrivateLimitBytes", 1000, $chan);
- &getChanConfDefault("sendPublicLimitLines", 3, $chan);
- &getChanConfDefault("sendPublicLimitBytes", 1000, $chan);
- &getChanConfDefault("sendNoticeLimitLines", 3, $chan);
- &getChanConfDefault("sendNoticeLimitBytes", 1000, $chan);
+ &status("Setup: ". &countKeys('factoids') ." factoids.");
+ &getChanConfDefault('sendPrivateLimitLines', 3, $chan);
+ &getChanConfDefault('sendPrivateLimitBytes', 1000, $chan);
+ &getChanConfDefault('sendPublicLimitLines', 3, $chan);
+ &getChanConfDefault('sendPublicLimitBytes', 1000, $chan);
+ &getChanConfDefault('sendNoticeLimitLines', 3, $chan);
+ &getChanConfDefault('sendNoticeLimitBytes', 1000, $chan);
next unless /\S/;
my ($set,$key,$val) = split(/\s+/, $_, 3);
next unless /\S/;
my ($set,$key,$val) = split(/\s+/, $_, 3);