]> git.donarmstrong.com Git - infobot.git/commitdiff
- Another patch from Morten Brix Pedersen <morten@wtf.dk>:
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Feb 2002 12:27:43 +0000 (12:27 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Feb 2002 12:27:43 +0000 (12:27 +0000)
    * The comments/settings you mentioned in sample.config.broken is now
      merged into sample.config.
    * Set debugging to 0 in sample.config
    * setup/setup.pl was trying to add the database twice which caused
      a lot of errors, remove redundant code
    * INSTALL file now points at blootbot.servers instead of ircII.server
    * Changed some messages printed to console
    * Update INSTALL.patches and remove reference to old Net::IRC patch
    * Update README.quick slightly
- Parts of patch not included or slightly modified.

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

INSTALL
INSTALL.patches
README
README.quick
files/blootbot.servers [new file with mode: 0644]
files/sample/sample.config
setup/setup.pl
src/IRC/Irc.pl
src/IRC/IrcHooks.pl
src/Modules/Debian.pl

diff --git a/INSTALL b/INSTALL
index ebcee18b299e100fba879d6a48cfbb7d91719680..92ec88b6c3d927135aa118805567e97d088da955 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/ircII.server to modify list of IRC servers to connect.
+- Edit files/blootbot.server to modify list of IRC servers to connect.
 
 - Install the following Perl modules:
        - Net::IRC perl module
@@ -17,14 +17,10 @@ Method of installation.
                - Debian: (apt-get install libhtml-parser-perl)
 
 - Choose your database:
-       - MySQL (see INSTALL.mysql)
-       - PgSQL (see INSTALL.pgsql, DOES NOT WORK YET)
-       - Berkeley DBM (see INSTALL.dbm)
+       - MySQL, read INSTALL.mysql (supported)
+       - PgSQL, read INSTALL.pgsql (unsupported, may work)
+       - Berkeley DBM, read INSTALL.dbm (broken, unsupported)
 
-[OPTIONAL,FIXME]
-- 'scripts/insertDB.pl files/sample.insert'.
-
-- There are "bugs" in the perl modules. (see INSTALL.patches) on how to
-  fix.
+- There are "bugs" in the perl modules.  Read INSTALL.patches on how to fix.
 
 - Finally, './blootbot'
index 3ff49d0b03b0a978b04f0d100d6509623b888e28..53de9dce4af4f6c51d8815c794a3e3cd0c97440f 100644 (file)
@@ -1,7 +1,7 @@
 INSTALL.patches
 -------------------
 
-- apply *.patch patches from patches/  ( DOES THIS WORK???)
+- apply *.patch patches inside patches/
        - cd /usr/lib/perl5/Net
          patch -p0 < Net::IRC.patch
        - cd /usr/lib/perl5/WWW/Search
diff --git a/README b/README
index 5beabf96af16011cbd4687d237eb057504753df0..b923d69d299915e6678e8dcf44102dd815951a7c 100644 (file)
--- a/README
+++ b/README
@@ -19,7 +19,7 @@ FEATURES
        * Debian Contents and Packages, search and info.
        * ChanServ/NickServ (OPN) support.
        * WWW-Search (eg: google for BLAH)
-       * Slashdot,Kernel and Freshmeat auto-update announcements.
+       * Slashdot, Kernel and Freshmeat auto-update announcements.
        * Units conversion (provided by external module, Units-Module)
 
        DESIGN
@@ -66,9 +66,9 @@ However, these people do not realize the potential of open wingates.
 test all modifications properly (and extensively).  Suggestions are
 welcomed.
 
-       a few guys from #debian@OPN are attempting to rewrite the bot in C
-to support dbm185or2//mysql//postgresql. It's available at
-ftp://leguin.org.uk/pub/bloatbot/
+       gp@OPN is currently working on a C version of infobot or 
+blootbot, not based on the above source base.  Core factoid code and
+mysql support works - but that is it.
 
 MODIFICATIONS
        All modifications are that of the blootbot author unless otherwise
@@ -132,10 +132,10 @@ and \broken.
 deleted the message together with the patch after replying to the guy. I
 hope to get that same guy to re-send me the patch...
 
-       MbM sent me a patch to clean up behaviour of factoids
-(adding,removing, modifying). Thanks.
+       MbM@OPN sent a patch to clean up behaviour of factoids
+(adding, removing, modifying).  Thanks.
 
 
 CONTACT
-       Contributions of a patch or a job offer can be sent to
-<dms@users.sourceforge.net> [DOES IT WORK??]
+       Contributions of a patch, or anything, can be sent to
+<dms@users.sourceforge.net>
index 3d84a5c17db7cd45383127aa003b35b80156de8b..c17c34de52bf433fc4c66fcc2ce757a61f47aef9 100644 (file)
@@ -1,4 +1,7 @@
-first time usage
+See INSTALL file on how to install the bot.
+
+Quick usage instructions:
+-------------------------
 
 DCC CHAT:
 .+chan #chan
@@ -7,5 +10,5 @@ DCC CHAT:
 .chanunset -autojoin
 .chanset -autojoin
 
-for configuration options, run:
+for list of configuration options, run:
        perl scripts/findparam.pl
diff --git a/files/blootbot.servers b/files/blootbot.servers
new file mode 100644 (file)
index 0000000..d87b08e
--- /dev/null
@@ -0,0 +1,7 @@
+###
+### ircII.servers
+###
+
+irc.home.org
+irc.linux.com
+irc.openprojects.net
index a9286857042afb2309a9441d111f881aa4fdf2f2..dab9d1da71521e2897a2b6ed784ed142e6872105 100644 (file)
@@ -1,12 +1,11 @@
-# parameter settings file for the infobot
-# kevin lenzo (lenzo@cs.cmu.edu)
-# modified by xk <xk@leguin.openprojects.net>
-###
+# blootbot configuration file, modify it to your own taste.
 
 # [str] Interface: [IRC/CLI]
+#   IRC                -- Internet Relay Chat
+#   CLI                -- Command Line Interface
 set Interface          IRC
 
-# IRC.
+# Basic IRC info
 set ircNick            blootbot
 set ircUser            blootbot
 set ircName            blootbot experimental bot
@@ -17,9 +16,10 @@ set owner            xk
 
 # nickserv/chanserv support.
 ###set nickServ_pass   PASSWORD
+###set chanServ_ops    #chan1 #chan2
 
 # default quit message
-set quitMsg            BEE RICHT BAK
+set quitMsg            adios amigos
 
 # temp directory.
 set tempDir            /home/blootbot/Temp
@@ -47,7 +47,8 @@ set maxLogSize                10000000
 #      none    -- disable.
 #      mysql   -- ...
 #      pgsql   -- postgresql (NOT SUPPORTED)
-#      dbm     -- berkeley dbm (SHOULD WORK 95%)
+#      dbm     -- berkeley dbm
+### REQUIRED by factoids,freshmeat,karma,seen,...
 set DBType             mysql
 
 # [str] DBM filename prefix // MYSQL/PGSQL database.
@@ -58,13 +59,13 @@ set DBName          blootbot
 # [str] Hostname of database server
 set SQLHost            localhost
 
-# [str] mysql user allowed to insert,update,delete stuff from tables.
+# [str] SQL user allowed to insert,update,delete stuff from tables.
 set SQLUser            blootbot
 
-# [str] mysql password.
-set SQLPass            bl00tb0t
+# [str] SQL password.
+set SQLPass            PASSWORD
 
-# [str] sql debug file.
+# [str] SQL debug file.
 ###set SQLDebug                SQL_debug.log
 
 #####
@@ -74,7 +75,7 @@ set SQLPass           bl00tb0t
 # [bool] Factoid support.
 set factoids           true
 
-# [days] After what time will deleted factoids will be deleted.
+# [days] if not 0, number of days until factoid is deleted for good.
 set factoidDeleteDelay 0
 
 # [int] maximum length of factoid key.
@@ -109,6 +110,9 @@ set acceptUrl               OPTIONAL
 # [bool] profanity checking.
 set profanityCheck     false
 
+# [0/1] tell so-and-so about such-and-such of a factoid.
+set allowTelling       1
+
 # [str] other bots to ask for factoids which they may have.
 #set friendlyBots      url purl script mrapi
 
@@ -122,7 +126,7 @@ set profanityCheck  false
 #                 addressing.
 set addressing         REQUIRE
 
-# should work. FIXME.
+# [char] One-character easy recognition.
 set addressCharacter   ~
 
 # [str] how the bot should send messages.
@@ -137,7 +141,7 @@ set talkMethod              DEFAULT
 
 # [int] maximum length of reply for Extras function before popping list to
 #      reduce number of elements.
-set maxListReplyLength 300
+set maxListReplyLength 450
 
 # [int] maximum number of elements in list allowed for Extras function
 #      before popping elements to reduce total count.
@@ -147,6 +151,11 @@ set maxListReplyCount      15
 #      for factoids and commands.
 set disallowOutsiders  1
 
+# [int] time, in seconds. (different messages)
+set floodMessages      10:30
+# [int] same messages.
+set floodRepeat                2:10
+
 # [int] Amount of time for auto-ignore (flooding) to expire.
 set ignoreAutoExpire   5
 
@@ -157,6 +166,15 @@ set ignoreTempExpire       60
 # Internal (simple) bot commands
 #####
 
+# [0/1] irc-cli calculator.
+set perlMath           1
+
+# [0/1] ord/chr etc
+set allowConv          1
+
+# [0/1] do you want to allow DNS lookup
+set allowDNS           1
+
 # [0/1] Forking... disable for non-nix OS or to reduce mem usage.
 #      Disabling should make the bot work on Win32 and MacOS.
 set forking            1
@@ -179,7 +197,7 @@ set VERBOSITY               1
 set WARN               1
 
 # [0/1] Debugging messages.
-set DEBUG              1
+set DEBUG              0
 
 # [0/1] Work In Progress...
 set WIP                        0
@@ -197,10 +215,132 @@ set useStrict            0
 # Extras
 #####
 
-set uptime             1
-
 # [str] anything which requires LWP + http proxy.
-set httpProxy http://router.home.org:3128/
+###set httpProxy               http://HOSTNAME:PORT/
+
+# [0/1] babelfish translator.  jdf++. FIXME [DOES NOT WORK]
+set babelfish          false
+
+# [0/1] offer free factoid cookies
+set cookie             true
+
+# [0/1] Countdown to specific dates
+set countdown          true
+
+# [0/1] Debian file and package search.
+set debian             false
+# [int] how often to update the debian table, in days.
+set debianRefreshInterval 1
+# [0/1] extra stuff...
+set debianExtra                true
+
+# [0/1] Frontend to dict.org's wordnet.
+set dict               false
+
+# [0/1] Freshmeat
+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
+
+# [0/1] insult server
+set insult             false
+
+# [0/1] karma
+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
+
+# [0/1] Frontend to the stock market.
+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
+
+# [0/1] Warn users about root.
+set rootWarn           false
+#   passive    -- be polite plus stuff, compliant to OPN, heh.
+#   aggressive -- ...
+set rootWarnMode       passive
+
+# [0/1] Factoid search.
+set search             false
+
+# [0/1] persistant "seen".
+set seen               true
+# [0/1] seen statistics for online users like idle time, total message
+#      count.
+set seenStats          true
+# [int] if someone's been away for more than xx days, delete their info.
+#      info.
+set seenMaxDays                30
+# [int] interval to flush cached seen info. in minutes.
+set seenFlushInterval  60
+# [bool] store all information, irrevelent of addressing.
+#      may chew more CPU.
+#      Will encourage severe leakaged (2-3x), caused by mysql-perl?
+set seenStoreAll       1
+
+# [0/1] slashdot headlines.
+set slashdot           false
+###set slashdotAnnounce        #debian-bots
+
+# [0/1] frontend to ispell.
+set spell              false
+
+# [0/1] Advanced topic management.
+set topic              true
+
+# [0/1] User Information Services.
+set userinfo           true
+
+# [0/1] Uptime daemon
+set uptime             true
+
+# [0/1] Wingate checking and banning mechanism. FIXME.
+###set wingate         false
+# [int] seconds. minimum time to check.
+set wingateInterval    60
+# [str] Wingate.
+set wingateBan         true
+# [str] Wingate.
+set wingateKick                DIE DIE DIE
+
+# [0/1] google search.. simon++. requires libwww-search-perl + 5lines of
+#      modifications.
+set wwwsearch          false
+
+# [0/1] Unit conversion tool.
+set units              true
 
 ####
 #### now modify blootbot.chans for per-channel specific configuration
index 177b2e24ba08bb3b55efafda5f3660b33b88be11..22ad599bc39ebeb2c1d65e601bd0dfeaa4872593 100755 (executable)
@@ -49,19 +49,16 @@ if ($param{'DBType'} =~ /mysql/i) {
        $database_exists++ if $database eq $param{DBName};
     }
     if ($database_exists) {
-       &status("Hmm, database '$param{DBName}' already exists. Continuing...");
+       &status("Database '$param{DBName}' already exists. Continuing...");
     } else {
        &status("Creating db ...");
        &dbRaw("create(database)", "CREATE DATABASE $param{DBName}");
     }
 
-    &status("Creating db ...");
-    &dbRaw("CREATE DATABASE $param{'DBName'}");
-
-    &status("--- Adding user information.");
+    &status("--- Adding user information for user '$param{'SQLUser'}'");
 
     if (!&dbGet("user","user", "user=".&dbQuote($param{'SQLUser'}) ) ) {
-       &status("--- Adding user $param{'SQLUser'} $dbname/user table...");
+       &status("--- Adding user '$param{'SQLUser'}' $dbname/user table...");
 
        $query = "INSERT INTO user VALUES ".
                "('localhost', '$param{'SQLUser'}', ".
@@ -71,11 +68,11 @@ if ($param{'DBType'} =~ /mysql/i) {
 
        &dbRaw("create(user)", $query);
     } else {
-       &status("... User information already present.");
+       &status("... user information already present.");
     }
 
     if (!&dbGet("db","db","db=".&dbQuote($param{'SQLUser'}) ) ) {
-       &status("--- Adding 'db' stuff.");
+       &status("--- Adding database information for database '$dbname'.");
 
        $query = "INSERT INTO db VALUES ".
                "('localhost', '$dbname', ".
index b10a08584f8b954746f49c77f5d1b4e7cdf3459c..49d0438ef576933c861ad69d40632a6ff4f812d5 100644 (file)
@@ -102,7 +102,7 @@ sub irc {
     $conn = $irc->newconn(%args);
 
     if (!defined $conn) {
-       &ERROR("irc: conn was not created!defined!!!");
+       &ERROR("internal: perl IRC connection object does not exist.");
        return 1;
     }
 
index 74087d0b474acd2628a64b30e9b078d5e056dc5d..125ba7cb45754fed35edf1950ec68cf463f913ff 100644 (file)
@@ -185,7 +185,7 @@ sub on_endofmotd {
 
     &status("End of motd. Now lets join some channels...");
     if (!scalar @joinchan) {
-       &WARN("joinchan array is empty!!!");
+       &WARN("joinchan array is empty!");
        @joinchan = &getJoinChans(1);
     }
 
index 48ce83026ca888b939970afa819ef3c9b5c275db..7ff7708c7c5b2fcf5f2296c070ef27f8e7be2282 100644 (file)
@@ -849,7 +849,7 @@ sub infoStats {
 # Usage: &generateIndex();
 sub generateIndex {
     my (@dists)        = @_;
-    &::status("Debian: !!! generateIndex($dists[0]) called !!!");
+    &::DEBUG("D: generateIndex($dists[0]) called!");
     if (!scalar @dists or $dists[0] eq '') {
        &::ERROR("gI: no dists to generate index.");
        return 1;
@@ -971,7 +971,7 @@ sub searchPackage {
        }
 
        if ($error) {
-           &::ERROR("could not generate index ($file)!!!");
+           &::ERROR("could not generate index ($file)!");
            return;
        }