]> git.donarmstrong.com Git - infobot.git/blobdiff - src/core.pl
* Minor fix to some long lines perl comlained about
[infobot.git] / src / core.pl
index 1b7a68c02fded05360f467f97e7318adfecfeea6..936f31cc784ec8aab6fb43951b23f72a67c7cdac 100644 (file)
@@ -78,12 +78,11 @@ $nottime    = 0;
 $notsize       = 0;
 $notcount      = 0;
 ###
-$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";
+open(VERSION, '<VERSION');
+$bot_release   = <VERSION> || "(unknown version)";
+chomp($bot_release);
+close(VERSION);
+$bot_version   = "infobot $bot_release -- $^O";
 $noreply       = 'NOREPLY';
 
 ##########
@@ -113,7 +112,7 @@ sub doExit {
        &status("parent caught SIG$sig (pid $$).") if (defined $sig);
 
        &status("--- Start of quit.");
-       $ident ||= 'blootbot';  # lame hack.
+       $ident ||= 'infobot';   # lame hack.
 
        &status("Memory Usage: $memusage KiB");
 
@@ -158,7 +157,7 @@ sub doWarn {
 }
 
 # Usage: &IsParam($param);
-# blootbot.config specific.
+# infobot.config specific.
 sub IsParam {
     my $param = $_[0];
 
@@ -428,7 +427,7 @@ sub setup {
     &status("--- Started logging.");
 
     # read.
-    &loadLang($bot_data_dir. "/blootbot.lang");
+    &loadLang($bot_data_dir. "/infobot.lang");
     &loadIRCServers();
     &readUserFile();
     &readChanFile();
@@ -456,7 +455,7 @@ sub setup {
 
 sub setupConfig {
     $param{'VERBOSITY'} = 1;
-    &loadConfig($bot_config_dir."/blootbot.config");
+    &loadConfig($bot_config_dir."/infobot.config");
 
     foreach ( qw(ircNick ircUser ircName DBType tempDir) ) {
        next if &IsParam($_);
@@ -502,13 +501,13 @@ sub shutdown {
     &status("--- shutdown called.");
 
     # hack.
-    $ident ||= 'blootbot';
+    $ident ||= 'infobot';
 
-    if (!&isFileUpdated("$bot_state_dir/blootbot.users", $wtime_userfile)) {
+    if (!&isFileUpdated("$bot_state_dir/infobot.users", $wtime_userfile)) {
        &writeUserFile()
     }
 
-    if (!&isFileUpdated("$bot_state_dir/blootbot.chan", $wtime_chanfile)) {
+    if (!&isFileUpdated("$bot_state_dir/infobot.chan", $wtime_chanfile)) {
        &writeChanFile();
     }
 
@@ -539,7 +538,7 @@ sub restart {
 
        &DCCBroadcast("-HUP called.",'m');
        &shutdown($sig);
-       &loadConfig($bot_config_dir."/blootbot.config");
+       &loadConfig($bot_config_dir."/infobot.config");
        &reloadAllModules() if (&IsParam('DEBUG'));
        &setup();
 
@@ -585,3 +584,5 @@ sub loadConfig {
 }
 
 1;
+
+# vim:ts=4:sw=4:expandtab:tw=80