. ______)\ __ /\ ________/(____ /______ \ / \/__\ // / \\ / _/ \\/ \\ \// |___// | / // \ \\ \ \\ | \ ___/_ /_____/ \\ ___/___/________\_______\ :::: /________\ ::::: [alice.tcl] :::::: alice.tcl v1.4.0 - by strikelight ([sL] @ EFNet) (March 2, 2004) =-=-=-=-= Contents: =-=-=-=-= 1....contact.................contact information 2....description.............about alice.tcl 3....requirements............minimum eggdrop requirements 4....installation............how to install the script 5....usage...................how to use the script 6....history.................changes made to script 7....variable settings.......variable configuration descriptions 8....faq.....................frequently asked questions 9....greetings...............greetings and salutations =-=-=-=-=-= 1. Contact: =-=-=-=-=-= - E-Mail: strikelight@<no_spamorama>tclscript.com - WWW : http://www.TCLScript.com - IRC : #Scripting @ EFNet Note: DO NOT CONTACT ME IF YOU HAVE NOT READ THE ENTIRE CONTENTS OF THIS README FILE. ANY MAILS THAT ARE ANSWERED IN THIS FILE WILL BE IGNORED. BE WARNED. I DO NOT HAVE TOLERANCE FOR THE LAZY. =-=-=-=-=-=-=-= 2. Description: =-=-=-=-=-=-=-= This is a TCL to turn your bot into an artificially intelligent chatterbot. This is done via communication with a web engine (which does all of the real work) which is located at http://www.alicebot.org (not just alicebot.org anymore, since 1.1.0, other alice-engines are now used as well, depending on user's choice.) Since v1.2.0, the user may choose to use the console line program instead of the web interfacing (which can be obtained from http://hippie.sf.net). On a side note, the communication with web engines can be thought of as using your eggdrop bot as a web browser, it is no different then if one was actually at the webpage with IE, Netscape, or such. There is simply a bit more interpretation done by this script to make the content actually viewable for the medium (IRC) it is being used on. =-=-=-=--=-=-=-= 3. Requirements: =-=-=-=--=-=-=-= 1) Eggdrop1.1.5-Eggdrop1.6.x 2) egghttp.tcl v1.0.3 or higher (TO BE LOADED BEFORE THIS SCRIPT!!) -OR- bgexec.tcl v1.1 or higher if using Hippie command line interface =-=-=-=--=-=-=-= 4. Installation: =-=-=-=--=-=-=-= Place script in your scripts directory Edit the Configuration options at the top of the script Add the line: source scripts/alice.tcl to your eggdrop config (See Note) Note: !! _AFTER_ THE LINE THAT LOADS EGGHTTP.TCL or BGEXEC.TCL !! Done. =-=-=-=-= 5. Usage: =-=-=-=-= 1) Message the bot and start conversing with it ..or.. 2) Say the bot's name in a (defined) channel along with some text and converse away from there 3) Depending on configuration, bot's name may or may not be required at all times to get a response from it in channel. 4) To have the bot stop talking to you in channel, tell it to "be quiet", or "shut up", or something along those lines. (seriously) =-=-=-=-=-= 6. History: =-=-=-=-=-= (3/2/04)/v1.4.0 - Fixed a bug with timer calls - Fixed communication with all of the pre-programmed alice_engines - Added alice_ignoreprivate variable to stop the bot from responding to messages that start with words defined in this variable - Added alice_ignorepublic variable to stop the bot from responding to channel text that start with words defined in this variable - Added runabot.com as an alice_engine, which uses AOL Instant messanger AI Bots - Added variable alice_relaypriv, which will display to the partyline what the bot is saying to a user in private chat - Other small fixes (6/1/03)/v1.3.0 - Fixed communication with alice_engine's 0,3,4 - Added pandorabot's engine, which users can use to setup and configure their own server engine (www.pandorabots.com -> MUST use the included template html file though!) - Added dcc command '.flushcookies' to expunge engine cookies for all stored users. (10/14/02)/v1.2.3 - Fixed communication with alice_engine #4 again (hippie.sourceforge.net). (Added option to manually set url variable for this engine if url changes) - Added info about using Hippie command line interface to the FAQ section of this file (Thanks to Spider) (10/7/02)/v1.2.2 - Fixed communication with alice_engine #4 (now: lol.afraid.org) - Moved engine #'s around a bit to facilitate an addition - Added option to have bot communicate with your own Hippie CGI interface (9/20/02)/v1.2.1 - Fixed communication with alice_engine #4 (neodave.civ.pl) - Fixed problem with talking to bots with special characters in their nicks in channels (9/16/02)/v1.2.0 - The Hippie (Program-C) Alice project has been brought up to AIML 1.x specification, so this script now allows you to use the hippie command line interpretter instead of having to communicate over the web if you don't wish to, you can grab Hippie from http://hippie.sourceforge.net New variables related to usage of hippie command line executable: alice_hippie_path , alice_hippie_inipath , alice_hippie_logpath There is an irc_alice.tcl that can be used with Hippie, but it lacks the features that this alice.tcl provides. Note: Usage of Hippie command line executable means that alice.tcl does NOT require egghttp.tcl, however, bgexec.tcl IS needed to communicate with the program in non-blocking mode. This can be obtained from the same location as egghttp.tcl: www.TCLScript.com - Added new channel flag for eggdrop versions 1.5.x and higher: +/-alice, which means the bot will respond to people who mention its name in +alice channels (.chanset #channel +alice or .chanset #channel -alice to turn off) - Added logging of conversations with bot: New variables: alice_logging , alice_log_path - Added neodave.civ.pl (Hippie) alice engine server - Added a program E (Phillip) alice engine server - Removed the harvard sofia alice engine - Fixed communication with server 0 (alicebot.org) (7/24/02)/v1.1.4 - Changed egghttp version requirement to v1.0.3 as there was a problem if you specified your own programD server and were using a TCL version higher than 8.0 - Updated FAQ a bit (7/7/02)/v1.1.3 - Fixed output replies from the Jaczone engine (7/1/02)/v1.1.2 - Strip mIRC codes before sending text to server (Thanks to Wcc for the short regsub line to do so) (6/27/02)/v1.1.1 - Alice-Engine #0 (alicebot.org) should work again (until they change something else anyways...) - Added a small bit of text to the FAQ (6/18/02)/v1.1.0 - New features.. skipped releasing 1.0.4 to public - Can now choose which site to use as its alice-engine - Two new variable settings: 1) alice_respondwithnick -> whether or not to always respond with a user's nick 2) alice_respondrequirenick -> whether or not bot's nick is always required to be said for it to respond to a user. - Bit more documentation included now (FAQ) (6/14/02)/v1.0.4 - Ok, I lied, no new features this version... - Let's ignore msg commands (ie. passwords) - Bug fix.. rogue 'return' statement outside of proc (6/13/02)/v1.0.3 - Fixed up strip_html procedure (Next release should include new features) (5/22/02)/v1.0.2 - Fixed problem with & html code - Fixed a caching cookie problem (5/14/02)/v1.0.1 - Fixed typo for required egghttp.tcl version (1.0.0) - Let's not let the bot have a conversation with itself or other bots for that matter - Update a user's cookies timestamp so they won't be expired for not being used (5/13/02)/v1.0.0 - Initial Release =-=-=-=-=-=-=-=-=-=-= 7. Variable Settings: =-=-=-=-=-=-=-=-=-=-= alice_cookiesfile - File to save alice-engine web cookies to alice_cookiesexpire - Define the number of days of inactivity at which cookies will expire alice_respondpriv - Allows or disallows your bot from responding to private messages (0 = No, 1 = Yes) alice_respondchan - Allows or disallows your bot from responding to public channel messages when its nick is mentioned (0 = No, 1 = Yes) alice_respondrequirenick - If alice_respondchan is set to 1, this will require (or not require) that the bot's nick be mentioned in all lines of a conversation by a user after the initial conversation engagement. (0 = No, 1 = Yes) alice_respondwithnick - If alice_respondchan is set to 1, to prevent confusion, you may turn this feature on, to have the bot respond with the user's nick that it is speaking to. (0 = No, 1 = Yes) alice_channels - If alice_respondchan is set to 1, define the channels that the bot will engage conversations in. Separate multiple channels with a space, or use "*" for all channels. alice_timeoutchat - If alice_respondchan is set to 1, define the number of minutes that the bot will wait for user's text in a channel after the first contact has been made, before giving up on the conversation. alice_logging - If alice_logging is set to 1, logs will be kept of conversations with your bot in a location you specify in the next variable setting. alice_log_path - If alice_logging is set to 1, set this variable to the location of where you want to store the log files. Note: The path must already exist. Also, you must place the trailing / at the end. alice_engine - Define the engine to use to power the bot's responses This list is: 0 = www.alicebot.org (Alice) 1 = www.agentruby.com (Ruby) 2 = www.tfxsoft.com (A program-E server) 3 = www.jaczone.com (Cyber-Ivar) 4 = your own Aine CGI server 5 = Your own program-D Alice Server 6 = Your own program-C CGI (Hippie CGI) Alice Server 7 = Your own actual Hippie program-C Alice command line interface 8 = Your own engine hosted at www.pandorabots.com 9 = A runabot.com AOL Instant Messenger bot web interface (www.runabot.com) For #4, you may download the software for such a server from http://www.bitesizeinc.net/index.php/ainebot.html As for setting up the cgi script, I leave that to you and the docs that come with the software you download. I did NOT write it, so do NOT contact me for help with it. For #5, you may download the software for such a server from http://www.alicebot.org, and while it does provide an IRC client as well as the web server, the IRC client lacks many features of a typical eggdrop, thus not making it very useful. As for setting up the server if you choose #5, I leave that to you and the docs that come with the software you download. I did NOT write it, so do NOT contact me for help with that. For #6 and #7, you may download the software for the hippie command line engine from http://hippie.sourceforge.net, and while it may or may not come with a file called irc_alice.tcl to use with eggdrop, it lacks the features that this script provides. As for installing the software, read the documentation that comes with Hippie. If you still have problems setting Hippie up, do NOT contact me, as I did not write the Hippie software. For #8, you may sign up for a free account to host your engine at http://www.pandorabots.com. However, to allow it to work with this script, you will have to configure your engine there to use the included alice.html file that came with this alice.tcl distribution. I leave it up to you to figure out how to do this. (It's not that hard, just read the configuration pages). For #9, you may sign up and download their software so that alice.tcl can communicate with your AI AOL bot through the web. You will then need to provide the url to the alice_url variable by first looking at the html source for your bot's html chat page http://www.runabot.com/cgi-bin/webcom/caim?botname=(your bot) and finding a url that starts with: http://www.runabot.com/perl/webcaim/(numbers here) You must then add on to the end of that the following: &botname=(your bot) alice_url - If you choose #4, #5, #6, #8, or #9 for the alice_engine, then enter the url to where you set it up, for this variable. alice_hippie_path - If you choose #7 for the alice_engine, then enter the path on your shell to where you have installed the Hippie command line program. alice_hippie_inipath - If you choose #7 for the alice_engine, then enter the path on your shell to where the alice.ini file is located after you have installed Hippie. alice_hippie_logpath - If you choose #7 for the alice_engine, then enter the path on your shell to the location where the Hippie engine stores data on users it converses with. Note: You must enter the trailing / at the end. alice_ignoreprivate - Have the bot ignore private messages that start with the words defined in this variable alice_ignorepublic - Have the bot ignore public chat that starts with the words defined in this variable alice_relaypriv - Relay the responses the bot sends to a user in private messages to the partyline =-=-=-= 8. FAQ: =-=-=-= 1) Q: Where can I download egghttp.tcl or bgexec.tcl? A: http://www.TCLScript.com -- in the projects section 2) Q: Why don't I get any response from my bot when I message it? A: 1) You didn't load egghttp.tcl BEFORE loading alice.tcl in your eggdrop config file 2) The alice-engine you are using may be down. Try choosing another engine to power your bot's responses. (variable setting: alice_engine) 3) The box your bot is on may be behind a firewall or router In which case, you might not be able to use alice.tcl with your bot, sorry. If the box your bot is running on is behind a firewall/router, DO NOT ASK ME FOR HELP WITH IT! 3) Q: Why do I keep getting 'I am restarting. Just a minute' as a response? A: Problems with the website that powers the script. This is beyond my control, so deal with it. 4) Q: How do I set up my own alice-engine web server? A: Go to http://www.alicebot.org and read everything there and download the software from there as well. Beyond that, I can not help you. Look at the contact information in the software you download from there if you need assistance. Do NOT email -me- asking to help you set it up. 5) Q: I'm having problems using alice.tcl with the hippie command line interface, any suggestions? A: Apparently, hippie will crash if the executable,logs,data files are not relative to the eggdrop path itself, so try putting (or installing) the hippie files in the eggdrop directory. 6) Q: I'm using engine #4 (hippie.sourceforge.net) and it doesn't seem to be working? A: Try visitting http://hippie.sourceforge.net and find the link to the hippie web interface, and try setting the alice_url variable to this in the configuration section of the script. If there is still a problem, you will have to wait for an updated release of alice.tcl. 7) Q: I can message my bot and it will respond, but when I try to talk to it in a channel, it doesn't respond. A: You did NOT read what the comments above the settings stated They stated: "If using eggdrop1.5.x or higher, then use .chanset #channel +alice , do NOT set the channels in this variable". Enough said. 8) Q: I've switched engines, and now the bot won't respond, what should I do? A: First, try using the partyline command: .flushcookies to clear out all stored cookies for users associated with the old engine. If that doesn't work, then the engine you have switched to probably isn't working, in which case, change to another engine. 9) Q: I think I have found a bug that isn't addressed here, what should I do? A: First, check the website (www.TCLScript.com) for the latest version, and also check the news box on the main page. If the problem still persists and you are positive it isn't addressed in any of the formentioned locations, then you may e-mail me. =-=-=-=-=-=-= 9. Greetings: =-=-=-=-=-=-= - Alybe, Auriga, BarkerJr, guppy, hellios, jam, MC_8, mikee, MORA, Mosher, oiad, Pixelz, PPSlim, prefect, raeky, simon, Tala, user, Wcc WARNING: Again, DO NOT EMAIL ME IF YOU HAVE NOT READ THE ENTIRE README FILE. ANY QUESTIONS ASKED THAT ARE ANSWERED ABOVE WILL BE IGNORED. I HAVE NO TOLERANCE FOR THE LAZY. ENJOY.