[project @ 2005-06-01 11:12:41 by unknown_lamer]
[clinton/bobotpp.git] / bobot++.info
index 73eb09b..364f5c1 100644 (file)
@@ -1,10 +1,10 @@
-This is bobot++.info, produced by makeinfo version 4.1 from
+This is bobot++.info, produced by makeinfo version 4.7 from
 bobot++.texinfo.
 
    This file documents Bobot++ by Clinton Ebadi and Etienne Bernard
 (original author, no longer works on program).
 
-   Copyright 2002 Clinton Ebadi
+   Copyright 2002,2004,2005 Clinton Ebadi
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -18,9 +18,9 @@ File: bobot++.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
    This document describes Bobot++ by Clinton Ebadi and Etienne Bernard
 (original author, no longer works on program).
 
-   This document applies to version 2.1.0 of the program named Bobot++
+   This document applies to version 2.1.5 of the program named Bobot++
 
-   Copyright 2002 Clinton Ebadi
+   Copyright 2002,2004 Clinton Ebadi
 
    Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -32,102 +32,497 @@ Texts.
 
 * Introduction::
 * Configuration::
+* Using the Bot::
 * Scripting::
 * Concept Index::
 * Function Index::
 * Variable Index::
 
+ --- The Detailed Node Listing ---
+
+Configuration
+
+* Configuration Files::
+* Configuration File Placement::
+
+Configuration Files
+
+* bot.conf::
+* bot.users::
+
+bot.conf
+
+* server syntax::
+* channel syntax::
+
+Using Bobot++
+
+* Starting the Bot::
+* User Levels::
+* Protection::
+* Automatic Op::
+* Built-In Commands::
+
+Scripting
+
+* Adding New Commands::
+* Hooks::
+* Scheme User Levels::
+* Sending Messages::
+* Misc Scripting Stuff::
+
+Hooks
+
+* Creating a Hook::
+* Hook Types::
+
+Sending Messages
+
+* High Level Message Functions::
+* Low Level Message Functions::
+
 \1f
 File: bobot++.info,  Node: Introduction,  Next: Configuration,  Prev: Top,  Up: Top
 
-Introduction
-************
+Introduction
+**************
 
-   This manual feels abused and neglected because it has almost no
-content.
+This manual feels abused and neglected because it has almost no content.
 
 \1f
-File: bobot++.info,  Node: Configuration,  Next: Scripting,  Prev: Introduction,  Up: Top
+File: bobot++.info,  Node: Configuration,  Next: Using the Bot,  Prev: Introduction,  Up: Top
 
-Configuration
-*************
+Configuration
+***************
 
-   Bobot++ is easy to configure. The configuration file format may be
-changing in the 2.1 series, so it is not documented for now. See the
-`examples' directory for an example configuration.
+Bobot++ is easy to configure. See the `examples' directory for an
+example configuration.
 
 * Menu:
 
-* Configuration File Syntax::
-* Configure File Placement::
+* Configuration Files::
+* Configuration File Placement::
 
 \1f
-File: bobot++.info,  Node: Configuration File Syntax,  Next: Configure File Placement,  Prev: Configuration,  Up: Configuration
+File: bobot++.info,  Node: Configuration Files,  Next: Configuration File Placement,  Prev: Configuration,  Up: Configuration
 
-Configuration File Syntax
-=========================
+2.1 Configuration Files
+=======================
+
+* Menu:
+
+* bot.conf::
+* bot.users::
+
+\1f
+File: bobot++.info,  Node: bot.conf,  Next: bot.users,  Prev: Configuration Files,  Up: Configuration Files
+
+2.1.1 bot.conf
+--------------
+
+* Menu:
+
+* server syntax::
+* channel syntax::
+
+   `bot.conf' contains key value pairs separated by `='.
+
+   `<key> = <value>'
+
+   Comments are started with a `#' and cause the entire line to be
+ignored. _Note that this only works when the `#' is the first character
+of the line_.
+
+   bot.conf is the main configuration file for a Bobot++. The available
+configuration variables are listed below in the format "VARIABLE
+<default-value>: description"
+
+   * NICKNAME <Bobot>: The nickname of the bot (NICK is an alias for
+     NICKNAME)
+
+   * USERNAME <bobot>: The IRC username of the bot
+
+   * CMDCHAR <!>: The character that prefixes commands given to the bot
+     (COMMAND is an alias for CMDCHAR)
+
+   * IRCNAME <I'm a bobot++!>: The IRC name (or 'real name') of the bot
+     (REALNAME is an alias for IRCNAME)
+
+   * USERLIST <bot.users>: Name of the file where the userlist is stored
+
+   * SHITLIST <bot.shit>: Name of the file where the shitlist is stored
+
+   * LOGFILE <$LOGDIR/bot.log>: Location of the bot logfile (set this
+     to `/dev/null' to disable logging).
+
+   * SERVER <None>: This specifies the server to connect to. Note that
+     this has a special syntax.
 
-   Not here yet.
+   * CHANNEL <None>: This specifies a channel the bot will join when it
+     starts up. This also has a special syntax.
+
+
+\1f
+File: bobot++.info,  Node: server syntax,  Next: channel syntax,  Prev: bot.conf,  Up: bot.conf
+
+2.1.1.1 server syntax
+.....................
+
+SERVER = SERVER_NAME [PORT [PASSWORD]]
+
+   This will make Bobot++ attempt to connect to SERVER_NAME on port
+PORT with the password PASSWORD. SERVER_NAME should be the address of
+the server. PORT and PASSWORD are optional. You may use more than one
+server line; Bobot++ will attempt to connect to the first one and, if
+it fails, will connect to the next one in the list. There is also a
+command to cause the bot to cycle servers. At the present time Bobot++
+cannot connect to more than one server at a time. This is a planned
+feature of 3.0 (which is a very long way away; the current structure of
+the program would make it very difficult to add support for connecting
+to multiple servers at a time in a usable manner).
+
+\1f
+File: bobot++.info,  Node: channel syntax,  Prev: server syntax,  Up: bot.conf
+
+2.1.1.2 channel syntax
+......................
+
+CHANNEL = NAME:INITIAL_MODES:MODES_TO_KEEP:CHANNEL_KEY
+
+   You may have any number of channel lines. When Bobot++ starts it will
+attempt to join and gain ops in every channel listed. It will join NAME
+and set the channel modes to INITIAL_MODES (e.g. "nt") if it is able to
+gain operator status. It will then maintain MODES_TO_KEEP. If the
+channel requires a key to enter simply set CHANNEL_KEY. Every argument
+except for NAME is optional.
+
+   A few example lines:
+
+   `CHANNEL = #foo:nt:nt:bar'
+
+   The bot will join `#foo' with the channel key `bar' and will then
+maintain the modes `nt'.
+
+   `CHANNEL = #bar:::'
+
+   The bot will join `#bar' and will not set any modes nor will it
+attempt to maintain any modes.
 
 \1f
-File: bobot++.info,  Node: Configure File Placement,  Prev: Configuration File Syntax,  Up: Configuration
+File: bobot++.info,  Node: bot.users,  Prev: bot.conf,  Up: Configuration Files
+
+2.1.2 bot.users
+---------------
+
+`bot.users' is the default file name of the userlist. It may be changed
+in `bot.conf'. The file contains lines with the format:
+
+   `MASK:CHANNEL:LEVEL:PROTECTION:AUTO-OP'
+
+   * MASK is the host mask (e.g. `*!*username
+     .domain.com') of the user
+
+   * CHANNEL is a channel mask of the channels that the user has
+     priviliges to use the bot in (e.g. `*' for all channels, `#*' for
+     all non-local channel, `#foo*' for all channels starting with
+     "foo," `#bar' for channel "#bar" only, etc.)
+
+   * LEVEL is the user level of the user (*Note User Levels::).
+
+   * PROTECTION is the protection level of the user (*Note
+     Protection::).
 
-Configuration File Placement
-============================
+   * AUTO-OP is set to control whether a user is automatically given
+     operator priviliges on channel entry (*Note Automatic Op::).
 
-   Bobot++ will look in `/etc/bobotpp/default/' for its default config
-if none is specified on the command line. Put the configuration files
-you want to be loaded by default in this directory. If you are not root
-or you want to have your own personal configration, put it in
+
+\1f
+File: bobot++.info,  Node: Configuration File Placement,  Prev: Configuration Files,  Up: Configuration
+
+2.2 Configuration File Placement
+================================
+
+Bobot++ will look in `/etc/bobotpp/default/' for its default config if
+none is specified on the command line. Put the configuration files you
+want to be loaded by default in this directory. If you are not root or
+you want to have your own personal configuration, put it in
 `~/.bobotpp/config/default/'.
 
 \1f
-File: bobot++.info,  Node: Scripting,  Next: Concept Index,  Prev: Configuration,  Up: Top
+File: bobot++.info,  Node: Using the Bot,  Next: Scripting,  Prev: Configuration,  Up: Top
+
+3 Using Bobot++
+***************
+
+FIXME: stuff here...
+
+* Menu:
+
+* Starting the Bot::
+* User Levels::
+* Protection::
+* Automatic Op::
+* Built-In Commands::
+
+\1f
+File: bobot++.info,  Node: Starting the Bot,  Next: User Levels,  Prev: Using the Bot,  Up: Using the Bot
+
+3.1 Starting the Bot
+====================
+
+The bot is usually installed with the binary name `bobotpp'. It accepts
+the following command line arguments:
+
+   * `[--help][-h]' - Shows detailed help and exits
+
+   * `[--version][-v]' - Shows version information and exits
+
+   * `[--no-background][-b]' - Run bobot++ in the foreground
+
+   * `[--config-file file][-f]' - Use file instead of `bot.conf'
+
+   * `[--config-dir dir][-d]' - Use dir as dir to load config file from
+
+   * `[--config dir][-c]' - Search your config path (defaults to
+     `$HOME/.bobotpp/config/' and then `/etc/bobotpp/') for dir and
+     then loads your config data using dir
+
+   * `[--sys-config dir][-s]' - Looks for config in `/etc/bobotpp/dir'.
+     Note that the user dir is still searched first
+
+   * `[--user-config dir][-u]' - Looks for config in
+     `$HOME/.bobotpp/config/dir/'. Note that the system dir is still
+     searched after this if dir is not found.
+
+   * `[--debug][-D]' Makes Bobot++ print debugging info and run in the
+     foreground
 
-Scripting
-*********
 
-   Bobot++'s most powerful feature is its scripting system. You write
+   The default configuration is read from
+`$HOME/.bobotpp/config/default/' and then `/etc/bobotpp/default/' if
+the user config is not found.
+
+   The bot defaults to running in the background as a daemon.
+
+\1f
+File: bobot++.info,  Node: User Levels,  Next: Protection,  Prev: Starting the Bot,  Up: Using the Bot
+
+3.2 User Levels
+===============
+
+There are several user levels available in Bobot++ to provide gradated
+access to commands. `!adduser' and `bot.users' use the numeric code;
+Scheme uses the textual name for the level. By default (if no catch-all
+setting is found in *Note bot.users::.) a user is not even a
+`bot:user-none' and cannot execute *any* commands, even commands
+available to `bot:user-none'.
+
+  0. `bot:user-none' - No *built-in* commands may be executed _by
+     default_ (commands may be added from Scheme that can be executed
+     by users of level none and the level required to execute a command
+     may be changed from Scheme).
+
+  1. `bot:user-user' - Will be able to execute most commands but not
+     all and cannot use masks on kicks and bans.
+
+  2. `bot:user-trusted' - For built-ins with a default configuration
+     this user has access to the same set of commands as an `user' but
+     may use masks on kicks and bans. Scheme commands may be added
+     which require a user to be of this level.
+
+  3. `bot:user-friend' - In the default configuration a user who is a
+     friend will be able to do everything short of stopping the bot.
+     Again, there may be user added commands that require a higher user
+     level.
+
+  4. `bot:user-master' - This is the highest user level and has access
+     to every feature of the bot.
+
+
+\1f
+File: bobot++.info,  Node: Protection,  Next: Automatic Op,  Prev: User Levels,  Up: Using the Bot
+
+3.3 Protection
+==============
+
+A user added via Scheme, the `bot.users' file, or `!adduser' may be
+protected from being deoped, kicked, or banned. There are currently no
+symbolic levels in Scheme; just use the numeric code.
+
+  0. No protection
+
+  1. No ban. If a user is banned the bot will unban him..
+
+  2. No kick. The user may still be kicked but the bot will kickban the
+     user who kicked the protected user.
+
+  3. No deop. The bot will ensure that the user always maintains
+     operator status.
+
+
+\1f
+File: bobot++.info,  Node: Automatic Op,  Next: Built-In Commands,  Prev: Protection,  Up: Using the Bot
+
+3.4 Automatic Op
+================
+
+A user may be automatically given operator status upon entering a
+channel. Set the AOP field to "0" to disable auto-op or "1" to enable
+auto-op.
+
+\1f
+File: bobot++.info,  Node: Built-In Commands,  Prev: Automatic Op,  Up: Using the Bot
+
+3.5 Built-In Commands
+=====================
+
+Bobot++ has many built-in commands that make it useful without
+scripting support. The reference leaves off the command char; remember
+to use whatever you defined the command char to be in `bot.conf'. If a
+command needs the channel name then you must specify the channel as the
+first argument to the command when private messaging the bot a command.
+
+COMMAND            NEEDS CHANNEL      MIN LEVEL TO USE   DESCRIPTION
+`action' `do'      Yes                USER                Causes the bot
+                                                         to perform the
+                                                         action `do' in
+                                                         the current
+                                                         channel.
+`adduser'                                                
+`addserver'                                              
+`addshit'                                                
+`alias'                                                  
+`ban'                                                    
+`banlist'                                                
+`channels'                                               
+`cycle'                                                  
+`dcclist'                                                
+`deban'                                                  
+`delserver'                                              
+`deluser'                                                
+`delshit'                                                
+`deop'                                                   
+`die'                                                    
+`do'                                                     
+`execute'                                                *Only available
+                                                         if scripting
+                                                         support is
+                                                         enabled*
+`help'                                                   
+`ident'                                                  
+`invite'                                                 
+`join'                                                   
+`keep'                                                   
+`kick'                                                   
+`kickban'                                                
+`load'                                                   
+`loadscript'                                             *Only available
+                                                         if scripting
+                                                         support is
+                                                         enabled*
+`lock'                                                   
+`mode'                                                   
+`msg'                                                    
+`names'                                                  
+`nextserver'                                             
+`nick'                                                   
+`nslookup'                                               
+`op'                                                     
+`part'                                                   
+`password'                                               
+`reconnect'                                              
+`rspymessage'                                            
+`save'                                                   
+`say'                                                    
+`server'                                                 
+`serverlist'                                             
+`setfloodrate'                                           
+`setversion'                                             
+`shitlist'                                               
+`spylist'                                                
+`spymessage'                                             
+`stats'                                                  
+`tban'                                                   
+`tkban'                                                  
+`topic'                                                  
+`unlock'                                                 
+`userlist'                                               
+`who'                                                    
+`whois'                                                  
+
+\1f
+File: bobot++.info,  Node: Scripting,  Next: Concept Index,  Prev: Using the Bot,  Up: Top
+
+4 Scripting
+***********
+
+Bobot++'s most powerful feature is its scripting system. You write
 scripts using Guile Scheme. This manual does not cover how to use Guile
 or how to learn Scheme. *Note Guile Reference Manual: (guile)Top, for
 the Guile reference manual and
-<http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html> for a
+`http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html' for a
 good tutorial on Scheme.
 
    Note that in previous versions the scripting commands where in the
 form `bot-FUNCTION'. They are now in the form `bot:FUNCTION'. The old
 names are still available, but are deprecated and will be removed in
-Bobot++ 2.4. The command `perl -pi -e ``s/bot-/bot:/g'' YOUR-FILES'
-should be enough to convert your code to use the new functions.
+Bobot++ 3.0. New commands are only available with the `bot:' prefix.
+The command `perl -pi -e ``s/bot-/bot:/g'' YOUR-FILES' should be enough
+to convert your code to use the new functions.
 
 * Menu:
 
 * Adding New Commands::
 * Hooks::
+* Scheme User Levels::
+* Sending Messages::
+* Misc Scripting Stuff::
 
 \1f
 File: bobot++.info,  Node: Adding New Commands,  Next: Hooks,  Prev: Scripting,  Up: Scripting
 
-Adding New Commands
-===================
+4.1 Adding New Commands
+=======================
 
-   Not here yet.
+Adding a new command is simple. To register a new command use
+`bot:addcommand'. The prototype for `bot:addcommand' is
+`(bot:addcommand name func needs-channel? num-of-args min-level)'. The
+`name' is a string representing the name of the command being added.
+`func' is a function accepting `num-of-args' arguments.
+`needs-channel?' is a bool that is true if the function needs the
+channel name as its first arg, and false otherwise. `num-of-args' is
+the number of args `func' will take and must be within zero (0) and
+twenty (20). `min-level' is one of the *Note Scheme User Levels::. A
+user must be at least a `min-level' user to use the new command. None
+of the arguments are guaranteed to be passed; if they aren't they are
+set to the empty string `""'. An example of a new command would be:
 
-\1f
-File: bobot++.info,  Node: Hooks,  Prev: Adding New Commands,  Up: Scripting
+     (define (hello channel name)
+       (if (string=? name "")
+         (bot:say channel "Hello world!")
+         (bot:say channel (string-append "Hello " name "!")))
 
-Hooks
-=====
-
-   Hooks are a powerful feature of Bobot++. Hooks are a hybrid of ircII
-hooks and tiny fugue (a MUD bot) hooks. The basic idea of a hook if
-that you match a text against regular expression and call a function if
-text in a message matches that regex. The different types of hooks
-provided by Bobot++ correspond to the different classes of messages
-that Bobot++ can recieve. A Hook also has several properties, including
-its priority and whether or not it is a fallthrough hook. Higher
-priority hooks are executed before lower priority hooks and fallthrough
-hooks are executed before non-fallthrough hooks. A fallthrough hook can
+     (bot:addcommand "hello" hello #t 2 0)
+
+   This will display "Hello World!" if called as `!hello' and "Hello
+World `USER'" if called as `!hello USER'.
+
+\1f
+File: bobot++.info,  Node: Hooks,  Next: Scheme User Levels,  Prev: Adding New Commands,  Up: Scripting
+
+4.2 Hooks
+=========
+
+Hooks are a powerful feature of Bobot++. Hooks are a hybrid of ircII
+and tiny fugue (a MUD bot) hooks with a little bit of extra stuff added
+in. The basic idea of a hook if that you match a text against regular
+expression and call a function if text in a message matches that regex.
+The different types of hooks provided by Bobot++ correspond to the
+different classes of messages that Bobot++ can recieve. A Hook also has
+several properties, including its priority and whether or not it is a
+fallthrough hook. Higher priority hooks are executed before lower
+priority hooks and fallthrough hooks are executed before
+non-fallthrough hooks of the same priority. A fallthrough hook can
 match and processing of hooks will continue; as soon as the first
 non-fallthrough hooks matches processing of hooks stops.
 
@@ -139,49 +534,62 @@ non-fallthrough hooks matches processing of hooks stops.
 \1f
 File: bobot++.info,  Node: Creating a Hook,  Next: Hook Types,  Prev: Hooks,  Up: Hooks
 
-Creating a Hook
----------------
+4.2.1 Creating a Hook
+---------------------
 
-   To add a new hook you use the function `bot:addhook'. `bot:addhook'
-is prototyped as `(bot:addhook type regex function pri fall)'. `type'
+To add a new hook you use the function `bot:addhook'. `bot:addhook' is
+prototyped as `(bot:addhook type regex function pri fall name)'. `type'
 specifies the type of hook (the types of hooks are listed in *Note Hook
 Types::). `regex' is a standard regular expression. If `regex' is
 matched, `function' will be called. `function' will take a different
 number of args depending on the hook type. `pri' specifies the priority
-of the hook-higher priority hooks are executed first. This argument is
+of the hook--higher priority hooks are executed first. This argument is
 optional and defaults to `0'. `fall' is `#t' if the hook is a
 fallthrough hook and `#f' is the hook is not a fallthrough hook. This
-arg is also optional and default to `#t'.
+arg is also optional and default to `#t'. `name' is the optional name
+of the hook that defaults to "DEFAULT". If you set the name then you
+can have more than one hook that matches the same regexp, as long as
+they have the same name. E.g. in a log script you could have the
+regexps for the log function all be `".*"' and set their names to
+`"log"' to avoid a conflict with other hooks.
 
 \1f
 File: bobot++.info,  Node: Hook Types,  Prev: Creating a Hook,  Up: Hooks
 
-Hook Types
-----------
+4.2.2 Hook Types
+----------------
 
-   Here is a list of the various hooks are notes on each one. The
-general format of a hook is:
+Here is a list of the various hooks are notes on each one. The general
+format of a hook is:
 
    * `hooks/name' (this is the Scheme variable name of the hook)
         - Description of the hook
 
-        - # of args
-             - `arg1': desc
+        - ARG1 ARG2 ... ARGN
+             - ARG1: desc
 
-             - `arg2': desc
+             - ARG2: desc
 
              - ...
 
-             - `argN': desc
+             - ARGN: desc
 
-   That said, here is the list of available hooks:
+   That said, here is the list of available hooks: FIXME: write docs
 
    * `hooks/action'
-        - Description of the hook
+        - This hook is triggered when someone performs an action.
 
-        - # of args
-             - `arg1': desc
+        - FROM, TO, ACTION
+             - FROM: this is the address of the person that performed
+               the action in the form `NICK ! USER @ HOST' (without the
+               spaces).
+
+             - TO: This is the target of the action, which is either a
+               channel or the Bot's nick.
 
+             - ACTION: This is the text of the action. E.g. if someone
+               did `* foobar does baz', then ACTION would be the string
+               `"does baz"'.
 
    * `hooks/nickname'
         - Description of the hook
@@ -189,125 +597,205 @@ general format of a hook is:
         - # of args
              - `arg1': desc
 
-
    * `hooks/signoff'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/ctcp'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/ctcp-reply'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/disconnect'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/flood'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/invite'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/join'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/kick'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/part'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/mode'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/message'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/notice'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/public'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/public-notice'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/raw'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/timer'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
-
    * `hooks/topic'
         - Description of the hook
 
         - # of args
              - `arg1': desc
 
+   * `hooks/dcc/begin'
+        - This hook is triggered when a user begins a DCC CHAT with the
+          bot.
+
+        - FROM
+             - FROM: This is the user's address in the form
+               `nick!user@host'.
+
+   * `hooks/dcc/message'
+        - This hook is triggered when a user sends a message to the bot
+          through a DCC CHAT
+
+        - FROM MESSAGE
+             - FROM: This is the user's address in the form
+               `nick!user@host'.
+
+             - MESSAGE: This is the message the user sent to the bot.
+
+\1f
+File: bobot++.info,  Node: Scheme User Levels,  Next: Sending Messages,  Prev: Hooks,  Up: Scripting
+
+4.3 Scheme User Levels
+======================
+
+There are five levels that a user may be when interfacing with a bot:
+NONE, USER, TRUSTED_USER, FRIEND, MASTER. The Scheme variables for the
+user levels are `bot:user-none', `bot:user-user', `bot:user-trusted',
+`bot:user-friend', and `bot:user-master'. See *Note User Levels:: for
+more information on User Levels.
+
+   When adding a new command, think about who should be able to use it.
+Is your command a general purpose command that helps the channel (e.g.
+`!seen') that everyone should be able to use? Or is it something that
+should be restricted? See *Note User Levels:: for information on what
+level users can do what with the built in bot commands and think about
+what level a user your command is targetted towards. You must be _very_
+careful when giving new commands to lower level users because you can
+do basically everything the bot can do with a script. As the scripting
+interface becomes more powerful, you must think more about what users
+can use new commands you add.
+
+\1f
+File: bobot++.info,  Node: Sending Messages,  Next: Misc Scripting Stuff,  Prev: Scheme User Levels,  Up: Scripting
+
+4.4 Sending Messages
+====================
+
+There are several types of messages you can send with Bobot++ from
+scripts. There is the simple, but rather limited, `bot:say',
+`bot:action' and `bot:msg', and the more powerful, but lower level,
+`bot:send-MESSAGE' functions. Most bots will probably only need the
+higher level functions, but for the sake of why-not Bobot++ lets you
+use the lower level functions (in progress).
+
+* Menu:
+
+* High Level Message Functions::
+* Low Level Message Functions::
+
+\1f
+File: bobot++.info,  Node: High Level Message Functions,  Next: Low Level Message Functions,  Prev: Sending Messages,  Up: Sending Messages
+
+4.4.1 "High Level" Message Functions
+------------------------------------
+
+...
+
+\1f
+File: bobot++.info,  Node: Low Level Message Functions,  Prev: High Level Message Functions,  Up: Sending Messages
+
+4.4.2 "Low Level" Message Functions
+-----------------------------------
+
+The "Low Level" messaging functions allow you to do things like send
+CTCP messages. You probably want to read rfc 2812 and the CTCP spec
+before using these. If you have no idea what these do, read rfc 2812
+(IRC Client Protocol) and CTCP spec. These functions all return
+`*unspecified*' always, so don't use the return value for anything.
+
+   * `bot:send-CTCP to command message' `to' is the target of your CTCP
+     message, `command' is the CTCP command, and `message' is the
+     message (or arguments) of the command. Make sure to
+     `bot:ctcp-quote' the message!
+
+
+\1f
+File: bobot++.info,  Node: Misc Scripting Stuff,  Prev: Sending Messages,  Up: Scripting
+
+4.5 Misc. Scripting Stuff
+=========================
+
+These are a few useful things that I thought people writing scripts
+might want to know.
+
+   If you want to execute code when the bot exits, just do `add-hook!
+bot:exit-hook THUNK' where THUNK is an argumentless procedure (a
+thunk). When the bot exits your thunk will be called.
 
 \1f
 File: bobot++.info,  Node: Concept Index,  Next: Function Index,  Prev: Scripting,  Up: Top
@@ -315,36 +803,91 @@ File: bobot++.info,  Node: Concept Index,  Next: Function Index,  Prev: Scriptin
 Concept Index
 *************
 
+\0\b[index\0\b]
 * Menu:
+
+* Background on Hooks:                   Hooks.                 (line 6)
+
 \1f
 File: bobot++.info,  Node: Function Index,  Next: Variable Index,  Prev: Concept Index,  Up: Top
 
 Function Index
 **************
 
+\0\b[index\0\b]
 * Menu:
+
+* addcommand:                            Adding New Commands.   (line 6)
+* addhook:                               Creating a Hook.       (line 6)
+
 \1f
 File: bobot++.info,  Node: Variable Index,  Prev: Function Index,  Up: Top
 
 Variable Index
 **************
 
+\0\b[index\0\b]
 * Menu:
 
+* exit-hook:                             Misc Scripting Stuff.
+                                                              (line   9)
+* hooks/action:                          Hook Types.          (line  23)
+* hooks/ctcp:                            Hook Types.          (line  50)
+* hooks/ctcp-reply:                      Hook Types.          (line  56)
+* hooks/dcc/begin:                       Hook Types.          (line 146)
+* hooks/dcc/message:                     Hook Types.          (line 154)
+* hooks/disconnect:                      Hook Types.          (line  62)
+* hooks/flood:                           Hook Types.          (line  68)
+* hooks/invite:                          Hook Types.          (line  74)
+* hooks/join:                            Hook Types.          (line  80)
+* hooks/kick:                            Hook Types.          (line  86)
+* hooks/message:                         Hook Types.          (line 104)
+* hooks/mode:                            Hook Types.          (line  98)
+* hooks/nickname:                        Hook Types.          (line  38)
+* hooks/notice:                          Hook Types.          (line 110)
+* hooks/part:                            Hook Types.          (line  92)
+* hooks/public:                          Hook Types.          (line 116)
+* hooks/public-notice:                   Hook Types.          (line 122)
+* hooks/raw:                             Hook Types.          (line 128)
+* hooks/signoff:                         Hook Types.          (line  44)
+* hooks/timer:                           Hook Types.          (line 134)
+* hooks/topic:                           Hook Types.          (line 140)
+* user-friend:                           Scheme User Levels.  (line   6)
+* user-master:                           Scheme User Levels.  (line   6)
+* user-none:                             Scheme User Levels.  (line   6)
+* user-trusted:                          Scheme User Levels.  (line   6)
+* user-user:                             Scheme User Levels.  (line   6)
+
+
 \1f
 Tag Table:
-Node: Top\7f517
-Node: Introduction\7f1228
-Node: Configuration\7f1419
-Node: Configuration File Syntax\7f1801
-Node: Configure File Placement\7f2003
-Node: Scripting\7f2477
-Node: Adding New Commands\7f3316
-Node: Hooks\7f3473
-Node: Creating a Hook\7f4363
-Node: Hook Types\7f5153
-Node: Concept Index\7f7626
-Node: Function Index\7f7758
-Node: Variable Index\7f7897
+Node: Top\7f527
+Node: Introduction\7f1816
+Node: Configuration\7f2008
+Node: Configuration Files\7f2295
+Node: bot.conf\7f2510
+Node: server syntax\7f3948
+Node: channel syntax\7f4812
+Node: bot.users\7f5655
+Node: Configuration File Placement\7f6558
+Node: Using the Bot\7f7036
+Node: Starting the Bot\7f7286
+Node: User Levels\7f8630
+Node: Protection\7f10086
+Node: Automatic Op\7f10695
+Node: Built-In Commands\7f10984
+Node: Scripting\7f15518
+Node: Adding New Commands\7f16483
+Node: Hooks\7f17750
+Node: Creating a Hook\7f18729
+Node: Hook Types\7f19877
+Node: Scheme User Levels\7f23360
+Node: Sending Messages\7f24494
+Node: High Level Message Functions\7f25110
+Node: Low Level Message Functions\7f25333
+Node: Misc Scripting Stuff\7f26095
+Node: Concept Index\7f26519
+Node: Function Index\7f26738
+Node: Variable Index\7f27037
 \1f
 End Tag Table