commit ee4f56acf60ea6212ff282ef7f3d046ec8a54f9d
Author: Michael Murtaugh
Date: Sun Sep 27 18:59:47 2020 +0200
gulp
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a4609f6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,9 @@
+
+Copyright (c) Kevin Lenzo, 1996-2000, except where noted
+otherwise.
+
+The Infobot is covered under the same terms as Perl itself
+(the Artistic License). This software is meant to be freely
+available under those terms in perpetuity.
+
+
diff --git a/README b/README
new file mode 100644
index 0000000..4871027
--- /dev/null
+++ b/README
@@ -0,0 +1,146 @@
+
+You will need to update your infobot.config
+and infobot.users. See the example files.
+
+--
+
+This requires perl 5.
+
+You should be able to start up just by running
+infobot. If you are using macperl, you will
+(currently) have to make one minor change (because
+$^O didn't work for me under os8).
+
+The infobot uses parameter files, typically in the
+params directory, to set up with. It treats anything
+on the command line as a parameter file and tries to
+load it.
+
+If you are using macperl, you will want to set
+the value of the macperl parameter to 1 in the
+two given param files (in the 'files' dir).
+
+By default, the infobot uses the IRC setup. This
+may change. NOTE that the irc version has no output
+by default; you'll have to turn up the debug level
+to get more.
+
+to start up the infobot, just invoke it from the
+command line.
+
+ infobot
+
+---
+
+A note on forms: you can prepend the tag
+to values in the db to just get a reply with no
+extra info.
+
+e.g.
+
+ x => y
+
+then when you ask 'x?' it will just reply 'y' instead
+of something like "i think x is y".
+
+---
+
+* extending the bot by adding your own code
+
+try to keep your changes inside src/myRoutines.pl
+so that you can easily just replace this file when
+there are new revs. this is called just after some
+of the normalization stuff in urlProcess.pl. take
+a look at the file for details.
+
+basically, if myRoutines returns non-null, it's
+taken to have 'caught' the event. you can just
+return '' to let the rest of the processing go at
+it.
+
+---
+
+* update_db & dump_db
+
+update_db is a little perl script that will take a
+flat ascii file and make an infobot-style db out
+of it (currently just a couple of dbm files). You'll
+want to make 2, even if theye contain only 1 element
+each. it will also simply add (and overwrite entries
+in) existing dbs. This is especially nice if
+you don't allow updates to the databases through IRC
+and just want a collection of permanent factoids.
+
+update_db
+
+where is an ascii file like (in the case
+of an url-style infobot):
+
+infobot => at http://www.cs.cmu.edu/~lenzo/hocus.html
+
+one key => value per line. In the current setup,
+you need an is-database and an are-database, mainly
+for legacy reasons about representing plurality and
+being able to give the proper form. in the infobot-is.txt
+file and infobot-are.txt files you have examples. these
+are a fine starting point:
+
+1.1 update_db infobot-is.txt infobot-is
+ update_db infobot-are.txt infobot-are
+
+2. Now you need to edit infobot to set up your bot.
+ Don't forget to set the path to perl properly at
+ the top and make it executable.
+
+3. Then try running infobot. At present, there's a
+ bunch of VERY BAD code in it, so don't use the -w
+ switch unless you want to fix a bunch of things and
+ mail me.
+
+Eventually, kill it and then you'll probably
+want to crontab it. included is a sample crontab
+and the script that you will need to edit.
+
+dump_db
+
+will just make a flat ascii file out of the named db,
+e.g.
+
+ dump_db infobot-is
+
+Both update_db and dump_db take an optional switch, -m, which tells them
+what DBM module to use. You'll need to specify this if you set
+DBMModule in your config file in order to get the bot to use something
+other than Perl's default. Eg,
+
+ update_db -m DB_File infobot-is.txt infobot-is
+ dump_db -m DB_File infobot-is
+
+good luck, and mail me!
+
+kevin
+lenzo@cs.cmu.edu
+
+ps - i am just releasing this _now_ instead of waiting
+ to fix everything. If you use this and like it,
+ or even if you don't, please mail me!
+
+---
+
+thanks to:
+
+You, for getting this and using this. Especially if
+you mail me and let me put you on the mailing list.
+lenzo@cs.cmu.edu
+
+special thanks to:
+
+steve orens (sorens) for being a tour-de-force beta bomber
+yo for working with script. this is a big one!
+amug and everyone there for hosting the undernet url
+#macintosh for dealing with url through his troubled childhood
+tris for being an early guinea pig
+jadin for pointing out the @verb bug... fixed in 0.17b
+chucky burnett for tons of stuff
+
+
diff --git a/REVISIONS b/REVISIONS
new file mode 100644
index 0000000..13699a9
--- /dev/null
+++ b/REVISIONS
@@ -0,0 +1,687 @@
+0.45.3
+
+Really fix the stuff in DBM.pl for the %param hash.
+
+0.45.1,2
+
+Fixed some path names, made a new tarball.
+
+0.45.0
+
+Renamed the miscdir parameter to confdir (in 'infobot')
+Renames 'files' directory to 'conf'
+Seperated src/ into src/ and extras/
+Changed default name to 'i-bot' in the infobot.config file
+Rationalized the names of the dbs to use dbname as a prefix
+
+0.44.5
+
+Push ./src onto the path so Util.pm gets in.
+New Airport.pl replaces METAR2 with a lot nicer stuff.
+ mendel++. Very nice example of a module with forking,
+ etc.
+Fixed excuse.pl's return codes.
+Roderick++'s extensive factoid locking patches for
+ sharing DBs between infobots.
+Added scripts/make_snap and scripts/restore_snap , which
+ make and restore ASCII snapshots of the databases,
+ respectively. This is good to do periodically as a
+ backup.
+Added stockquote.pl to get stock quotes (LotR++) and added
+ a boolean parameter ('stockquotes') to turn it on or off.
+Fixed a bug in the http proxy in the RDF fetching code (LotR++)
+Messages no longer record the apparent last channel
+ when given in private.
+Changed src/excuse.pl to guard against the server being
+ down, though i'm afraid the server is never going
+ to come back up.
+Cleaned extra white space off the end of parameter values
+ during the read of the config file.
+Currency exchance is now case-insensetive.
+There were several other small bugfixes that didn't make it
+ into this file during a move.
+
+0.44.4
+
+Removed 'factpacks' subdirectory. These packs are all on
+ the web site (http://www.infobot.org), and more.
+Tidying of purldoc code.
+Tidying of W3Search triggers
+Tidying of IMDB, Websters, etc.
+Splitting lines in say()/msg()
+HTTP proxy support
+Little tidying of the Math code.
+More informative return values from Process
+Better support for `no, $nick, ...'
+Much increased `tell' support
+perlfaq' support: uses RSS to get faqtoids from perlfaqprime
+Much needed fixes to Zippy factoids
+Babelfish rewritten
+Net::Telnet timeout fix to insult
+Fixed `exchange' typo in infobot.config.
+\| for quoting pipes in factoids, Avi++
+Added the channels patch. infobot.channels now sets channel-specific
+ options. The format is pretty much the same as the users file.
+Documented all the extensions.
+Fixed the `eval' command, which you shouldn't be using anyway.
+Removed spurious line breaks in Zippy's data.
+The `msgonly' parameter, if set, will see a question on channel and
+ respond to it via /msg
+The `continuity' parameter controls how many seconds must elapse before
+ the infobot assumes you have stopped addressing it. Set this to 0,
+ and the infobot will never assume that it is being addressed.
+Added a warning to Babel.pl if target language is `en'
+Close `karma' and `seen' databases in &killed, now karma doesn't
+ get reset.
+
+0.44.3
+
+NOTE: You must update WWW::Search to the latest version
+ for the Google search to work.
+NOTE: As usual, the new features (mostly) have new
+ parameters that need to be defined in
+ files/infobot.config -- to update, you'll need
+ to move your dbm files into the new source
+ tree and edit infobot.config. this is the best way.
+Made return values from myRoutines.pl said or messaged
+ rather than using &say and &msg inside myRoutines.
+ Use 'NOREPLY' to override this if you want to
+ use msg and/or say yourself (such as in a callback
+ or when forking).
+Moved the current myRoutines.pl file to a file called
+ Extras.pl. myRoutines.pl is reserved for local
+ user extensions, and Extras.pl is now where the
+ add-ons in the distribution are. They both
+ behave the same as the old myRoutines.pl did.
+ Extras is called after myRoutines.
+Moved several redirects out of Reply.pl and into Extras.
+Added 'literal' query -- 'literal foo' will show the
+ factoid for the key foo, with tags and |s literally.
+Added RDF/RSS support (LotR++) in RDF.pl. Uses the tag
+ and replaces it in-line.
+ RSS is RDF Site Summary; many sites now use this
+ standard format to encode their headlines/topics.
+ Requires XML::RSS.
+Added currency exchange module (exchange.pl) from
+ bobby@bofh.dk (thanks!)
+Added excuse module (excuse.pl), also from bobby@bofh.dk!
+Added 'purldoc' -- ^Masque++ -- which searches through
+ perl FAQ question titles.
+Removed usair module. They changed the interface and
+ this should just be re-written more gerally.
+Added support for Zippy.pl, which provides Zippy witticisms.
+ i made it require to be addressed. "infobot, yow" or
+ "infobot, be zippy" is the trigger. (mendel++)
+ the parameter is "zippy" in infobot.config.
+Added 'divine (.*)', a magic 8-ball (boojum++)
+Made Search work again for users with the +s user flag set.
+ I still don't recommend this for bots with very big
+ dbs.
+Another pass at getting the 'reload' code to work (Simon++).
+Target adressing in 'tell' made more consistent (Simon++).
+Now works with MD5 passwords also (thanks to Bobby Billingsley).
+Added timeouts to LWP-using modules.
+Fixed CTCP ping reply.
+Started RIPE whois to complement Internic whois, moved the
+ whois stuff into myRoutines. This is getting to be
+ a mess and still needs work. (Thanks to Bo Krosgaard for
+ this suggestion).
+
+0.44.2
+
+Added USAir flight information: 'usair flight 781'. requires LWP.
+ This should be replaced with a more general one.
+Added keyed channel patch from Eden Li (tile).
+Added new slashdot headline retrieval code care of Richard Hoelscher
+ (Rahga). It makes Chris Tessone's code go to the XML file on /.
+ Also restricted its recongized form to "slashdot" or "slashdot
+ headlines". Now called "Slashdot3".
+Added a factpack on Security to factopacks/ submitted by Peter
+ Johnson (rottz), and one that has all the ports listed for tcp
+ and udp from Samy Kamkar (CommPort5). Keep it up! :)
+Applied a patch to the insult server code from michael@limit.org.
+ should fix the function as well as "insult x in german".
+ btw, i can't send email to limit.org, so i hope he sees this :)
+Modified METAR code from Lazarus Long
+ and added a status line so it tells the owner it requires
+ LWP and Geo::METAR.
+Added Simon Cozens' Google search. Requires WWW::Search::Google.
+ "google for foo", "search google for foo".
+Expanded the Google search to do everything WWW::Search knows about,
+ and to fork so it wouldn't block the bot. Dejanews, Google,
+ Gopher, Excite, Infoseek, HotBot, Lycos, AltaVista, Magellan,
+ PLweb, SFgate, and Verity. try 'search for '.
+ But you really need to install WWW::Search to use this.
+Added "shut up" (which changes Addressing to "REQUIRE"),
+ "wake up" (changes it to "OPTIONAL"), and "showmode" that
+ tells which mode it's in. Aldebaran++ for this. the param
+ "shutup" controls whether this is on; turn it off if you always
+ want it to be REQUIRE.
+Made the output of "seen" nicer; reports how long it's been.
+By the way, the Nickometer code is due to Adam Spiers, and it
+ was one of the earlier, relatively undocumented add-ons that
+ made an example for others to start off with. Added comment.
+
+
+0.44.1
+
+Fixed the CTCP bug which people were exploiting to crash. Thanks!
+Wrapped the babelfish translation code 'use's in evals so
+ lack of URI::Escape won't stop you from running the bot.
+Added Chris Tessone's slashdot headlines module with a few minor
+ changes (the same eval trick as above).
+Added some documentation to infobot_guide.html (gasp!)
+Added some factpacks in factpacks/ that were on the web site.
+
+0.44.0
+
+WARNING: many changes have been undocumented, but
+ i'm getting lots of requests to release the current
+ state -- warts and all. Here it is, 6:35 AM Jun 24 99,
+ an hour before yapc 99 opens.
+many small things, as usual.
+babel code (jdf++) for using babelfish to translate
+ things. 'translate to german: hello'. this
+ can be shortened to 'x to de hello'. *note:
+ LWP must be installed for this to work.
+'insult server' code; probably not very useful.
+ Also requires LWP.
+
+
+0.43.6
+
+freeside++ for code to clean up the imbd redirect.
+fimmtiu++ for 'your' patches. blame him now.
+fixed the text of the foldoc redirect (TorgoX++)
+added passwords for servers with passwords (ksiero++)
+ including server_pass in infobot.config
+made s/// case-insensetive (mendel++)
+added vhost support and vhost_name to infobot.config (elph++)
+changed some trivial status messages to be prettier
+made miscdir fully qualified, and changed it to ./files in
+ the default infobot.config file.
+moved stray help setup code into a subroutine and call it
+ from Setup.pl
+added "say" for +o (/msg say #channel foo)
+made it so that +o can make the bot join any channel
+added NOAA.pl, inspired by geniusj's sh script
+ to myRoutines.pl
+added METAR support (mendel++ for metar.pl), and this
+ plus the weather routine make nice examples
+
+0.43.5
+
+added as a species of : X is foo!
+added murrayb++'s patches for an ignore list file
+made help path relative (also murrayb++)
+renamed "scripts/make_db" to "scripts/update_db"
+added "scripts/unupdate_dbs" to back out all changes by nick
+ from a log file or part of a log file. good for removing
+ vandalism.
+made 'forget' logging more friendly to reversing it
+moved all the setup stuff more cleanly into Setup.pl
+made the ignore list modifiab;e at run-time with the P flag
+ and added 'ignore' and 'unignore' commands via msg
+added substitutions: X =~ s/A/B/
+
+0.43.4
+
+made private messages not respoken under the persistant
+ "seen" -- this was allowing people to get private
+ information on 0.43.3. 0.43.3 was only available for
+ a few hours, so i hope this impact is minimal.
+
+0.43.3
+
+many undocumented little things. fixes, of course!
+fixed the reply after seen.
+made seen persistant. added the infobot.config line 'seen'
+ for the seen-db location
+added what the last thing seen was.
+made the karma path fully specified.
+
+0.43.2
+
+fixed the learning from other bots based on URL policy
+
+0.43.1
+
+minor fixes here and there.
+fixed the math bug (finally! i think!)
+several NL patches. Small CTCP fix.
+some statement and question changes. nothing major.
+wanted to get this version out before i tried getting
+ things working on a few more platforms. seems
+ pretty stable.
+
+0.43.0
+
+* UPDATE YOUR irc.params to infobot.config FILES *
+* UPDATE YOUR userfile.txt files to infobot.users FILES *
+* SOME DOCUMENTATION is now in doc/infobot_guide.html
+
+changed DEBUG parameter name to VERBOSITY
+removed the broken STANDALONE mode for now
+ and eviscerated the code for it
+removed some lint from the params file
+files/irc.params IS NOW CALLED files/infobot.config
+removed vestigial paramdbm code.
+removed MacOS-specific code. this needs-writing.
+fixed the "out-loud" comment "you are not a bot owner"
+ to be silent
+removed the vesitigial and misleading infobot.doc
+ and created some documentation ! in doc/infobot.html
+ and children
+renamed userfile.txt to files/infobot.users
+added variable interpolation to infobot.config so
+ you can use $ident and all previously-defined
+ parameter values in the assignent of subsequent
+ paramters.
+moved userfile diagnostics into User.pl (!) from
+ top level infobot script
+renamed crontab.infobot to infobot.crontab
+converted all prints to status() for uniform logging
+ and console output
+removed other vesitigal logging code (Log.pl)
+redid the ansi color by type and status
+made internic reply via msg only
+removed MLF's -- these need rewriting
+moved the addressing code ALL out of Irc*.pl
+cleared initial negative on statements when the entry
+ doesn't yet exist (less weird factoids)
+added 'also |' to add disjuncts easily
+allowed coherent protection of any word from
+ processing using \. e.g. \is for
+ x \is y is y
+added %channels, %seen, %verified hashes
+added password + hostmask protection and command-on-request
+ with the syntax /msg
+ where is {eval (mode e), op (mode p), die (mode o)}
+previously public bot commands are now private message only or
+ privmsg + password
+added "sane" files (sane-is.txt amd sane-are.txt) that
+ will be loaded into the -is and -are dbs at startup
+ and will set some items to sane values. put things
+ that you want to be permanent in these.
+isolated statement rejection code
+moved math into Math.pl
+moved search code into Search.pl
+rolled the requires in the top level script into a
+ single loop that automatically loads all the perl
+ files in the src directory
+fixed the interaction between addressing and volunteering.
+ minVolunteerLength applies only if addressing is not REQUIRED
+fixed the grotty math bug in perlMath that prevented negative
+ numbers from evalling properly
+
+0.42.1
+
+made it go for the _first_ verb rather than
+ the first verb in the list. cleaned up the
+ debug info.
+fixed the underscore-erasing bug.
+there was a problem is \b$verb\b missing
+ things like .is; fixed.
+karma fix... allow "me", tolerate whitespace
+ (thanks fimmtiu and SirGawain)
+
+0.42
+
+fixed an interaction between marked questions,
+ minimum volunteering length, and addressing.
+allowed talk between friendly bots
+rationalized some of the logging, so you can see
+ who did everything ('is also' updates, in
+ particular).
+fixed the traceroute calling syntax
+for some, karma didn't work with 0.41.5; it may now :)
+
+0.41.5
+
+closed the traceroute hole
+fixed the reverse DNS
+fixed some 'huh?' replies -- made sure to return
+ the NOREPLY token in Update.pl
+* desire: cut confirmation replies (mode)
+* desire: silent mode (learn only)
+
+rev 0.41.0 - 0.41.4
+
+many minor things, mostly natural language,
+ some infrastructure. allowed "forget" to
+ end with final punctuation.
+added factpack subdirectory. use these to
+ load up the bot with things. more to come.
+fixed "addressing" -> REQUIRE.
+
+revision 0.41
+
+added "karma". now "x++" or "x--" will change x's karma.
+ "karma for x" will show it's current standing. This
+ idea came from dkindred@cs.cmu.edu and his plusplus
+ Zephyr bot. Darrel Kindred is the mastermind here;
+ I just liked the idea and added it.
+added e mode in userfile to expose eval. this is not
+ recommended. requires a crypted pass, then
+ /msg bot eval
+
+revision 0.40.1
+
+replaced default userfile and fixed a tiny bit of NL where
+ it would say "OK" even when X already was Y.
+the next rev will be the one for MacPerl etc., i hope. this
+ was just a quick fix because 0.40 wasn't letting people
+ teach by default.
+
+revision 0.40
+
+several small fixes -- fixed a big with article deletion,
+ made it so it doesn't echo when told to die by a non-master,
+ fixed a few NL things, removed the CTCP die command.
+Mailing list opens.
+I plan one more rev to make sure this pre-version works
+ with MacPerl, then we'll switch to the new model.
+
+revision 0.39
+
+integrated wf's changes with my own NL stuff from
+ purl exploits. this is a quick-turnaround rev to
+ get things in place for an upcoming major rev.
+since nslookup, etc are now keyworded, removed
+ ipmatch and dmatch regexen from their preconditions.
+added param for default signoff message
+
+revision 0.38
+
+user system reworked flags are settable to limit
+ access to the bot's features. Examples can
+ be found in files/userfile.txt.
+non-blocking sockets added to allow use of DCC
+ and other various functions to come soon.
+
+revision 0.37
+
+Standalone mode works again after an oops in the
+hooks by wildy... :)
+
+revision 0.36
+
+NL stuff, some fixes from purl.
+
+revision 0.35
+
+new option; multiline factoids. you can use the
+ following syntax to teach infobot facts on
+ multiple lines:
+ infobot: something is
+ anything said from there on will be recorded
+ as part of the fact. make sure you designate
+ the end of the fact or it will continue adding
+ everything you say into the fact.
+
+ this will end the fact and store it in the db.
+ made MLFs work with repeatIgnoreInterval to prevent
+ some nasty abuse potential; added status
+ line for repeat ignore
+
+revision 0.34
+
+fixed the addressing bug found in Irc.pl
+removed the "okay" message when it doesn't replace
+ a key with the same message; this makes it nicer
+ when more than one is on the same channel, though
+ they still all reply
+changed the default params to make urls optional
+fixed the "the" bug, and expanded the "can" grammar
+ to handle cases more flexibly.
+undid some bug that were introduced in handing the
+ code back and forth
+folded in code that got out of sync in parallel revs.
+
+revision 0.33.3
+
+added the formatting of public channel messages and
+ changed the hook code to be a bit more sane
+
+revision 0.33.2
+
+re changed infobot to OPTIONAL listening/learning
+ instead of just url's as default
+
+revision 0.33.1
+
+added a few irc operator things in param file
+fixed the math routines
+commented out the dotwise domain thing in Question.pl
+ because its regex didn't function correctly, etc
+ maybe just use the one nslookup so it doesnt get
+ confused with messages.
+
+cleaned up for a hopefully stable-ish 0.33
+
+revision 0.32b
+
+infobot doesn't require perl 5.004 anymore, you
+ can run safely with perl 5.001 i'm pretty sure.
+added support for ANSI Color -- enjoy, you
+ can turn this on/off in the params file. also
+ might ansi-fy a few more parts. not much though.
+fixed bugs with irc code where infobot
+ couldn't join &channels (local) or channels
+ with weird things like '!'.
+-patrick
+
+fixed the :) bug
+fixed non-default param file to files/irc.params
+-kevin
+
+revision 0.31b
+
+ok, reintegrating the irc modules.
+re-added $nuh support so that users can use their
+ passwords, etc.
+made numbers with more than 16 digits "a very big
+ number" in the math handling.
+it's indentation wars! now that the tabs are gone,
+ most things indent nicely.
+cut out a few vestigial lines from the inlet code,
+ such as the hard-coded dbs (not used now anyway).
+i'm still torn about the copyright/license thing. have
+ to figure out how to handle that.
+changed the default nick back the Newbie.
+removed the #$%#$% param db that was bugging me so
+ much. just read in the param file and be
+ happy.
+renamed "run_infobots.pl" to "run_if_needed.pl" and
+ made a couple of minor changes in it.
+
+
+revision 0.30b
+
+thanks, patrick! Patrick Cole (wildfire) did
+ everything for rev 029b... many many thanks.
+made the irc version the default
+changed the default server to cmu
+changed the default channel to #infobot
+will do more in the near future...
+NOTE infobot now requires perl 5.004
+
+
+revision 0.29b
+
+the first and greatest appearance of the inlet code rolled
+ into infobot. new look makes it easier to see what's
+ going on and gives it a greater feel to it. All irc
+ code rewritten by Patrick Cole graciously
+added a traceroute command for lazy people, etc
+nslookup for domain lookups
+reindented all the code by hand (ugh) because it was in an
+ "Eight Megs and Constantly Swapping" kind of way :)
+infobot can now reconnect split servers ...
+ "/ctcp infobot autorecon on"
+internic whois querys should work now hopefully
+
+
+revision 0.28b
+
+the first appearance of "curl", the command-line url.
+ useful for one-line queries and updates of the db.
+ not as full-featured as the standalone url --
+ these will probably merge.
+fixed a minor bug in writeParamFile
+woops. it was set to userLevel > 100 for the eval
+ instead of >= 100.
+
+
+revision 0.27b
+
+aha! there was a bug in the argument parser; used pop
+ instead of shift. this ought to work better now.
+added absolute path to url in in4m. use this if you're
+ going to invoke url from anywhere other than the
+ home directory.
+cleaned up in4m (top level) somewhat
+added mkpasswd and ckpasswd in anticipation of userlevels
+added writeParamFile in urlParams.pl. I still would like
+ to get away from the param db and just read and write
+ a flat file.
+allowed $date, $time variables in values, e.g. "date is $date"
+allowed \i \me \my in values that prevents "person-switching",
+ e.g. "x is go ahead and tell \me" so it doesn't turn me
+ into "in4m" or whatever on output
+moved $safeWho generation into &purifyNick, which makes a
+ nick safe to use in a regex (among other things). it
+ really just removes 'bad' characters.
+lifted the 'forget' code above most of the text processing
+ so it's more wysiwyf ('what you see is what you forget').
+stamped out what i hope is the last nick bracket bug
+lifted the normalize query and switch person calls into urlQuestion
+ so that they don't cause weird interaction problems
+fixed a bug in 'you' (in switchPerson) referring to the bot
+added a 'chomp' on reading init files to keep out extra \n's
+added more stuff in urlUser.pl
+removed the secretWord potential nightmare and replaced it
+ with the userlist potential nightmare
+addusers, readUserFile, writeUserFile, ckuser, users, etc
+ etc. in urlUser.pl
+userList parameter in irc.params, standalone.params
+userlevel 100 exposes eval (!), userlevel 10 lets you
+ override the 'REQUIRE' option for urls. come to
+ think of it, REQUIRE could be a number...
+allowed 'allowUrls' to be a number, in which case it is
+ interpreted as the min userlevel to enter a non-url
+
+
+revision 0.26b
+
+added a '' prepended tag to allow simple responses
+ (thanks, scuzzi_)
+made the default behaviour not to whine about things that
+ are already defined (...but x is y...) unless addressed
+ which makes it nicer when more than one are on the same
+ channel
+
+
+revision 0.25b
+
+mucked around with run_infobots.pl to get it working with
+ cron more obviously
+urlProcess had an old-style %params ; changed to %param
+moved a check for null paramfile names into loadParams loop
+fixed a bracketing error that led to irc mode overriding
+made it optional to use the parameter dbm; it's actually
+ reasonable to just read the irc.params file only
+ and not go for the "persistant parameters"
+
+
+revision 0.24b
+
+added a "commitDBM every Nth transaction" form of the parameter
+made dbm retry 10 times to open if it fails
+changed the default standalone params to point to the right files dir
+added a 'usage' output to dump_db to match make_db
+added param allowLeave, which lets people make the bot leave a chan
+changed the top-level name to just in4m.
+added args to the command line: -p, -i, -s, -h
+added a src/myRoutines.pl file so people can customize easily
+
+
+revision 0.23b
+
+fixed dump_db :/ silly me
+fixed another little problem in urlDBM.pl
+
+
+revision 0.22b
+
+set up params as a db. it's still a hack and needs work,
+ but it allows for persistant params that you can set
+ within a session.
+fixed various problems in referring to the right dbs
+removed gratuitous accesses to the dbs
+exposed more stuff in the standalone version. see standalone.txt.
+set up initialization of dbs within in4m.pl
+removed RUN_ME_FIRST
+changed %params to %param to make set look nicer
+moved make_db and dump_db into scripts/ subdir
+ and cleaned them up slightly
+renamed params/ to files/
+made a doc dir and put the README for standalone in there
+added 'where is x at' form (thanks, scuzzi)
+
+
+revision 0.21b
+
+got rid of the question count access to the db.
+made -w happier. someday i'll make -s happy too.
+added parameter files to make life better.
+the first appearance of the standalone desktop interactive
+ version that doesn't depend on irc.
+added params and hooks for the standalone version.
+params{nick} behaviour made consistant (urlSetup was overriding).
+@allowed_channels fixed to $params{'allowed_channels'}.
+fixed the if (($params{'addressing'} eq 'REQUIRE') && $addressed)
+ to !addressed in urlStatement (thanks again, cburnett).
+made it open and close dbm files on each update unless
+ told otherwise. some implementations did not guarantee
+ commit. you can check your implementation and set
+ this to null or something else if you have a smart dbm.
+added params for maxKeyLength and maxDataLength.
+added params and fixed the help files. help files are
+ still ugly in the standalone mode.
+added allowUpdate parameter so you can have strictly answerbots;
+ this will tie in to having restricted lists of users + levels.
+made it so by default the irc version has no output. turn
+ up the debug level if you need more insight into what's
+ going in.
+
+
+revision 0.20b
+
+this was a quick rev.
+fixed some of the gratuitous named stuff in urlProcess.pl
+made it so dns wouldn't try to fork under macperl
+got the tracking back up
+
+
+revision 0.19b:
+
+changed the default db's to be infobot-is and infobot-are
+changed RUN_ME_FIRST to deal with that and renamed the .txt files
+made a wantNick param
+make it so dbs are created if don't exist (as option)
+fixed $addressed so it didn't just look for prefixes
+fixed a couple of the parameters that weren't referring to the hash
+changed $urlCount to $factoidCount
+
+
+revision 0.18b:
+
+moved a bunch of params into the global hash %params
+added ¶ms so people can see the settings
+ e.g. /msg in4m mysecretword ¶ms();
+added some parameters up-front for server, port, etc.
+changed the bad nickname code
+the burnett fix (:$realname)
+added infobot.help as a default help file
+
diff --git a/conf/infobot-are.txt b/conf/infobot-are.txt
new file mode 100644
index 0000000..42317d6
--- /dev/null
+++ b/conf/infobot-are.txt
@@ -0,0 +1,2 @@
+roses => red
+violets => blue
diff --git a/conf/infobot-is.txt b/conf/infobot-is.txt
new file mode 100644
index 0000000..53b2151
--- /dev/null
+++ b/conf/infobot-is.txt
@@ -0,0 +1,2 @@
+oznoid => at mailto:lenzo@cs.cmu.edu or at http://www.cs.cmu.edu/~lenzo
+infobot => at http://www.cs.cmu.edu/~infobot
diff --git a/conf/infobot.channels b/conf/infobot.channels
new file mode 100644
index 0000000..da40c27
--- /dev/null
+++ b/conf/infobot.channels
@@ -0,0 +1,10 @@
+# Channel File (c) 1999 Infobot & Associates
+
+ChannelEntry #test {
+ fallback yes;
+ addressing REQUIRE;
+ shutup TRUE;
+ msgonly TRUE;
+ continuity 0;
+}
+
diff --git a/conf/infobot.config b/conf/infobot.config
new file mode 100644
index 0000000..f4132c3
--- /dev/null
+++ b/conf/infobot.config
@@ -0,0 +1,256 @@
+# parameter settings file for the infobot
+# kevin lenzo (lenzo@cs.cmu.edu)
+
+# note:
+# '$var' means a parameter that has been named; it is interpolated.
+# By convention, things with '.ext' (extensions) are text files, and
+# things with hyphens in them are DBM file prefixes, used for run-time
+# learning or state maintenance.
+#
+# Nota Bene: Comment out attributes you don't want. Note that the
+# word "false" is actually a true value! use 0 or comment
+# out options you don't want.
+
+# the internal name for this bot
+ident xpubbot
+
+# the nickname we want
+wantNick $ident
+
+# the prefix of the dbm files
+dbname $ident
+
+# where to put logging info
+logfile $dbname.log
+
+# plusplus, an idea hijacked from CMU zephyr community,
+# and dkindred++ in particular. Otherwise known
+# as 'karma'. this is persistant between shutdowns.
+
+plusplus $dbname-karma
+
+# persistant "seen" db
+seen $dbname-seen
+
+# do we have an ignore database? uncomment this if not.
+ignore $dbname-ignore
+
+# should we ALWAYS close and reopen dbm on update?
+# some systems don't do commitment until quit.
+#
+# 0 => never force sync
+# 1 => force sync on every update
+# N => force sync every Nth update
+
+commitDBM 5
+
+# Explicitly set the database module. The default is AnyDBM_File. If
+# you want to use any shared database files (via sharedDBMs) you have to
+# set this to DB_File.
+
+#DBMModule DB_File
+
+# Specify an extension which should be added to all database names. By
+# default this is empty.
+
+#DBMExt .db
+
+# Specify which databases will be shared among multiple infobots on the
+# same machine, and so require locking. By default none are shared. If
+# you use this at all you have to set DBMModule to DB_File. This can be
+# a list of database names, or /all (which means every database), or
+# /all-but-ignore (which means every database except the ignore list).
+#
+# As of this writing, the databases are:
+#
+# is main database, for singular factoids
+# are main database, for plural factoids
+# ignore ignored nicks and user/host patterns
+# plusplus karma
+# seen last seen info by each nick
+
+#sharedDBMs is are plusplus
+#sharedDBMs /all
+#sharedDBMs /all-but-ignore
+
+# X is Y
+# max length of X (the key,
+# the 'left hand side' (LHS) of an assignment,
+# or the first argument)
+
+maxKeySize 50
+
+
+# max length of Y (value or data, the 'right hand side', or 2nd argument)
+maxDataSize 400
+
+# REQUIRE, OPTIONAL, REJECT for different behaviour with URLs
+# REQUIRE means it will need to be a url type (e.g. file:, http:)
+# OPTIONAL will take anything
+# REJECT will not accept any urls. this makes it easy to
+# run 2 with different nicks and styles.
+
+acceptUrl OPTIONAL
+
+# IRC-related params
+ircuser $ident
+realname $ident
+# server irc.infobot.org
+server irc.freenode.net
+port 6667
+allowed_channels #xpub #infobot #$ident #test
+
+# channels to join
+# use #channel,key (thanks to tile++) for keyed channels
+
+# join_channels #infobot #$ident
+join_channels #xpub
+
+# server password, if needed
+# server_pass myserverpassword
+
+# vhost support... if you have a vhost, you can use this,
+# otherwise it won't work.
+# inm++, elph++ for this :)
+# vhost_name f00.bar.org
+
+# nickServ_pass foo
+# chanServ_pass bar
+
+# addressing is when you name the bot. if this is REQUIRE,
+# the bot should only speak when spoken to. BUT it may listen.
+# anything else will mean it can barge in when it thinks it
+# knows something.
+# "shutup" determines whether you can switch modes on the
+# fly with the bot. if you use REQUIRE for addressing, you
+# probably want to comment out the shutup line.
+
+addressing OPTIONAL
+# shutup TRUE
+
+# ansi screen control is available from 0.32 onwards
+# value of 1 means to use ANSI, 0 means generic bold
+ansi_control 1
+
+# things we may or may not want to allow. 1 = allow, 0 otherwise.
+# do you want to be a desktop calc?
+perlMath 1
+fortranMath 0
+
+# do you want to allow DNS lookup/Internic/Traceroute?
+allowDNS 1
+allowTraceroute 1
+allowInternic 1
+
+# ord/chr etc
+allowConv 1
+
+# tell so-and-so about such-and-such
+allowTelling 1
+
+# let any old joe update stuff. if this is 0, you'll have to
+# either change some code, do everything with e.g. update_db,
+# or do something else arcane to get factoids in.
+allowUpdate 1
+
+# How much verbage to display on the console
+VERBOSITY 1
+
+# the magic hack word to unignore everyone
+unignoreWord unignore-everyone
+
+# where configuration and help files and such live, the default is the
+# files subdir of the main directory
+confdir conf
+
+# my help file. this will get confdir prepended
+# you may want to change this to $ident.help
+
+helpfile infobot.help
+
+srcdir src
+extradir extras
+
+# within how long of getting the same reply should
+# we not respond (irc mode only). in seconds.
+
+repeatIgnoreInterval 8
+
+# in what contexts do we let people make the bot leave a
+# channel (this is an or'd list; public private)
+
+allowLeave public
+
+# our user list default file (in miscdir)
+# you may want to change this to $ident.users
+
+userList infobot.users
+
+# channel list, specifies options which differ from the defaults, by
+# channel.
+
+channelList infobot.channels
+
+# default quit message
+quitMsg regrouping; bbiab
+
+
+# how long does something have to be before we'll just volunteer
+# the answer without a question mark, question, or being addressed
+minVolunteerLength 8
+
+# other bots to ask for help
+
+# friendlyBots url purl script mrapi
+
+# sane defines that ALWAYS overwrite existing values at startup
+# this is a prefix for the files (sane-is.txt, sane-are.txt)
+
+sanePrefix sane
+
+# allow weather and METAR lookups, respectively. These should
+# actually be turned into a user modes. mendel++. Require
+# LWP and metar requires Geo::METAR.
+weather true
+metar true
+
+# babelfish translator. jdf++. requires LWP, not included.
+babel true
+
+# slashdot headlines. requires LWP, not included. get it from CPAN.
+slash true
+
+# insult and excuse servers
+insult true
+excuse true
+
+# google search.. simon++ . expanded to www search using several
+# engines since it was so easy once you have WWW::Search.
+# use "update" if you want it to update the db, or comment
+# out if you don't want it. requires WWW::Search, not included.
+# use "forceupdate" to force a db update on every google search.
+wwwsearch update
+
+# general headline-getter. uses RDF. (LotR++)
+rss true
+
+# purldoc perl documentation lookup DMasque++, HJ++
+purldoc true
+purldoc_trigger purldoc
+purldoc_max_public 3
+
+# speller. requires the ispell program.
+ispell true
+
+#zippy quotes (infobot, yow or infobot, be zippy)
+zippy true
+
+# the magic 8ball (divine)
+magic8_answers $miscdir/magic8.txt
+
+# exchange rates (exchange 233 DEM to USD)
+exchange true
+
+# stock quotes
+stockquotes true
+
diff --git a/conf/infobot.config-dist b/conf/infobot.config-dist
new file mode 100644
index 0000000..e71a470
--- /dev/null
+++ b/conf/infobot.config-dist
@@ -0,0 +1,254 @@
+# parameter settings file for the infobot
+# kevin lenzo (lenzo@cs.cmu.edu)
+
+# note:
+# '$var' means a parameter that has been named; it is interpolated.
+# By convention, things with '.ext' (extensions) are text files, and
+# things with hyphens in them are DBM file prefixes, used for run-time
+# learning or state maintenance.
+#
+# Nota Bene: Comment out attributes you don't want. Note that the
+# word "false" is actually a true value! use 0 or comment
+# out options you don't want.
+
+# the internal name for this bot
+ident i-bot
+
+# the nickname we want
+wantNick $ident
+
+# the prefix of the dbm files
+dbname $ident
+
+# where to put logging info
+logfile $dbname.log
+
+# plusplus, an idea hijacked from CMU zephyr community,
+# and dkindred++ in particular. Otherwise known
+# as 'karma'. this is persistant between shutdowns.
+
+plusplus $dbname-karma
+
+# persistant "seen" db
+seen $dbname-seen
+
+# do we have an ignore database? uncomment this if not.
+ignore $dbname-ignore
+
+# should we ALWAYS close and reopen dbm on update?
+# some systems don't do commitment until quit.
+#
+# 0 => never force sync
+# 1 => force sync on every update
+# N => force sync every Nth update
+
+commitDBM 5
+
+# Explicitly set the database module. The default is AnyDBM_File. If
+# you want to use any shared database files (via sharedDBMs) you have to
+# set this to DB_File.
+
+#DBMModule DB_File
+
+# Specify an extension which should be added to all database names. By
+# default this is empty.
+
+#DBMExt .db
+
+# Specify which databases will be shared among multiple infobots on the
+# same machine, and so require locking. By default none are shared. If
+# you use this at all you have to set DBMModule to DB_File. This can be
+# a list of database names, or /all (which means every database), or
+# /all-but-ignore (which means every database except the ignore list).
+#
+# As of this writing, the databases are:
+#
+# is main database, for singular factoids
+# are main database, for plural factoids
+# ignore ignored nicks and user/host patterns
+# plusplus karma
+# seen last seen info by each nick
+
+#sharedDBMs is are plusplus
+#sharedDBMs /all
+#sharedDBMs /all-but-ignore
+
+# X is Y
+# max length of X (the key,
+# the 'left hand side' (LHS) of an assignment,
+# or the first argument)
+
+maxKeySize 50
+
+
+# max length of Y (value or data, the 'right hand side', or 2nd argument)
+maxDataSize 400
+
+# REQUIRE, OPTIONAL, REJECT for different behaviour with URLs
+# REQUIRE means it will need to be a url type (e.g. file:, http:)
+# OPTIONAL will take anything
+# REJECT will not accept any urls. this makes it easy to
+# run 2 with different nicks and styles.
+
+acceptUrl OPTIONAL
+
+# IRC-related params
+ircuser $ident
+realname $ident
+server irc.infobot.org
+port 6667
+allowed_channels #infobot #$ident #test
+
+# channels to join
+# use #channel,key (thanks to tile++) for keyed channels
+
+join_channels #infobot #$ident
+
+# server password, if needed
+# server_pass myserverpassword
+
+# vhost support... if you have a vhost, you can use this,
+# otherwise it won't work.
+# inm++, elph++ for this :)
+# vhost_name f00.bar.org
+
+# nickServ_pass foo
+# chanServ_pass bar
+
+# addressing is when you name the bot. if this is REQUIRE,
+# the bot should only speak when spoken to. BUT it may listen.
+# anything else will mean it can barge in when it thinks it
+# knows something.
+# "shutup" determines whether you can switch modes on the
+# fly with the bot. if you use REQUIRE for addressing, you
+# probably want to comment out the shutup line.
+
+addressing OPTIONAL
+# shutup TRUE
+
+# ansi screen control is available from 0.32 onwards
+# value of 1 means to use ANSI, 0 means generic bold
+ansi_control 1
+
+# things we may or may not want to allow. 1 = allow, 0 otherwise.
+# do you want to be a desktop calc?
+perlMath 1
+fortranMath 0
+
+# do you want to allow DNS lookup/Internic/Traceroute?
+allowDNS 1
+allowTraceroute 1
+allowInternic 1
+
+# ord/chr etc
+allowConv 1
+
+# tell so-and-so about such-and-such
+allowTelling 1
+
+# let any old joe update stuff. if this is 0, you'll have to
+# either change some code, do everything with e.g. update_db,
+# or do something else arcane to get factoids in.
+allowUpdate 1
+
+# How much verbage to display on the console
+VERBOSITY 1
+
+# the magic hack word to unignore everyone
+unignoreWord unignore-everyone
+
+# where configuration and help files and such live, the default is the
+# files subdir of the main directory
+confdir conf
+
+# my help file. this will get confdir prepended
+# you may want to change this to $ident.help
+
+helpfile infobot.help
+
+srcdir src
+extradir extras
+
+# within how long of getting the same reply should
+# we not respond (irc mode only). in seconds.
+
+repeatIgnoreInterval 8
+
+# in what contexts do we let people make the bot leave a
+# channel (this is an or'd list; public private)
+
+allowLeave public
+
+# our user list default file (in miscdir)
+# you may want to change this to $ident.users
+
+userList infobot.users
+
+# channel list, specifies options which differ from the defaults, by
+# channel.
+
+channelList infobot.channels
+
+# default quit message
+quitMsg regrouping; bbiab
+
+
+# how long does something have to be before we'll just volunteer
+# the answer without a question mark, question, or being addressed
+minVolunteerLength 8
+
+# other bots to ask for help
+
+# friendlyBots url purl script mrapi
+
+# sane defines that ALWAYS overwrite existing values at startup
+# this is a prefix for the files (sane-is.txt, sane-are.txt)
+
+sanePrefix sane
+
+# allow weather and METAR lookups, respectively. These should
+# actually be turned into a user modes. mendel++. Require
+# LWP and metar requires Geo::METAR.
+weather true
+metar true
+
+# babelfish translator. jdf++. requires LWP, not included.
+babel true
+
+# slashdot headlines. requires LWP, not included. get it from CPAN.
+slash true
+
+# insult and excuse servers
+insult true
+excuse true
+
+# google search.. simon++ . expanded to www search using several
+# engines since it was so easy once you have WWW::Search.
+# use "update" if you want it to update the db, or comment
+# out if you don't want it. requires WWW::Search, not included.
+# use "forceupdate" to force a db update on every google search.
+wwwsearch update
+
+# general headline-getter. uses RDF. (LotR++)
+rss true
+
+# purldoc perl documentation lookup DMasque++, HJ++
+purldoc true
+purldoc_trigger purldoc
+purldoc_max_public 3
+
+# speller. requires the ispell program.
+ispell true
+
+#zippy quotes (infobot, yow or infobot, be zippy)
+zippy true
+
+# the magic 8ball (divine)
+magic8_answers $miscdir/magic8.txt
+
+# exchange rates (exchange 233 DEM to USD)
+exchange true
+
+# stock quotes
+stockquotes true
+
diff --git a/conf/infobot.crontab b/conf/infobot.crontab
new file mode 100644
index 0000000..8dd9541
--- /dev/null
+++ b/conf/infobot.crontab
@@ -0,0 +1,2 @@
+*/5 * * * * /usr/users/you/infobot0.1b/run_infobots.pl > /dev/null
+
diff --git a/conf/infobot.help b/conf/infobot.help
new file mode 100644
index 0000000..4118090
--- /dev/null
+++ b/conf/infobot.help
@@ -0,0 +1,13 @@
+main: i learn mainly by observing declarative statements such as "x is at http://www.xxx.com", and then reply when people ask things like "where can i find x?"
+
+author: oznoid (mailto:lenzo@ri.cmu.edu) is my author.
+
+corrections: If I come back with "...but x is at http://xx.xx.xx" or something like that, and you want to change the entry, use "no, x is at http://sdfsdfsdf". The "No," tells me to supercede the existing value.
+corrections: You can add to an entry with "also". "X is also at ..."
+
+reply: There is a special tag, , that is used to override the usual response. Usually, a response is "X is Y", but it can be made "Y" by making the entry "X is Y".
+reply: This is a good way to close junk entries; use "X is " with nothing after it.
+
+alternation: The | symbol in an entry causes an infobot to choose one of the replies at random. "X is Y|Z" will produce "X is Y" or "X is Z" randomly.
+
+karma: Karma is a community rating system. use "X++" to increase the karma, or "X--" to decrease it. Ask for ratings using "karma for X?"
diff --git a/conf/infobot.help-dist b/conf/infobot.help-dist
new file mode 100644
index 0000000..4118090
--- /dev/null
+++ b/conf/infobot.help-dist
@@ -0,0 +1,13 @@
+main: i learn mainly by observing declarative statements such as "x is at http://www.xxx.com", and then reply when people ask things like "where can i find x?"
+
+author: oznoid (mailto:lenzo@ri.cmu.edu) is my author.
+
+corrections: If I come back with "...but x is at http://xx.xx.xx" or something like that, and you want to change the entry, use "no, x is at http://sdfsdfsdf". The "No," tells me to supercede the existing value.
+corrections: You can add to an entry with "also". "X is also at ..."
+
+reply: There is a special tag, , that is used to override the usual response. Usually, a response is "X is Y", but it can be made "Y" by making the entry "X is Y".
+reply: This is a good way to close junk entries; use "X is " with nothing after it.
+
+alternation: The | symbol in an entry causes an infobot to choose one of the replies at random. "X is Y|Z" will produce "X is Y" or "X is Z" randomly.
+
+karma: Karma is a community rating system. use "X++" to increase the karma, or "X--" to decrease it. Ask for ratings using "karma for X?"
diff --git a/conf/infobot.users b/conf/infobot.users
new file mode 100644
index 0000000..15163a4
--- /dev/null
+++ b/conf/infobot.users
@@ -0,0 +1,42 @@
+#
+# User File (c) 1998 Infobot & Associates
+#
+# FLAGS
+# ----------------------
+# i Ignored Flag
+# f MLF Usage Allowed
+# t Teaching Allowed
+# r Removing Allowed
+# m Modifying Allowed
+# c Part/Join Allowed
+# s Searching Allowed (possibly computationally expensive)
+# S user can make bot Say things
+# e Extra Privs [ not implemented robustly: AVOID ]
+# p oP on channel by public request
+# ----------------------
+# o Owner Flag
+# ----------------------
+#
+# recommended default user flags: +trmc
+
+UserEntry default {
+ flags +trmcs;
+}
+
+# here's an example entry
+
+UserEntry oznoid {
+ name "Kevin A. Lenzo";
+ title "that guy";
+ flags +ftrmcsSope;
+ pass rrmrxB6U4ryRk;
+ mask *!lenzo@*.speech.cs.cmu.edu;
+}
+
+UserEntry plonk {
+ name "Eep Malloy"
+ title "that guy II";
+ flags +trmcspo;
+ pass rrmrxB6U4ryRk;
+ mask *!*@*.static.telerama.com
+}
diff --git a/conf/infobot.users-dist b/conf/infobot.users-dist
new file mode 100644
index 0000000..15163a4
--- /dev/null
+++ b/conf/infobot.users-dist
@@ -0,0 +1,42 @@
+#
+# User File (c) 1998 Infobot & Associates
+#
+# FLAGS
+# ----------------------
+# i Ignored Flag
+# f MLF Usage Allowed
+# t Teaching Allowed
+# r Removing Allowed
+# m Modifying Allowed
+# c Part/Join Allowed
+# s Searching Allowed (possibly computationally expensive)
+# S user can make bot Say things
+# e Extra Privs [ not implemented robustly: AVOID ]
+# p oP on channel by public request
+# ----------------------
+# o Owner Flag
+# ----------------------
+#
+# recommended default user flags: +trmc
+
+UserEntry default {
+ flags +trmcs;
+}
+
+# here's an example entry
+
+UserEntry oznoid {
+ name "Kevin A. Lenzo";
+ title "that guy";
+ flags +ftrmcsSope;
+ pass rrmrxB6U4ryRk;
+ mask *!lenzo@*.speech.cs.cmu.edu;
+}
+
+UserEntry plonk {
+ name "Eep Malloy"
+ title "that guy II";
+ flags +trmcspo;
+ pass rrmrxB6U4ryRk;
+ mask *!*@*.static.telerama.com
+}
diff --git a/conf/magic8.txt b/conf/magic8.txt
new file mode 100644
index 0000000..5035756
--- /dev/null
+++ b/conf/magic8.txt
@@ -0,0 +1,44 @@
+original => Outlook Not So Good
+original => My Reply Is No
+original => Don't Count On It
+original => You May Rely On It
+original => Ask Again Later
+original => Most Likely
+original => Cannot Predict Now
+original => Yes
+original => Yes Definitely
+original => Better Not Tell You Now
+original => It Is Certain
+original => Very Doubtful
+original => It Is Decidedly So
+original => Concentrate and Ask Again
+original => Signs Point to Yes
+original => My Sources Say No
+original => Without a Doubt
+original => Reply Hazy, Try Again
+original => As I See It, Yes
+sarcastic => NOT
+sarcastic => What do YOU think
+sarcastic => Obviously
+sarcastic => Ask me if I care
+sarcastic => Yeah, and I'm the Pope
+sarcastic => That's ridiculous
+sarcastic => Who cares
+sarcastic => Forget about it
+sarcastic => You wish
+sarcastic => Yeah, right
+sarcastic => Sure
+sarcastic => Get a clue
+sarcastic => In your dreams
+sarcastic => Oh, please
+sarcastic => Whatever
+sarcastic => As if
+sarcastic => You've got to be kidding
+sarcastic => Dumb question. Ask another
+sarcastic => Not a chance
+userdef => Outlook Sucks
+userdef => THIS SPACE FOR RENT
+userdef => Bugger Off
+userdef => How appropriate, you fight like a cow
+userdef => Eat more cheese, then ask again
+userdef => When hell freezes over
diff --git a/conf/sane-are.txt b/conf/sane-are.txt
new file mode 100644
index 0000000..411b10b
--- /dev/null
+++ b/conf/sane-are.txt
@@ -0,0 +1,6 @@
+what =>
+who =>
+when =>
+where =>
+why =>
+it =>
diff --git a/conf/sane-ignore.txt b/conf/sane-ignore.txt
new file mode 100644
index 0000000..6cd1104
--- /dev/null
+++ b/conf/sane-ignore.txt
@@ -0,0 +1,3 @@
+*cthulhu!hastur@*unspeakable.net # an example nick!user@host ban
+*!*@*nan*direct.ca
+*!*@200.38.211.*
diff --git a/conf/sane-is.txt b/conf/sane-is.txt
new file mode 100644
index 0000000..3a8f8eb
--- /dev/null
+++ b/conf/sane-is.txt
@@ -0,0 +1,8 @@
+what =>
+who =>
+when =>
+where =>
+why =>
+it =>
+how =>
+infobot guide => http://www.cs.cmu.edu/~infobot/infobot_guide.html
diff --git a/doc/how_to_fix_files_uploaded_from_windows_to_unix.txt b/doc/how_to_fix_files_uploaded_from_windows_to_unix.txt
new file mode 100644
index 0000000..918c2df
--- /dev/null
+++ b/doc/how_to_fix_files_uploaded_from_windows_to_unix.txt
@@ -0,0 +1,37 @@
+FIXING PERL AND TEXT FILES THAT HAVE BEEN UPLOADED FROM WINDOWS
+
+OK when you upload a file from Windows, it contains all
+these nasty control-M's on each line that screw everything
+up.
+
+To see them, use
+
+ cat -vet
+
+where is the name of some file you want to check.
+You should see the control-M's.
+
+To get rid of them, use
+
+ perl -pi -e 's/\cM//g'
+
+while is the file name. This does an in-place edit
+that removes all the control-Ms. You can do this to a bunch
+of files at once:
+
+ perl -pi -e 's/\cM//g'
+
+or even
+
+ perl -pi -e 's/\cM//g' *
+
+if all the files in the directory are text (like they ARE in
+the files/ directory of the infobot).
+
+ perl -pi -e 's/\cM//g' files/* src/* infobot
+
+from inside the infobot directory should clean everything up.
+You should also clean any factpacks or factoid files or logs
+that you use for processing.
+
+kevin
diff --git a/doc/infobot_guide.html b/doc/infobot_guide.html
new file mode 100644
index 0000000..8615a42
--- /dev/null
+++ b/doc/infobot_guide.html
@@ -0,0 +1,652 @@
+
+
+
+
+ Infobot Guide 0.44.3
+
+
+
+
+The infobot connects to an Internet Relay Chat (IRC) server,
+joins some channels (maybe), and begins accumulating factoids.
+To run one, download the source, uncompress it, untar it,
+edit the config files, and it up.
+
+Interacting with the bot is pretty straightforward. Most of
+the commands and variables available to users are listed below.
+The bot will interact via message or on-channel.
+
+
+
+
Interacting with an infobot
+
+
+
setting factoids: X is Y
+
+ Saying something like "X is Y" somewhere that the infobot
+ can see it will cause the bot to store a factoid, unless
+ X is already defined. It sets the value of X to Y.
+
+
accessing factoids: What is X?
+
+ You can ask an infobot about something in a number of
+ different ways, including "what is X?", "where is X?",
+ or just plain "X?".
+
+
altering factoids: s/A/B/
+
+ if you just want to change a part of a factoid, use
+ the s///operator. you have to address the bot
+ or use a private medium to do this.
+
+ MyBot, X =~ s/A/B/
+
+ will change the first occurence of A to B in the factoid
+ called X.
+
+
+
appending to existing entries: also
+
+ One can extend an existing factoid using the
+ keyword also
+
+
+
+ poink is also a silly word
+
+
+
+
+
erasing a factoid: forget
+
+ A factoid can easily be deleted by using
+
+
+
+ infobot, forget poink
+
+
+
+
+
changing a factoid: no, ...
+
+ You can change the entry for a factoid completely using
+
+
+
+ no, infobot, x is wugga wugga.
+
+
+
+ which deletes the prior entry (if possible)
+ and replaces it with the new one.
+
+
+
having the bot tell someone else something: tell
+
+ A user can ask an infobot to tell someone else something.
+
+
+
+ infobot, tell fimmtiu about no web
+
+
+
+
+
karma / plusplus
+
+ karma for a concept may be incremented or decremeted using
+ ++ and --. You can get the
+ current karma 'score' for something by asking for it.
+
+
+
+ oznoid++
+
+ oznoid--
+
+ karma for oznoid
+
+
+
+
+
status
+
+ infobots reply to status requests.
+
+
+ -> [url] status
+ [url!infobot@ALF5.SPEECH.CS.CMU.EDU] Since Fri Mar 26 06:42:27 1999, there have been 409
+ modifications and 2604 questions. I have been awake for 5 days, 4 hours, 24 minutes,
+ 18 seconds this session, and currently reference 47529 factoids.
+
+
+
+
+
joining an allowed channel: join #infobot
+
+ On IRC, you can tell the infobot to join a channel
+ that it's allowed to join with
+
+
+
+ infobot, join #infobot
+
+
+
+ If it is allowed to (in its paramter settings), it
+ will try to join the channel.
+
+
+
+
leaving a channel: part #infobot
+
+ This causes the bot to leave the given channel
+
+
+
+ infobot, part #infobot
+
+
+
+ leave is a synonym for part.
+
+
+
random responses with |
+
+ You can set a list from which to pick a random response by
+ using |
+
+
+
+ x is a|b|c|d
+
+
+
+ When x is asked about, the infobot will randomly choose from
+ the |-spearated list.
+
+
+
The <reply> factoid tag.
+
+ Normally, when the infobot replies to "What is X", it says
+ "X is Y". This form makes it just reply "Y".
+
+
+
+ X is <reply> Y
+
+
+
+
+
The <action> factoid tag (as of 0.43.5)
+
+ This causes the bot to respond as with except
+ as an ACTION.
+
+
+
+ X is <action> Y
+
+
+
+
+
backwacking
+
+ Use \ to protect items from evaluation.
+
+
+
+ x is y is y
+
+
+
+ will normally set x =is=> y is y, but
+
+
+
+ x \is y is y
+
+
+
+ will set
+
+
+ x is y =is=> y
+
+
+ The forget
+ and no (update) operators apply before checking
+ for this. This is also useful for getting around the
+ dereferencing of "i" and "me" and so on.
+
+
+
the $who variable
+
+ Contains the nickname person currently addressing the bot.
+ It can be used effectively in replies.
+
+
+
+ nice day is <reply> you betcha, $who.
+
+
+
+
+
the $date variable
+
+ Contains the current date and time, at the bot's host.
+
+
+
weather for KAGC (0.43.6+)
+
+ Retrieves the weather from NOAA station KAGC. See www.noaa.gov.
+ Note: Requires LWP.
+
+
+
metar KAGC (0.43.6+)
+
+
+ Retrieves METAR info from NOAA station KAGC. See www.noaa.gov.
+ Note: Requires Geo::METAR and LWP.
+
+
nslookup irc.cs.cmu.edu
+
+ performs DNS lookup or reverse-lookup on the hostname or IP.
+
+
internic yahoo.com
+
+ gets the internic WHOIS record
+
+
traceroute apple.com
+
+ gets the traceroute results from the bot's machine to the target machine. Summary only.
+
+
imdb, websters, foldoc
+
+ outputs a well-formed url for a search of IMDB (the Internet Movie DataBase), the Webster's 1913 dictionary, or the foldoc dictionary of geek terms.
+
+
+
+ imdb for clerks
+ webster for lucre
+
+
+
+
+
+
New in 0.44.3:
+
+
+
literal foo
+
+ returns the value without the usual post-processing.
+
+
change 100 USD to DEM
+
+ converts currency. Retrieves the current exchange rates from the net.
+ Requires LWP.
+
+
<rss="http://www.foo.com/summary.rss">
+
+ looks up the RSS file (RDF Site Summary) and returns it
+ in-place where the tag is. Requires XML::RSS and LWP.
+
+
give me an excuse, or excuse
+
+ connects to the excuse server and returns an excuse.
+ requires Net::Telnet.
+
+
+
+
+
Ignoring users: ignore nickname, ignore *.a.com
+
+ Users with the P (oP) flag can tell the bot
+ to ignore people or hostmasks. And 'unignore'.
+ use 'ignorelist' to get the current list of ignored masks,
+ if you have the P flag.
+
+
op on channel
+
+ The 'p' (oP) flag in the userfile allows this
+ to work. You'll need to set a hostmask. See
+ files/infobot.users Also uses a
+ crypted password.
+
+
+
+ /msg <bot> <password> op
+
+
+
+
die
+
+ If the bot owner (+O, Owner) says this or messages it to the bot,
+ it will kill itself.
+
+
+
+
+
scripts/utilities
+
+ The infobot comes with some scripts for working with
+ the DBM files.
+
+
+
+
update_db
+
+ This takes a flat ascii file and inserts it into a DBM file.
+ It creates a new DBM if it didn't exist.
+
+ The converse. It dumps out the DBM file to a flat
+ ascii file. Note there is no extension on the DBM name,
+ even though the system may use one.
+
+
+
+ scripts/dump_db infobot-is
+
+
+
+ Note there is no extension on the DBM name, even though the
+ system may use one (like .pag and
+ .dir or .db).
+
+ If you've set DBMModule in your config file, you
+ need to use the -m switch to specify the alternate
+ module.
+
+
+
+ scripts/dump_db -m DB_File infobot-is
+
+
+
+
+
+
+
+
+
add-on modules
+
+
+
nickometer, by Adam Spiers. Guages
+ how 'lame' a nickname is, as a percentage!
+
+
+ nickometer l33tn1ck
+
+
+
+
+
babel.pl by jdf. translates using the
+ babelfish
+ web site for machine translation.
+ In this implementation, English is assumed
+ to be the 'main' language, thus everything is
+ translated to or from another
+ language.
+
+ translate to german this is a test
+ x to german this is another test
+ x to de and a third
+ x from de ein bisschen Deutsch
+ German, French, Spanish, Italian, and Portugese are
+ currently supported by babelfish.
+
+
+
+
METAR support, courtesy of mendel
+ metar KAGC
+
+ retrieves METAR information for KAGC, the Allegheny
+ County airport station.
+
+
NOAA weather station support, courtesy of oznoid
+
+ weather KAGC
+
+
+ retrieves the
+ NOAA
+ weather information from (in this example) KAGC. uses the
+ same
+ codes
+ as metar info.
+
+
slashdot headlines, originally from Chris Tessone,
+ current version from Rahga.
+
+
+ slashdot
+ slashdot headlines
+
+
+ retrieves the current slashdot headlines from
+ www.slashdot.org.
+
+
W3Search: search web engines for links; thanks
+ to Simon Couzins for this one. Requires
+ WWW::Search and WWW::Search::Google.
+
+ search google for foo
+ google for foo
+ altavista for foo
+ dejanews for foo
+
+ Currently supports what WWW::Search and WWW::Search::Google
+ support, namely: Dejanews, Google, Gopher, Excite, Infoseek,
+ HotBot, Lycos, AltaVista, Magellan, PLweb, SFgate, and Verity.
+
+
US Airways In-flight info.
+
+ usair flight 781
+
+ retrieves the in-flight information for the
+ appropriate USAir flight. Note: Requires LWP.
+
+
+
+
+
setting up
+
+
configuration
+
+
editing the parameter file
+
+
+ The parameter file, usually in files/infobot.config,
+ is the most direct way to customize the settings on your infobot.
+
+
+
editing the user file
+
+
+ The user file, usually in files/infobot.users,
+ is the most direct way to customize the settings on your infobot.
+
+
+
+
editing the main script
+
+
+ There are certain items you may need to fiddle with
+ in the main script of the infobot, but normally you
+ shouldn't have to. The usual reasons are
+
+
+
changing the bang path to perl
+
+ If you get
+
+
+
+ infobot: Command not found.
+
+
+
+ or something like it, you need to edit the infobot
+ script at the top level directory (the script named
+ 'infobot') and set the path to you perl interpreter
+ in the very first line of the script to
+
+
+
+ #!/path/to/perl
+
+
+
+ with, of course, the full path to your perl binary.
+
+
+
explicitly setting normally relative paths
+
+ If you don't have . in your path, you will probably
+ need to set some variables explicitly that are normally
+ determined relative to the infobot script. This is
+ done in the 'infobot' script.
+
+
+
Installing Modules to enable features
+
+ Several add-ons, like weather and
+ web search require perl modules to
+ be installed. The easiest way to get all the
+ things you need is to install the CPAN.pm module,
+ available from CPAN, and use it to install what you need. This
+ is best done as root.
+ Once you have the CPAN module installed, use
+ it to install the required modules:
+
+
+
the main thing: install Bundle::LWP
+
for METAR: install Geo::METAR
+
for W3Search:
+
+
install WWW::Search
+
install WWW::Search::Google
+
+
+ Once these are installed, start or restart your infobot.
+
+
+
+
+
+
running the infobot
+
+
+
starting it up
+
+ This should be as simple as entering the infobot
+ parent directory and executing
+
+
+
+ infobot
+
+
+
+
+ This starts up the script and generates a whole lot of text.
+ It's useful and interesting to see what's going on "in the
+ infobot's head". You can control the amount of verbage
+ that comes out with the VERBOSITY parameter,
+ of you can dump all the output to the bitbucket and background
+ the process at the same time with
+
+
+
+ nohup infobot > /dev/null &
+
+
+
+
+
the console
+
+ Should you choose to look at the stream if consciousness
+ in the bot, and you haven't reduced the output to nothing
+ or consigned it to the void, you will be presented with
+ the console.
+
+
+ The first thing you should see, assuming all goes well with
+ making a connection, is the motd (message-of-the-day)
+ of the server the bot has been configured to connect to.
+
+ Next, you should see the result of the channel joins specified
+ in the parameter files, and you may see the bot recognizing
+ hostmasks of people in the userfile, if any have been put
+ in there.
+
+ If you have the ansi_control paramter set,
+ and your terminal supports it, the output will be in color.
+
+ NOTE that the 'console' is NOT interactive. You can't
+ type anything into it; it's just for viewing what's going on.
+
+
cronning the infobot
+
+ You can set the infobot to automatically start up using
+ cron. See the included example crontab
+ file, in files/infobot.crontab
+
+
+
+
shutting it down
+
+ If you have set yourself as the bot's master in the user file
+ (infobot.users, unless you changed the default),
+ you can just say or message 'die' to the bot.
+
+ Otherwise, kill the process or hit control-c in the console.
+
+
+
+
+
the FAQ
+ The FAQ is available at
+
+ http://www.cs.cmu.edu/~infobot/faq/. It is growing. Slowly.
+
+
+ infobot@protected.speech.cs.cmu.edu
+
+
+Last modified: Tue Oct 26 14:24:41 EDT 1999
+
+
+
diff --git a/doc/intro.bit b/doc/intro.bit
new file mode 100644
index 0000000..aa6d10a
--- /dev/null
+++ b/doc/intro.bit
@@ -0,0 +1,312 @@
+
+The canonical source for the infobot source and documentation is
+http://www.infobot.org/.
+
+
+The infobot connects to an Internet Relay Chat (IRC) server,
+joins some channels (maybe), and begins accumulating factoids.
+To run one, download the source, uncompress it, untar it,
+edit the config files, and it up.
+
+Interacting with the bot is pretty straightforward. Most of
+the commands and variables available to users are listed below.
+The bot will interact via message or on-channel.
+
+
+
+
Interacting with an infobot
+
+
+
setting factoids: X is Y
+
+ Saying something like "X is Y" somewhere that the infobot
+ can see it will cause the bot to store a factoid, unless
+ X is already defined. It sets the value of X to Y.
+
+
accessing factoids: What is X?
+
+ You can ask an infobot about something in a number of
+ different ways, including "what is X?", "where is X?",
+ or just plain "X?".
+
+
altering factoids: s/A/B/
+
+ if you just want to change a part of a factoid, use
+ the s///operator. you have to address the bot
+ or use a private medium to do this.
+
+ MyBot, X =~ s/A/B/
+
+ will change the first occurence of A to B in the factoid
+ called X.
+
+
+
appending to existing entries: also
+
+ One can extend an existing factoid using the
+ keyword also
+
+
+
+ poink is also a silly word
+
+
+
+
+
erasing a factoid: forget
+
+ A factoid can easily be deleted by using
+
+
+
+ infobot, forget poink
+
+
+
+
+
changing a factoid: no, ...
+
+ You can change the entry for a factoid completely using
+
+
+
+ no, infobot, x is wugga wugga.
+
+
+
+ which deletes the prior entry (if possible)
+ and replaces it with the new one.
+
+
+
having the bot tell someone else something: tell
+
+ A user can ask an infobot to tell someone else something.
+
+
+
+ infobot, tell fimmtiu about no web
+
+
+
+
+
karma / plusplus
+
+ karma for a concept may be incremented or decremeted using
+ ++ and --. You can get the
+ current karma 'score' for something by asking for it.
+
+
+
+ oznoid++
+
+ oznoid--
+
+ karma for oznoid
+
+
+
+
+
status
+
+ infobots reply to status requests.
+
+
+ -> [url] status
+ [url!infobot@ALF5.SPEECH.CS.CMU.EDU] Since Fri Mar 26 06:42:27 1999, there have been 409
+ modifications and 2604 questions. I have been awake for 5 days, 4 hours, 24 minutes,
+ 18 seconds this session, and currently reference 47529 factoids.
+
+
+
+
+
joining an allowed channel: join #infobot
+
+ On IRC, you can tell the infobot to join a channel
+ that it's allowed to join with
+
+
+
+ infobot, join #infobot
+
+
+
+ If it is allowed to (in its paramter settings), it
+ will try to join the channel.
+
+
+
+
leaving a channel: part #infobot
+
+ This causes the bot to leave the given channel
+
+
+
+ infobot, part #infobot
+
+
+
+ leave is a synonym for part.
+
+
+
random responses with |
+
+ You can set a list from which to pick a random response by
+ using |
+
+
+
+ x is a|b|c|d
+
+
+
+ When x is asked about, the infobot will randomly choose from
+ the |-spearated list.
+
+
+
The <reply> factoid tag.
+
+ Normally, when the infobot replies to "What is X", it says
+ "X is Y". This form makes it just reply "Y".
+
+
+
+ X is <reply> Y
+
+
+
+
+
The <action> factoid tag (as of 0.43.5)
+
+ This causes the bot to respond as with except
+ as an ACTION.
+
+
+
+ X is <action> Y
+
+
+
+
+
backwacking
+
+ Use \ to protect items from evaluation.
+
+
+
+ x is y is y
+
+
+
+ will normally set x =is=> y is y, but
+
+
+
+ x \is y is y
+
+
+
+ will set
+
+
+ x is y =is=> y
+
+
+ The forget
+ and no (update) operators apply before checking
+ for this. This is also useful for getting around the
+ dereferencing of "i" and "me" and so on.
+
+
+
the $who variable
+
+ Contains the nickname person currently addressing the bot.
+ It can be used effectively in replies.
+
+
+
+ nice day is <reply> you betcha, $who.
+
+
+
+
+
the $date variable
+
+ Contains the current date and time, at the bot's host.
+
+
+
literal foo
+
+ returns the value without the usual post-processing.
+
+
+
+
Ignoring users: ignore nickname, ignore *.a.com
+
+ Users with the P (oP) flag can tell the bot
+ to ignore people or hostmasks. And 'unignore'.
+ use 'ignorelist' to get the current list of ignored masks,
+ if you have the P flag.
+
+
op on channel
+
+ The 'p' (oP) flag in the userfile allows this
+ to work. You'll need to set a hostmask. See
+ files/infobot.users Also uses a
+ crypted password.
+
+
+
+ /msg <bot> <password> op
+
+
+
+
die
+
+ If the bot owner (+O, Owner) says this or messages it to the bot,
+ it will kill itself.
+
+
+
+
+
scripts/utilities
+
+ The infobot comes with some scripts for working with
+ the DBM files.
+
+
+
+
update_db
+
+ This takes a flat ascii file and inserts it into a DBM file.
+ It creates a new DBM if it didn't exist.
+