]> git.donarmstrong.com Git - infobot.git/commitdiff
- patch from Morten Brix Pedersen:
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 19 Feb 2002 12:27:08 +0000 (12:27 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 19 Feb 2002 12:27:08 +0000 (12:27 +0000)
    * Moved around in sample.config, the most important things are now
      in the top. So it's easy to "get started" with a simple bot.
    * Changed top comments in blootbot.servers
    * Modified some messages to console to be more descriptive.  Now it
      just prints the right error using the $! variable.
- removed ircII.servers

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@552 c11ca15a-4712-0410-83d8-924469b57eb5

INSTALL
files/blootbot.servers
files/ircII.servers [deleted file]
files/sample/sample.config
src/DynaConfig.pl
src/Files.pl
src/Misc.pl
src/core.pl
src/logger.pl
src/modules.pl

diff --git a/INSTALL b/INSTALL
index 92ec88b6c3d927135aa118805567e97d088da955..62401714dc19e5963a28c8f087850cd8f419f427 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Method of installation.
 - Move files/sample/sample.config to files/blootbot.config
 - Edit files/blootbot.config, modify to taste.
 - Edit files/blootbot.chan to set which channels to join.
-- Edit files/blootbot.server to modify list of IRC servers to connect.
+- Edit files/blootbot.servers to modify list of IRC servers to connect.
 
 - Install the following Perl modules:
        - Net::IRC perl module
index d87b08eceec12b423fd7f5000230ac02e3ef94ba..83e9a8cadc914ff898a1f55c0d9d2dc6ab5dfa48 100644 (file)
@@ -1,5 +1,5 @@
 ###
-### ircII.servers
+# blootbot.servers: line separated list of servers to connect to
 ###
 
 irc.home.org
diff --git a/files/ircII.servers b/files/ircII.servers
deleted file mode 100644 (file)
index d87b08e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-###
-### ircII.servers
-###
-
-irc.home.org
-irc.linux.com
-irc.openprojects.net
index dab9d1da71521e2897a2b6ed784ed142e6872105..25a99daf3412933b29795ec7713e2d95723f9b49 100644 (file)
@@ -1,46 +1,29 @@
-# blootbot configuration file, modify it to your own taste.
-
-# [str] Interface: [IRC/CLI]
-#   IRC                -- Internet Relay Chat
-#   CLI                -- Command Line Interface
-set Interface          IRC
+# blootbot configuration file, modify it to your own taste.  blootbot reads
+# this file from files/blootbot.config so it should be moved there.
 
+#####
 # Basic IRC info
+#####
 set ircNick            blootbot
 set ircUser            blootbot
 set ircName            blootbot experimental bot
 set ircUMode           +iw
 ###set ircHost         vh.virtualhost.org
 
-set owner              xk
+set owner              OWNER
 
 # nickserv/chanserv support.
 ###set nickServ_pass   PASSWORD
 ###set chanServ_ops    #chan1 #chan2
 
-# default quit message
+# default quit message.
 set quitMsg            adios amigos
 
-# temp directory.
+# path to a temporary directory which blootbot can use.
 set tempDir            /home/blootbot/Temp
 
 #####
-# logfile
-#####
-
-# [file] where to put logging info. comment out to disable.
-set logfile            log/$ircUser.log
-
-# [str] Type of logging.
-#   DAILY      -- Create a new log each day.
-#   DEFAULT    -- One continuous log file.
-set logType            DAILY
-
-# [int] Maximum log size, if logfile is defined, in bytes.
-set maxLogSize         10000000
-
-#####
-# Factoid DB Configuration
+# Factoid database configuration
 #####
 
 # [str] Ability to remember/tell factoids
@@ -69,7 +52,22 @@ set SQLPass          PASSWORD
 ###set SQLDebug                SQL_debug.log
 
 #####
-# factoid-related configuration
+# Logfile configuration
+#####
+
+# [file] where to put logging info. comment out to disable.
+set logfile            log/$ircUser.log
+
+# [str] Type of logging.
+#   DAILY      -- Create a new log each day.
+#   DEFAULT    -- One continuous log file.
+set logType            DAILY
+
+# [int] Maximum log size, if logfile is defined, in bytes.
+set maxLogSize         10000000
+
+#####
+# Factoid-related configuration
 #####
 
 # [bool] Factoid support.
@@ -117,7 +115,7 @@ set allowTelling    1
 #set friendlyBots      url purl script mrapi
 
 #####
-# factoid related and unrelated features, mainly Extras.
+# Factoid related and unrelated features, mainly Extras.
 #####
 
 # [str] addressing is when you name the bot. FIXME
@@ -184,35 +182,7 @@ set forking                1
 set backlog            24
 
 #####
-# Miscellaneous...
-#####
-
-# [int] Display a bit too much info about stuff.
-#   0  -- disable.
-#   1  -- standard.
-#   2  -- extra.
-set VERBOSITY          1
-
-# [0/1] Warn messages.
-set WARN               1
-
-# [0/1] Debugging messages.
-set DEBUG              0
-
-# [0/1] Work In Progress...
-set WIP                        0
-
-# debugging...
-###set dumpvars                1
-###set dumpvarsAtExit  1
-# log to specific file or global log file.
-###set dumpvarsLogFile dumpvars.log
-
-# [0/1] allow 'use strict', makes bot unreliable.
-set useStrict          0
-
-#####
-# Extras
+# Extra features
 #####
 
 # [str] anything which requires LWP + http proxy.
@@ -241,8 +211,7 @@ set dict            false
 set freshmeat          false
 # [int] how often to update the freshmeat table, in hours.
 set freshmeatRefreshInterval 24
-# [chans|all] 10items/hour, might be annoying.
-###set freshmeatAnnounce       #debian-bots
+
 # [bool] if factoid does not exist, check freshmeat for it.
 set freshmeatForFactoid                false
 
@@ -254,18 +223,10 @@ set karma         true
 
 # [0/1] Frontend to kernel.org
 set kernel             false
-###set kernelAnnounce  #debian-bots
 
 # [0/1] LART.
 set lart               true
 
-# [array] Channel limit adjuster. List of channels.
-###set limitcheck              #debian-bots
-# [int] Interval (or more than), in minutes.
-set limitcheckInterval 10
-# [int] Adjust channel limit to 10 above total users in channel.
-set limitcheckPlus     10
-
 # [0/1] nickometer
 set nickometer         true
 
@@ -274,15 +235,13 @@ set quote         false
 
 # [0/1] Display random text in the channel.
 set randomQuote                true
-# [str] Channels.
-set randomQuoteChannels        #debian-bots
+
 # [int] Interval (or more than), in minutes.
 set randomQuoteInterval        60
 
 # [0/1] Display random text in the channel.
 set randomFactoid      true
-# [str] Channels.
-set randomFactoidChannels      #debian-bots
+
 # [int] Interval (or more than), in minutes.
 set randomFactoidInterval      60
 
@@ -312,7 +271,6 @@ set seenStoreAll    1
 
 # [0/1] slashdot headlines.
 set slashdot           false
-###set slashdotAnnounce        #debian-bots
 
 # [0/1] frontend to ispell.
 set spell              false
@@ -333,7 +291,7 @@ set wingateInterval 60
 # [str] Wingate.
 set wingateBan         true
 # [str] Wingate.
-set wingateKick                DIE DIE DIE
+set wingateKick                Please don't use wingate
 
 # [0/1] google search.. simon++. requires libwww-search-perl + 5lines of
 #      modifications.
@@ -342,9 +300,37 @@ set wwwsearch              false
 # [0/1] Unit conversion tool.
 set units              true
 
+#####
+# Miscellaneous configuration options
+#####
+
+# [int] Display a bit too much info about stuff.
+#   0  -- disable.
+#   1  -- standard.
+#   2  -- extra.
+set VERBOSITY          1
+
+# [0/1] Warn messages.
+set WARN               1
+
+# [0/1] Debugging messages.
+set DEBUG              0
+
+# [0/1] Work In Progress...
+set WIP                        0
+
+# debugging...
+###set dumpvars                1
+###set dumpvarsAtExit  1
+# log to specific file or global log file.
+###set dumpvarsLogFile dumpvars.log
+
+# [str] Interface: [IRC/CLI]
+#   IRC                -- Internet Relay Chat
+#   CLI                -- Command Line Interface
+set Interface          IRC
+
 ####
-#### now modify blootbot.chans for per-channel specific configuration
-#### see sample.chans for info.
+# Now modify blootbot.chan for per-channel specific configuration see
+# sample.chans for info.
 ####
-
-set allowConv          1
index e24b0d41122a19b80b31b53e2298f989151e9fe6..c7b6f1dc0fc1c1963b82c26430f3308b3d3e2655 100644 (file)
@@ -30,7 +30,7 @@ sub readUserFile {
     }
 
     if (!open IN, $f) {
-       &ERROR("cannot read userfile.");
+       &ERROR("Cannot read userfile ($f): $!");
        &closeLog();
        exit 1;
     }
@@ -123,7 +123,7 @@ sub writeUserFile {
     }
 
     if (!open OUT,">$bot_state_dir/blootbot.users") {
-       &ERROR("cannot write to userfile.");
+       &ERROR("Cannot write userfile ($bot_state_dir/blootbot.users): $!");
        return;
     }
 
@@ -237,7 +237,7 @@ sub readChanFile {
     }
 
     if (!open IN, $f) {
-       &ERROR("cannot erad chanfile.");
+       &ERROR("Cannot read chanfile ($f): $!");
        return;
     }
 
@@ -298,7 +298,7 @@ sub writeChanFile {
     }
 
     if (!open OUT,">$bot_state_dir/blootbot.chan") {
-       &ERROR("cannot write chanfile.");
+       &ERROR("Cannot write chanfile ($bot_state_dir/blootbot.chan): $!");
        return;
     }
 
index add4a4df235229321baa8afd40eaf0ff6f296bb6..e86d22857466ddf26a8280af5aa893df11699caa 100644 (file)
@@ -14,7 +14,7 @@ sub loadLang {
     my $replyName;
 
     if (!open(FILE, $file)) {
-       &ERROR("FAILED loadLang ($file): $!");
+       &ERROR("Failed reading lang file ($file): $!");
        exit 0;
     }
 
@@ -54,7 +54,7 @@ sub loadIRCServers {
     %ircPort = ();
 
     if (!open(FILE, $file)) {
-       &ERROR("FAILED loadIRCServers ($file): $!");
+       &ERROR("Failed reading server list ($file): $!");
        exit 0;
     }
 
index 9379d7b10dae4e2fda048cfd3e6d580d213a63fc..d621ea6c9cf057f9ab93df1fdf4b611a16500a2a 100644 (file)
@@ -16,7 +16,7 @@ sub help {
     $msgType = "private" if ($msgType eq "public");
 
     if (!open(FILE, $file)) {
-       &ERROR("FAILED loadHelp ($file): $!");
+       &ERROR("Failed reading help file ($file): $!");
        return;
     }
 
@@ -317,7 +317,7 @@ sub getRandomLineFromFile {
            return $line;
        }
     } else {
-       &WARN("gRLfF: could not open file '$file'.");
+       &WARN("gRLfF: Could not open file ($file): $!");
        return;
     }
 }
@@ -343,7 +343,7 @@ sub getLineFromFile {
        chop $line;
        return $line;
     } else {
-       &ERROR("getLineFromFile: could not open file '$file'.");
+       &ERROR("gLFF: Could not open file ($file): $!");
        return 0;
     }
 }
index e8975c136a799f11219e10e071d3de9d85c8fbd0..a7ba007a4e60fb0eb48abd7d9e16816c9995a528 100644 (file)
@@ -510,7 +510,7 @@ sub loadConfig {
     my ($file) = @_;
 
     if (!open(FILE, $file)) {
-       &ERROR("FAILED loadConfig ($file): $!");
+       &ERROR("Failed to read configuration file ($file): $!");
        &status("Please read the INSTALL file on how to install and setup this file.");
        exit 0;
     }
index 474188c6d88aca2b6cee7aba9c263cec48418f0c..252f72b77278ef7bc37d2882c7db71e02ae8dba8 100644 (file)
@@ -102,7 +102,7 @@ sub openLog {
        &status("Opened logfile $file{log}.");
        LOG->autoflush(1);
     } else {
-       &status("cannot open logfile $file{log}; not logging.");
+       &status("Cannot open logfile ($file{log}); not logging: $!");
     }
 }
 
@@ -367,7 +367,7 @@ sub status {
 
 sub openSQLDebug {
     if (!open(SQLDEBUG, ">>$param{'SQLDebug'}")) {
-       &ERROR("cannot open $param{'SQLDebug'}...");
+       &ERROR("Cannot open ($param{'SQLDebug'}): $!");
        delete $param{'SQLDebug'};
        return 0;
     }
index bea0f2e0f663ac6ab89abd4a7485de77ffb68f13..b5cadd76d24d719a396f9f6caf11cc7c3cdb0cf1 100644 (file)
@@ -388,7 +388,7 @@ sub getPerlFiles {
     my($dir) = @_;
 
     if (!opendir(DIR, $dir)) {
-        &ERROR("cannot open source directory $dir: $!");
+        &ERROR("Cannot open source directory ($dir): $!");
         exit 1;
     }