[project @ 2005-06-23 06:20:44 by unknown_lamer]
authorunknown_lamer <unknown>
Thu, 23 Jun 2005 06:20:44 +0000 (06:20 +0000)
committerunknown_lamer <unknown>
Thu, 23 Jun 2005 06:20:44 +0000 (06:20 +0000)
Added dsmith's documentation patch. I'll hack on more documentation
soon, I promise :-)

ChangeLog
TODO
bobot++.info
bobot++.texinfo
scripts/eval
source/Interp.C
source/Parser.C

index 1f0b1e7..786c239 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-06-23  Clinton Ebadi  <clinton@unknownlamer.org>
+
+       * bobot++.texinfo: Applied documentation patch from Dale P. Smith
+
 2005-06-06  Clinton Ebadi  <clinton@unknownlamer.org>
 
        * bobot++.texinfo: Change @vskip 0 to @vskip 0pt to make this work
diff --git a/TODO b/TODO
index 51e93b6..3842b65 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,6 +9,9 @@ Done:
 
 2.2:
 * Finish Texinfo manual
+* Register a lazy catch handler (in Interp::Startup) that prints more
+   debug info to the log (filename, line number, column number,
+   etc.). Check the mod_guile source for the lazy catch handler in it.
 * Utils::valid_nickname_p should have a configurable max nick length
    (now that most networks allow for longer than nine character
    nicks). This is dependant upon the new configuration system
@@ -62,11 +65,13 @@ Networking:
 
 Definitely 3.0:
 * Remove gh_* when Guile 1.8 is released
-* Make it possible to use Scheme functions in the Parser itself
 * Replace large select-loop in Bot::waitForInput with multithreaded
    - To clarify: There will be one thread for DCCs and another thread
       for the current irc server connection, each with its own select
       loop. There may also be a thread for the network repls if I
       implement those.
+
+Maybe:
 * New config values in config db should be added before old values
-   (this is faster but breaks the way server lists work in 2.x)
\ No newline at end of file
+   (this is faster but breaks the way server lists work in 2.x)
+* Make it possible to use Scheme functions in the Parser itself
\ No newline at end of file
index 364f5c1..f5d33d9 100644 (file)
@@ -242,10 +242,15 @@ File: bobot++.info,  Node: Configuration File Placement,  Prev: Configuration Fi
 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
+     [ I kinda think this should go before the detailed description of
+     the config file.  I was didn't see it at first and was very
+     frustrated trying to find out _where_ to edit all this wonderful
+     stuff. ]
+
+   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
@@ -297,7 +302,6 @@ the following command line arguments:
    * `[--debug][-D]' Makes Bobot++ print debugging info and run in the
      foreground
 
-
    The default configuration is read from
 `$HOME/.bobotpp/config/default/' and then `/etc/bobotpp/default/' if
 the user config is not found.
@@ -359,7 +363,6 @@ symbolic levels in Scheme; just use the numeric code.
   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
 
@@ -382,73 +385,109 @@ 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'                                                  
+COMMAND        NEEDS       MIN LEVEL   DESCRIPTION
+               CHANNEL     TO USE      
+`action' `do'  Yes         USER         Causes the bot to perform the
+                                       action `do' in the current channel.
+`adduser'                              
+`addserver'                            Adds the server specified by HOST
+                                       NAME or IP ADDRESS to the server
+                                       list.
+`addshit'                              
+`alias'                                Makes an alias, and adds the
+                                       function NEW NAME, that will do
+                                       exactly the same command as OLD
+                                       NAME.
+`ban'                                  Bans MASK or NICK from CHANNEL. You
+                                       need to be a trusted user to ban
+                                       with a MASK.
+`banlist'                              
+`channels'                             Prints the channel(s) where the bot
+                                       is currently.
+`cycle'        Yes                     Makes the bot leave and join
+                                       CHANNEL.
+`dcclist'                              Gives the list of all DCC Chat
+                                       connections.
+`deban'        Yes                     Debans MASK or NICK from CHANNEL.
+                                       You need to be a trusted user to
+                                       deban with a MASK.
+`delserver'                            Deletes server from server list
+                                       whose number in the server list is
+                                       SERVER NUMBER.
+`deluser'                              Removes NICK or MASK from the
+                                       userlist.
+`delshit'                              Removes NICK or MASK from the
+                                       shitlist.
+`deop'         Yes                     Deops MASK or NICK on CHANNEL.
+`die'                                  Makes the bot stop immediately.
+`do'                                   
+`execute'                              *Only available if scripting
+                                       support is enabled*
+`help'                                 
+`ident'                                Identifies you on the bot. Note
+                                       that you should not use this
+                                       command in public ...
+`invite'       Yes                     Invites NICK on CHANNEL.
+`join'                                 Makes the bot join CHANNEL.
+`keep'         Yes                     Sets the MODES that the bot will
+                                       keep for CHANNEL.
+`kick'         Yes                     Kicks MASK or NICK out of CHANNEL,
+                                       because of REASON. You need to be a
+                                       trusted user to use a MASK.
+`kickban'      Yes                     Bans then kicks MASK or NICK out of
+                                       CHANNEL, because of REASON. You need
+                                       to be a trusted user to use a MASK.
+`load'                                 Reloads the userlist from disk.
+`loadscript'                           *Only available if scripting
+                                       support is enabled*
+`lock'                                 Locks topic on CHANNEL.
+`mode'         Yes                     Sends MODE STRING as mode for
+                                       CHANNEL.
+`msg'                                  
+`names'        Yes                     Shows the nicknames and status of
+                                       users on CHANNEL.
+`nextserver'                           Makes the bot connect to the next
+                                       server in its server list.
+`nick'                                 Makes the bot use nickname NICK.
+`nslookup'                             Does a nameserver query about NICK
+                                       host, HOST or IP ADDRESS.
+`op'           Yes                     Ops NICK on CHANNEL.
+`part'         Yes                     Makes the bot leave CHANNEL.
+`password'                             Changes your password on the bot.
+                                       Use `NONE' as password if you want
+                                       to clear it. Do not use this
+                                       command in public!
+`reconnect'                            Makes the bot reconnect to its
+                                       current server.
+`rspymessage'                          Removes you from the spy list.
+`save'                                 Saves the userlist.
+`say'          Yes                     Makes the bot say MESSAGE on
+                                       CHANNEL.
+`server'                               Select the server to connect to.
+                                       SERVER NUMBER is the number of the
+                                       server in the serverlist.
+`serverlist'                           Shows the bot's serverlist.
+`setfloodrate'                         
+`setversion'                           
+`shitlist'                             Shows the bot's shitlist.
+`spylist'                              Shows the bot's spylist.
+`spymessage'                           Adds you to the spylist
+`stats'        Yes                     Gives CHANNEL's statistics.
+`tban'         Yes                     Bans NICK or MASK from CHANNEL for
+                                       TIME seconds.
+`tkban'        Yes                     Bans NICK or MASK from CHANNEL for
+                                       TIME seconds, then kicks him/them
+                                       because of REASON.
+`topic'        Yes                     If no TOPICis given, prints
+                                       CHANNEL's topic. Otherwise, the bot
+                                       will change CHANNEL's topic to
+                                       TOPIC.
+`unlock'       Yes                     Makes the bot unlock topic on
+                                       CHANNEL
+`userlist'                             Shows the bot's userlist
+`who'          Yes                     Show your level on CHANNEL
+`whois'        Yes                     Shows information about NICK on
+                                       CHANNEL
 
 \1f
 File: bobot++.info,  Node: Scripting,  Next: Concept Index,  Prev: Using the Bot,  Up: Top
@@ -485,27 +524,30 @@ File: bobot++.info,  Node: Adding New Commands,  Next: Hooks,  Prev: Scripting,
 =======================
 
 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:
-
-     (define (hello channel name)
-       (if (string=? name "")
-         (bot:say channel "Hello world!")
-         (bot:say channel (string-append "Hello " name "!")))
-
-     (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'.
+`bot:addcommand'.
+
+ -- Function: 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:
+
+          (define (hello channel name)
+            (if (string=? name "")
+              (bot:say channel "Hello world!")
+              (bot:say channel (string-append "Hello " name "!")))
+
+          (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
@@ -537,21 +579,23 @@ File: bobot++.info,  Node: Creating a Hook,  Next: Hook Types,  Prev: Hooks,  Up
 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 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
-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'. `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.
+To add a new hook you use the function `bot:addhook'.
+
+ -- Function: 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 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'.
+     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
@@ -559,163 +603,87 @@ File: bobot++.info,  Node: Hook Types,  Prev: Creating a Hook,  Up: Hooks
 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:
-
-   * `hooks/name' (this is the Scheme variable name of the hook)
-        - Description of the hook
-
-        - ARG1 ARG2 ... ARGN
-             - ARG1: desc
-
-             - ARG2: desc
-
-             - ...
-
-             - ARGN: desc
-
-   That said, here is the list of available hooks: FIXME: write docs
-
-   * `hooks/action'
-        - This hook is triggered when someone performs an action.
-
-        - 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
-
-        - # 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
+Here is a list of the various hooks funtions and notes on each one. The
+general format of each hook description is as if it was was function to
+be defined, but these describe the function to be passwd to
+`bot:add-hook'.  Do _not_ name your functions these names.
 
-        - # of args
-             - `arg1': desc
+     [ Boy, that's clumsy.  I want to say that the hook/xx functions
+     that are documented below are not funtions that you call.  They
+     are the functions that needs to be passed to bot:addhook for that
+     kind of hook.
 
-   * `hooks/invite'
-        - Description of the hook
+     Still clumsy.  Oh well. ]
 
-        - # of args
-             - `arg1': desc
+   That said, here is the list of available hooks functions.  FIXME:
+write docs
 
-   * `hooks/join'
-        - Description of the hook
+ -- Function: hooks/action from to action
+     This hook is triggered when someone performs an action.  FROM is
+     the address of the person that performed the action in the form
+     `NICK ! USER @ HOST' (without the spaces).  TO is the target of
+     the action, which is either a channel or the Bot's nick.  ACTION
+     is the text of the action. E.g. if someone did `* foobar does
+     baz', then ACTION would be the string `"does baz"'.
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/nickname old-nick new-nick
+     This hook gets called when someone changes thir nickname from
+     OLD-NICK to NEW-NICK.
 
-   * `hooks/kick'
-        - Description of the hook
+ -- Function: hooks/signoff nick rest
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/ctcp nick to command rest
 
-   * `hooks/part'
-        - Description of the hook
+ -- Function: hooks/ctcp-reply nick command rest
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/disconnect ?
+     [ Is this ever called?  I can't find it in the source ]
 
-   * `hooks/mode'
-        - Description of the hook
+ -- Function: hooks/flood nick
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/invite nick channel
 
-   * `hooks/message'
-        - Description of the hook
+ -- Function: hooks/join nick channel
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/kick target from channel reason
 
-   * `hooks/notice'
-        - Description of the hook
+ -- Function: hooks/leave nick channel
+ -- Function: hooks/part nick channel
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/mode nick channel modes
 
-   * `hooks/public'
-        - Description of the hook
+ -- Function: hooks/message from message
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/notice nick message
 
-   * `hooks/public-notice'
-        - Description of the hook
+ -- Function: hooks/public from to message
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/public-notice nick to message
 
-   * `hooks/raw'
-        - Description of the hook
+ -- Function: hooks/raw raw-message
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/timer time
+     This hook seems to be called once a minute.  TIME is in `hh:mm'
+     format.
 
-   * `hooks/timer'
-        - Description of the hook
+ -- Function: hooks/topic nick channel new-topic
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/send/public mynick dest message
 
-   * `hooks/topic'
-        - Description of the hook
+ -- Function: hooks/send/message botnick message
 
-        - # of args
-             - `arg1': desc
+ -- Function: hooks/send/action mynick to message
 
-   * `hooks/dcc/begin'
-        - This hook is triggered when a user begins a DCC CHAT with the
-          bot.
+ -- Function: hooks/send/ctcp mynick to command message
 
-        - FROM
-             - FROM: This is the user's address in the form
-               `nick!user@host'.
+ -- Function: hooks/dcc/chat-begin from
+     This hook is triggered when a user begins a DCC CHAT with the bot.
+     FROM 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.
+ -- Function: hooks/dcc/chat-message from message
+     This hook is triggered when a user sends a message to the bot
+     through a DCC CHAT FROM is the user's address in the form
+     `nick!user@host'.  MESSAGE is the message the user sent to the bot.
 
 \1f
 File: bobot++.info,  Node: Scheme User Levels,  Next: Sending Messages,  Prev: Hooks,  Up: Scripting
@@ -764,7 +732,18 @@ File: bobot++.info,  Node: High Level Message Functions,  Next: Low Level Messag
 4.4.1 "High Level" Message Functions
 ------------------------------------
 
-...
+ -- Function: bot:say channel message
+     Send a public or private MESSAGE to CHANNEL.
+
+     Sends a normal text message, as if a user had typed it in.  The
+     DEST can be a nickname or a channel.
+
+ -- Function: bot:action channel message
+     Send an "action" type  MESSAGE to CHANNEL
+
+ -- Function: bot:msg nick message
+     The same as if a user typed `/msg nick message' to their IRC
+     client.
 
 \1f
 File: bobot++.info,  Node: Low Level Message Functions,  Prev: High Level Message Functions,  Up: Sending Messages
@@ -778,11 +757,10 @@ 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!
-
+ -- Function: 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
@@ -797,6 +775,200 @@ might want to know.
 bot:exit-hook THUNK' where THUNK is an argumentless procedure (a
 thunk). When the bot exits your thunk will be called.
 
+     [ I didn't know where to put any of these, so I jsut stuck them in
+     here.
+
+     There probably needs to be several sections added, like dealing
+     with users (kicking, added, etc), dealing with the bot (channels,
+     nickname of the bot, etc), server issues (serverlist), useful
+     tools (nslookup, whois), and do on. ]
+
+ -- Function: bot:adduser nick-or-mask cbannel-mask level prot auto-op
+     Adds an user to the userlist, for a `nick!user@host' matching the
+     one given, on a channel matching the CHANNELMASK given.
+
+     The LEVEL can be:      The PROT can be:       The AUTO-OP can be:
+     0 - No level           0 - No protection      0 - No auto-op
+     1 - User               1 - No ban             1 - Op on join
+     2 - Trusted User       2 - No kick            
+     3 - Friend             3 - No deop            
+     4 - Master                                    
+
+
+ -- Function: bot:addserver hostname ip-address [portnumber]
+     Adds the server specified by HOSTNAME or IP-ADDRESS to the server
+     list.
+
+ -- Function: bot:addshit nick-or-mask channel-mask level [time reason]
+     Adds an user to the shitlist, for a nick!user@host matching the
+     one given, on a channel matching the CHANNELMASK given.
+
+          The LEVEL can be:
+            0 - No shit
+            1 - No op
+            2 - Kick and Ban on join
+            3 - Kick and Ban on join, no deban
+
+
+ -- Function: bot:ban channel mask-or-nick
+     Bans MASK or NICK from CHANNEL. You need to be a trusted user to
+     ban with a MASK.
+
+ -- Function: bot:change-command-level nick-or-mask channel-mask
+          new-level
+     Gives NICK or MASK level NEW-LEVEL on channel(s) CHANNEL-MASK.
+     Note that you can not change level for someone whose level is
+     greater than yours, and that you can not give a level greater than
+     yours.
+
+ -- Function: bot:cycle channel
+     Makes the bot leave and join CHANNEL.
+
+ -- Function: bot:deban channel mask-or-nick
+     Debans MASK or NICK from CHANNEL. You need to be a trusted user to
+     deban with a MASK.
+
+ -- Function: bot:delserver server-number
+     Deletes server from server list whose number in the server list is
+     SERVER-NUMBER
+
+ -- Function: bot:deluser nick-or-mask channel-mask
+     Removes NICK or MASK from the userlist.
+
+ -- Function: bot:delshit nick-or-mask channel-mask
+     Removes NICK or MASK from the shitlist.
+
+ -- Function: bot:deop channel mask-or-nick
+     Deops MASK or NICK on CHANNEL.
+
+ -- Function: bot:die reason
+     Makes the bot stop immediately.
+
+ -- Function: bot:do ?
+
+ -- Function: bot:invite channel nick
+     Invites NICK on CHANNEL.
+
+ -- Function: bot:join channel
+     Makes the bot join CHANNEL.
+
+ -- Function: bot:keep channel modes
+     Sets the MODES that the bot will keep for CHANNEL.  See also STATS.
+
+ -- Function: bot:kick channel mask-or-nick [reason]
+     Kicks MASK or NICK out of CHANNEL, because of REASON.  You need to
+     be a trusted user to use a MASK.
+
+ -- Function: bot:kickban channel mask-or-nick [reason]
+     Bans then kicks MASK or NICK out of CHANNEL, because of REASON.
+     You need to be a trusted user to use a MASK.
+
+ -- Function: bot:lock channel
+     Locks topic on CHANNEL.
+
+ -- Function: bot:logport
+     [ Probably returns the log port? ]
+
+ -- Function: bot:mode channel mode-string
+     Sends MODE-STRING as mode for CHANNEL.
+
+ -- Function: bot:nextserver
+     Makes the bot connect to the next server in its server list.
+
+ -- Function: bot:nick nick
+     Makes the bot use nickname NICK.
+
+ -- Function: bot:op channel nick
+     Ops NICK on CHANNEL.
+
+ -- Function: bot:part channel
+     Makes the bot leave CHANNEL.
+
+ -- Function: bot:reconnect
+     Makes the bot reconnect to its current server.
+
+ -- Function: bot:server server-number
+     Select the server to connect to. SERVER-NUMBER is the number of
+     the server in the serverlist.
+
+ -- Function: bot:setfloodrate ?
+
+ -- Function: bot:setversion ?
+
+ -- Function: bot:tban channel nick-or-mask time
+     Bans NICK or MASK from CHANNEL for TIME seconds.
+
+ -- Function: bot:tkban channel nick-or-mask time [reason]
+     Bans NICK or MASK from CHANNEL for TIME seconds, then kicks
+     him/them because of REASON.
+
+ -- Function: bot:topic channel topic
+     If no TOPIC is given, prints CHANNEL's topic. Otherwise, the bot
+     will change CHANNEL's topic to TOPIC.
+
+ -- Function: bot:unlock channel
+     Makes the bot unlock topic on CHANNEL.
+
+ -- Function: bot:getnickname
+     [ Gets the bot's nickname? ]
+
+ -- Function: bot:getserver
+
+ -- Function: bot:getserverlist
+
+ -- Function: bot:flush
+     [ Flushes the socket to the server? ]
+
+ -- Function: bot:flushport
+     [ Flushes the log port? ]
+
+ -- Function: bot:random ?
+     [ Returns a random number?  What range?  Why? ]
+
+ -- Function: bot:delcommand
+     [ Probably deletes a command added with `bot:addcommand' ? ]
+
+ -- Function: bot:addtimer ? ?
+
+ -- Function: bot:deltimer ?
+
+ -- Function: bot:dcc-chat-send ? ?
+
+     [ And what about the stuff defined in `bobot-utils.scm' ? I just
+     added it here so it could be somewhere.  There should also be a
+     section dealing with modules.  How to use them.  What module
+     scripts are in.  What module bobot++ provided primites are in.
+     And so on. ]
+
+ -- Function: bot:log . messages
+     Write as many MESSAGES as you want to the log.  If the arg is a
+     thunk it will be executed and it's output will be written to the
+     log.
+
+ -- Function: bot:load file
+
+ -- Function: bot:load-module module-spec
+
+ -- Function: bot:use-module module-spec
+
+ -- Function: bot:match-not-channel regex
+     match-not-channel adds a prefix regex to your REGEX so it doesn't
+     match the sender or channel in a PUBLIC message
+
+ -- Function: bot:match-to-me regex
+     match-to-me matches text that was addressed to the bot with a ':',
+     ',',  or nothing after the bot name.
+
+ -- Function: bot:sent-to-me? message
+
+ -- Function: bot:ctcp-quote message
+     Returns the CTCP quoted message Input _MUST NOT_ contain the
+     trailing `\r\n' (it is added by the message sending code).
+
+ -- Variable: %bot:loadpath
+
+ -- Function: %bot:load-extensions
+
 \1f
 File: bobot++.info,  Node: Concept Index,  Next: Function Index,  Prev: Scripting,  Up: Top
 
@@ -817,8 +989,146 @@ Function Index
 \0\b[index\0\b]
 * Menu:
 
-* addcommand:                            Adding New Commands.   (line 6)
-* addhook:                               Creating a Hook.       (line 6)
+* %bot:load-extensions:                  Misc Scripting Stuff.
+                                                              (line 206)
+* bot:action:                            High Level Message Functions.
+                                                              (line  13)
+* bot:addcommand:                        Adding New Commands. (line  11)
+* bot:addhook:                           Creating a Hook.     (line   9)
+* bot:addserver:                         Misc Scripting Stuff.
+                                                              (line  34)
+* bot:addshit:                           Misc Scripting Stuff.
+                                                              (line  38)
+* bot:addtimer:                          Misc Scripting Stuff.
+                                                              (line 167)
+* bot:adduser:                           Misc Scripting Stuff.
+                                                              (line  22)
+* bot:ban:                               Misc Scripting Stuff.
+                                                              (line  49)
+* bot:change-command-level:              Misc Scripting Stuff.
+                                                              (line  54)
+* bot:ctcp-quote:                        Misc Scripting Stuff.
+                                                              (line 200)
+* bot:cycle:                             Misc Scripting Stuff.
+                                                              (line  60)
+* bot:dcc-chat-send:                     Misc Scripting Stuff.
+                                                              (line 171)
+* bot:deban:                             Misc Scripting Stuff.
+                                                              (line  63)
+* bot:delcommand:                        Misc Scripting Stuff.
+                                                              (line 164)
+* bot:delserver:                         Misc Scripting Stuff.
+                                                              (line  67)
+* bot:delshit:                           Misc Scripting Stuff.
+                                                              (line  74)
+* bot:deltimer:                          Misc Scripting Stuff.
+                                                              (line 169)
+* bot:deluser:                           Misc Scripting Stuff.
+                                                              (line  71)
+* bot:deop:                              Misc Scripting Stuff.
+                                                              (line  77)
+* bot:die:                               Misc Scripting Stuff.
+                                                              (line  80)
+* bot:do:                                Misc Scripting Stuff.
+                                                              (line  83)
+* bot:flush:                             Misc Scripting Stuff.
+                                                              (line 155)
+* bot:flushport:                         Misc Scripting Stuff.
+                                                              (line 158)
+* bot:getnickname:                       Misc Scripting Stuff.
+                                                              (line 148)
+* bot:getserver:                         Misc Scripting Stuff.
+                                                              (line 151)
+* bot:getserverlist:                     Misc Scripting Stuff.
+                                                              (line 153)
+* bot:invite:                            Misc Scripting Stuff.
+                                                              (line  85)
+* bot:join:                              Misc Scripting Stuff.
+                                                              (line  88)
+* bot:keep:                              Misc Scripting Stuff.
+                                                              (line  91)
+* bot:kick:                              Misc Scripting Stuff.
+                                                              (line  94)
+* bot:kickban:                           Misc Scripting Stuff.
+                                                              (line  98)
+* bot:load:                              Misc Scripting Stuff.
+                                                              (line 184)
+* bot:load-module:                       Misc Scripting Stuff.
+                                                              (line 186)
+* bot:lock:                              Misc Scripting Stuff.
+                                                              (line 102)
+* bot:log:                               Misc Scripting Stuff.
+                                                              (line 179)
+* bot:logport:                           Misc Scripting Stuff.
+                                                              (line 105)
+* bot:match-not-channel:                 Misc Scripting Stuff.
+                                                              (line 190)
+* bot:match-to-me:                       Misc Scripting Stuff.
+                                                              (line 194)
+* bot:mode:                              Misc Scripting Stuff.
+                                                              (line 108)
+* bot:msg:                               High Level Message Functions.
+                                                              (line  16)
+* bot:nextserver:                        Misc Scripting Stuff.
+                                                              (line 111)
+* bot:nick:                              Misc Scripting Stuff.
+                                                              (line 114)
+* bot:op:                                Misc Scripting Stuff.
+                                                              (line 117)
+* bot:part:                              Misc Scripting Stuff.
+                                                              (line 120)
+* bot:random:                            Misc Scripting Stuff.
+                                                              (line 161)
+* bot:reconnect:                         Misc Scripting Stuff.
+                                                              (line 123)
+* bot:say:                               High Level Message Functions.
+                                                              (line   7)
+* bot:send-CTCP:                         Low Level Message Functions.
+                                                              (line  13)
+* bot:sent-to-me?:                       Misc Scripting Stuff.
+                                                              (line 198)
+* bot:server:                            Misc Scripting Stuff.
+                                                              (line 126)
+* bot:setfloodrate:                      Misc Scripting Stuff.
+                                                              (line 130)
+* bot:setversion:                        Misc Scripting Stuff.
+                                                              (line 132)
+* bot:tban:                              Misc Scripting Stuff.
+                                                              (line 134)
+* bot:tkban:                             Misc Scripting Stuff.
+                                                              (line 137)
+* bot:topic:                             Misc Scripting Stuff.
+                                                              (line 141)
+* bot:unlock:                            Misc Scripting Stuff.
+                                                              (line 145)
+* bot:use-module:                        Misc Scripting Stuff.
+                                                              (line 188)
+* hooks/action:                          Hook Types.          (line  22)
+* hooks/ctcp:                            Hook Types.          (line  36)
+* hooks/ctcp-reply:                      Hook Types.          (line  38)
+* hooks/dcc/chat-begin:                  Hook Types.          (line  80)
+* hooks/dcc/chat-message:                Hook Types.          (line  84)
+* hooks/disconnect:                      Hook Types.          (line  40)
+* hooks/flood:                           Hook Types.          (line  43)
+* hooks/invite:                          Hook Types.          (line  45)
+* hooks/join:                            Hook Types.          (line  47)
+* hooks/kick:                            Hook Types.          (line  49)
+* hooks/leave:                           Hook Types.          (line  51)
+* hooks/message:                         Hook Types.          (line  56)
+* hooks/mode:                            Hook Types.          (line  54)
+* hooks/nickname:                        Hook Types.          (line  30)
+* hooks/notice:                          Hook Types.          (line  58)
+* hooks/part:                            Hook Types.          (line  52)
+* hooks/public:                          Hook Types.          (line  60)
+* hooks/public-notice:                   Hook Types.          (line  62)
+* hooks/raw:                             Hook Types.          (line  64)
+* hooks/send/action:                     Hook Types.          (line  76)
+* hooks/send/ctcp:                       Hook Types.          (line  78)
+* hooks/send/message:                    Hook Types.          (line  74)
+* hooks/send/public:                     Hook Types.          (line  72)
+* hooks/signoff:                         Hook Types.          (line  34)
+* hooks/timer:                           Hook Types.          (line  66)
+* hooks/topic:                           Hook Types.          (line  70)
 
 \1f
 File: bobot++.info,  Node: Variable Index,  Prev: Function Index,  Up: Top
@@ -829,29 +1139,10 @@ Variable Index
 \0\b[index\0\b]
 * Menu:
 
+* %bot:loadpath:                         Misc Scripting Stuff.
+                                                              (line 204)
 * 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)
@@ -870,24 +1161,24 @@ 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
+Node: Using the Bot\7f7260
+Node: Starting the Bot\7f7510
+Node: User Levels\7f8853
+Node: Protection\7f10309
+Node: Automatic Op\7f10917
+Node: Built-In Commands\7f11206
+Node: Scripting\7f18185
+Node: Adding New Commands\7f19150
+Node: Hooks\7f20473
+Node: Creating a Hook\7f21452
+Node: Hook Types\7f22635
+Node: Scheme User Levels\7f25478
+Node: Sending Messages\7f26612
+Node: High Level Message Functions\7f27228
+Node: Low Level Message Functions\7f27851
+Node: Misc Scripting Stuff\7f28619
+Node: Concept Index\7f35195
+Node: Function Index\7f35414
+Node: Variable Index\7f45258
 \1f
 End Tag Table
index d29b017..3533104 100644 (file)
@@ -251,6 +251,12 @@ given operator priviliges on channel entry (@ref{Automatic Op}).
 @node Configuration File Placement,  , Configuration Files, Configuration
 @section Configuration File Placement
 
+@quotation
+[ I kinda think this should go before the detailed description of the
+config file.  I was didn't see it at first and was very frustrated
+trying to find out @emph{where} to edit all this wonderful stuff. ]
+@end quotation
+
 Bobot++ will look in @file{/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
@@ -277,34 +283,22 @@ The bot is usually installed with the binary name @file{bobotpp}. It
 accepts the following command line arguments:
 
 @itemize
-
 @item @code{[--help][-h]} - Shows detailed help and exits
-
 @item @code{[--version][-v]} - Shows version information and exits
-
 @item @code{[--no-background][-b]} - Run bobot++ in the foreground
-
-@item @code{[--config-file file][-f]} - Use file instead of
-@file{bot.conf}
-
-@item @code{[--config-dir dir][-d]} - Use dir as dir to load config
-file from
-
+@item @code{[--config-file file][-f]} - Use file instead of @file{bot.conf}
+@item @code{[--config-dir dir][-d]} - Use dir as dir to load config file from
 @item @code{[--config dir][-c]} - Search your config path (defaults to
 @file{@var{$HOME}/.bobotpp/config/} and then @file{/etc/bobotpp/}) for
 dir and then loads your config data using dir
-
 @item @code{[--sys-config dir][-s]} - Looks for config in
 @file{/etc/bobotpp/dir}. Note that the user dir is still searched
 first
-
 @item @code{[--user-config dir][-u]} - Looks for config in
 @file{@var{$HOME}/.bobotpp/config/dir/}. Note that the system dir is
 still searched after this if dir is not found.
-
 @item @code{[--debug][-D]} Makes Bobot++ print debugging info and run
 in the foreground
-
 @end itemize
 
 The default configuration is read from
@@ -357,17 +351,12 @@ banned. There are currently no symbolic levels in Scheme; just use the
 numeric code.
 
 @enumerate 0
-
 @item No protection
-
 @item No ban. If a user is banned the bot will unban him..
-
 @item No kick. The user may still be kicked but the bot will kickban
 the user who kicked the protected user.
-
 @item No deop. The bot will ensure that the user always maintains
 operator status.
-
 @end enumerate
 
 @node Automatic Op, Built-In Commands, Protection, Using the Bot
@@ -381,130 +370,168 @@ to enable auto-op.
 @section 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
+scripting support. The reference leaves off the command char; remember
+to use whatever you defined the command char to be in
 @file{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.
 
-@multitable @columnfractions 0.25 0.25 0.25 0.25
+@multitable @columnfractions 0.20 0.15 0.15 0.50
 @item @sc{command} @tab @sc{Needs Channel} @tab @sc{Min Level to Use} @tab @sc{Description}
 
 @item @command{action} @option{do} @tab Yes @tab @var{USER} @tab
 Causes the bot to perform the action @option{do} in the current
 channel.
 
-@item @command{adduser}
+@item @command{adduser} @tab @tab @tab
 
-@item @command{addserver}
+@item @command{addserver} @tab @tab @tab Adds the server specified by
+@var{host name} or @var{ip address} to the server list.
 
-@item @command{addshit}
+@item @command{addshit} @tab @tab @tab
 
-@item @command{alias}
+@item @command{alias} @tab @tab @tab Makes an alias, and adds the
+function @var{new name}, that will do exactly the same command as
+@var{old name}.
 
-@item @command{ban}
+@item @command{ban} @tab @tab @tab Bans @var{mask} or @var{nick} from
+@var{channel}. You need to be a trusted user to ban with a
+@var{mask}.
 
-@item @command{banlist}
+@item @command{banlist} @tab @tab @tab
 
-@item @command{channels}
+@item @command{channels} @tab @tab @tab Prints the channel(s) where
+the bot is currently.
 
-@item @command{cycle}
+@item @command{cycle} @tab Yes @tab @tab Makes the bot leave and join
+@var{channel}.
 
-@item @command{dcclist}
+@item @command{dcclist} @tab @tab @tab Gives the list of all DCC Chat
+connections.
 
-@item @command{deban}
+@item @command{deban} @tab Yes @tab @tab Debans @var{mask} or
+@var{nick} from @var{channel}. You need to be a trusted user to deban
+with a @var{mask}.
 
-@item @command{delserver}
+@item @command{delserver} @tab @tab @tab Deletes server from server
+list whose number in the server list is @var{server number}.
 
-@item @command{deluser}
+@item @command{deluser} @tab @tab @tab Removes @var{nick} or
+@var{mask} from the userlist.
 
-@item @command{delshit}
+@item @command{delshit} @tab @tab @tab Removes @var{nick} or
+@var{mask} from the shitlist.
 
-@item @command{deop}
+@item @command{deop} @tab Yes @tab @tab Deops @var{mask} or @var{nick}
+on @var{channel}.
 
-@item @command{die}
+@item @command{die} @tab @tab @tab Makes the bot stop immediately.
 
-@item @command{do}
+@item @command{do} @tab @tab @tab
 
-@item @command{execute} @tab @tab @tab @strong{Only available if scripting
-support is enabled}
+@item @command{execute} @tab @tab @tab @strong{Only available if
+scripting support is enabled}
 
-@item @command{help}
+@item @command{help} @tab @tab @tab
 
-@item @command{ident}
+@item @command{ident} @tab @tab @tab Identifies you on the bot. Note
+that you should not use this command in public @dots{}
 
-@item @command{invite}
+@item @command{invite} @tab Yes @tab @tab Invites @var{nick} on
+@var{channel}.
 
-@item @command{join}
+@item @command{join} @tab @tab @tab Makes the bot join @var{channel}.
 
-@item @command{keep}
+@item @command{keep} @tab Yes @tab @tab Sets the @var{modes} that the
+bot will keep for @var{channel}.
 
-@item @command{kick}
+@item @command{kick} @tab Yes @tab @tab Kicks @var{mask} or @var{nick}
+out of @var{channel}, because of @var{reason}. You need to be a
+trusted user to use a @var{mask}. 
 
-@item @command{kickban}
+@item @command{kickban} @tab Yes @tab @tab Bans then kicks @var{mask}
+or @var{nick} out of @var{channel}, because of @var{reason}. You need
+to be a trusted user to use a @var{mask}.
 
-@item @command{load}
+@item @command{load} @tab @tab @tab Reloads the userlist from disk.
 
-@item @command{loadscript} @tab @tab @tab @strong{Only available if scripting
-support is enabled}
+@item @command{loadscript} @tab @tab @tab @strong{Only available if
+scripting support is enabled}
 
-@item @command{lock}
+@item @command{lock} @tab @tab @tab Locks topic on @var{channel}.
 
-@item @command{mode}
+@item @command{mode} @tab Yes @tab @tab Sends @var{mode string} as
+mode for @var{channel}.
 
-@item @command{msg}
+@item @command{msg} @tab @tab @tab
 
-@item @command{names}
+@item @command{names} @tab Yes @tab @tab Shows the nicknames and
+status of users on @var{channel}.
 
-@item @command{nextserver}
+@item @command{nextserver} @tab @tab @tab Makes the bot connect to the
+next server in its server list.
 
-@item @command{nick}
+@item @command{nick} @tab @tab @tab Makes the bot use nickname @var{nick}.
 
-@item @command{nslookup}
+@item @command{nslookup} @tab @tab @tab Does a nameserver query about
+@var{nick} host, @var{host} or @var{ip address}.
 
-@item @command{op}
+@item @command{op} @tab Yes @tab @tab Ops @var{nick} on @var{channel}.
 
-@item @command{part}
+@item @command{part} @tab Yes @tab @tab Makes the bot leave @var{channel}.
 
-@item @command{password}
+@item @command{password} @tab @tab @tab Changes your password on the
+bot. Use @code{NONE} as password if you want to clear it. Do not use this
+command in public!
 
-@item @command{reconnect}
+@item @command{reconnect} @tab @tab @tab Makes the bot reconnect to
+its current server.
 
-@item @command{rspymessage}
+@item @command{rspymessage} @tab @tab @tab Removes you from the spy
+list.
 
-@item @command{save}
+@item @command{save} @tab @tab @tab Saves the userlist.
 
-@item @command{say}
+@item @command{say} @tab Yes @tab @tab Makes the bot say @var{message}
+on @var{channel}.
 
-@item @command{server}
+@item @command{server} @tab @tab @tab Select the server to connect
+to. @var{server number} is the number of the server in the serverlist.
 
-@item @command{serverlist}
+@item @command{serverlist} @tab @tab @tab Shows the bot's serverlist.
 
-@item @command{setfloodrate}
+@item @command{setfloodrate} @tab @tab @tab
 
-@item @command{setversion}
+@item @command{setversion} @tab @tab @tab
 
-@item @command{shitlist}
+@item @command{shitlist} @tab @tab @tab Shows the bot's shitlist.
 
-@item @command{spylist}
+@item @command{spylist} @tab @tab @tab Shows the bot's spylist.
 
-@item @command{spymessage}
+@item @command{spymessage} @tab @tab @tab Adds you to the spylist
 
-@item @command{stats}
+@item @command{stats} @tab Yes @tab @tab Gives @var{channel}'s statistics.
 
-@item @command{tban}
+@item @command{tban} @tab Yes @tab @tab Bans @var{nick} or @var{mask}
+from @var{channel} for @var{time} seconds.
 
-@item @command{tkban}
+@item @command{tkban} @tab Yes @tab @tab Bans @var{nick} or @var{mask}
+from @var{channel} for @var{time} seconds, then kicks him/them because
+of @var{reason}.
 
-@item @command{topic}
+@item @command{topic} @tab Yes @tab @tab If no @var{topic}is given,
+prints @var{channel}'s topic. Otherwise, the bot will change
+@var{channel}'s topic to @var{topic}.
 
-@item @command{unlock}
+@item @command{unlock} @tab Yes @tab @tab Makes the bot unlock topic
+on @var{channel}
 
-@item @command{userlist}
+@item @command{userlist} @tab @tab @tab Shows the bot's userlist
 
-@item @command{who}
+@item @command{who} @tab Yes @tab @tab Show your level on @var{channel}
 
-@item @command{whois}
+@item @command{whois} @tab Yes @tab @tab Shows information about
+@var{nick} on @var{channel}
 
 @end multitable
 
@@ -537,20 +564,20 @@ your code to use the new functions.
 @node Adding New Commands, Hooks, Scripting, Scripting
 @section Adding New Commands
 
-@findex addcommand
-Adding a new command is simple. To register a new command use
-@code{bot:addcommand}. The prototype for @code{bot:addcommand} is
-@code{(bot:addcommand name func needs-channel? num-of-args
-min-level)}. The @code{name} is a string representing the name of the
-command being added. @code{func} is a function accepting
-@code{num-of-args} arguments. @code{needs-channel?} is a bool that is
-true if the function needs the channel name as its first arg, and
-false otherwise. @code{num-of-args} is the number of args @code{func}
-will take and must be within zero (0) and twenty
-(20). @code{min-level} is one of the @ref{Scheme User Levels}. A user must be
-at least a @code{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 @code{""}. An example of a new command would be:
+Adding a new command is simple. To register a new command use @code{bot:addcommand}.  
+
+@defun bot:addcommand name func needs-channel? num-of-args min-level
+
+The @var{name} is a string representing the name of the command being
+added.  @var{func} is a function accepting @var{num-of-args}
+arguments. @var{needs-channel?} is a bool that is true if the function
+needs the channel name as its first arg, and false otherwise.
+@var{num-of-args} is the number of args @var{func} will take and must
+be within zero (0) and twenty (20).  @var{min-level} is one of the
+@ref{Scheme User Levels}.  A user must be at least a @code{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 @code{""}.
+An example of a new command would be:
 
 @example
 (define (hello channel name)
@@ -562,7 +589,8 @@ the empty string @code{""}. An example of a new command would be:
 @end example
 
 This will display ``Hello World!'' if called as @kbd{!hello} and
-``Hello World @code{USER}'' if called as @kbd{!hello @var{USER}}. 
+``Hello World @code{USER}'' if called as @kbd{!hello @var{USER}}.
+@end defun
 
 @node Hooks, Scheme User Levels, Adding New Commands, Scripting
 @section Hooks
@@ -590,367 +618,141 @@ stops.
 @node Creating a Hook, Hook Types, Hooks, Hooks
 @subsection Creating a Hook
 
-@findex addhook
-To add a new hook you use the function
-@code{bot:addhook}. @code{bot:addhook} is prototyped as
-@code{(bot:addhook type regex function pri fall name)}. @code{type}
-specifies the type of hook (the types of hooks are listed in @ref{Hook
-Types}). @code{regex} is a standard regular expression. If
-@code{regex} is matched, @code{function} will be
-called. @code{function} will take a different number of args depending
-on the hook type. @code{pri} specifies the priority of the
-hook---higher priority hooks are executed first. This argument is
-optional and defaults to @code{0}. @code{fall} is @code{#t} if the
-hook is a fallthrough hook and @code{#f} is the hook is not a
-fallthrough hook. This arg is also optional and default to
-@code{#t}. @code{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 @code{".*"} and set their names to @code{"log"} to
-avoid a conflict with other hooks.
+To add a new hook you use the function @code{bot:addhook}.
+
+@defun bot:addhook type regex function [pri fall name]
+@var{type} specifies the type of hook (the types of hooks are listed
+in @ref{Hook Types}). @var{regex} is a standard regular expression. If
+@var{regex} is matched, @var{function} will be called. @var{function}
+will take a different number of args depending on the hook
+type. @var{pri} specifies the priority of the hook---higher priority
+hooks are executed first. This argument is optional and defaults to
+@code{0}. @var{fall} is @code{#t} if the hook is a fallthrough hook
+and @code{#f} is the hook is not a fallthrough hook. This arg is also
+optional and default to @code{#t}.  @var{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 @code{".*"} and set their names to
+@code{"log"} to avoid a conflict with other hooks.
+@end defun
 
 @node Hook Types,  , Creating a Hook, Hooks
 @subsection 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 funtions and notes on each
+one. The general format of each hook description is as if it was was
+function to be defined, but these describe the function to be passwd
+to @code{bot:add-hook}.  Do @emph{not} name your functions these
+names.
 
-@itemize @bullet
-@item
-@code{hooks/name} (this is the Scheme variable name of the hook)
-@itemize @minus
-@item
-Description of the hook
-@item
-@var{arg1} @var{arg2} ... @var{argn}
-@itemize @minus
-@item
-@var{arg1}: desc
-@item
-@var{arg2}: desc
-@item
-...
-@item
-@var{argN}: desc
-@end itemize
-@end itemize
-@end itemize
+@quotation
+[ Boy, that's clumsy.  I want to say that the hook/xx functions that
+are documented below are not funtions that you call.  They are the
+functions that needs to be passed to bot:addhook for that kind of
+hook.
 
-That said, here is the list of available hooks:
-FIXME: write docs
+Still clumsy.  Oh well. ]
+@end quotation
 
-@itemize @bullet
 
-@item
-@vindex hooks/action
-@code{hooks/action}
-@itemize @minus
-@item
-This hook is triggered when someone performs an action.
-@item
-@var{from}, @var{to}, @var{action}
-@itemize @minus
-@item
-@var{from}: this is the address of the person that performed the
-action in the form @samp{@var{nick} ! @var{user} @@ @var{host}}
-(without the spaces). 
-@item
-@var{to}: This is the target of the action, which is either a channel
-or the Bot's nick.
-@item
-@var{action}: This is the text of the action. E.g. if someone did
-@samp{* foobar does baz}, then @var{action} would be the string
+That said, here is the list of available hooks functions.
+FIXME: write docs
+
+@defun hooks/action from to action
+This hook is triggered when someone performs an action.  @var{from} is
+the address of the person that performed the action in the form
+@samp{@var{nick} ! @var{user} @@ @var{host}} (without the spaces).
+@var{to} is the target of the action, which is either a channel or the
+Bot's nick.  @var{action} is the text of the action. E.g. if someone
+did @samp{* foobar does baz}, then @var{action} would be the string
 @code{"does baz"}.
-@end itemize
-@end itemize
+@end defun
 
-@item
-@vindex hooks/nickname
-@code{hooks/nickname}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
 
-@item
-@vindex hooks/signoff
-@code{hooks/signoff}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/nickname old-nick new-nick
+This hook gets called when someone changes thir nickname from
+@var{old-nick} to @var{new-nick}.
+@end defun
 
-@item
-@vindex hooks/ctcp
-@code{hooks/ctcp}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/signoff nick rest
+@end defun
 
-@item
-@vindex hooks/ctcp-reply
-@code{hooks/ctcp-reply}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/ctcp nick to command rest
+@end defun
 
-@item
-@vindex hooks/disconnect
-@code{hooks/disconnect}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/ctcp-reply nick command rest
+@end defun
 
-@item
-@vindex hooks/flood
-@code{hooks/flood}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/disconnect ?
+[ Is this ever called?  I can't find it in the source ]
+@end defun
 
-@item
-@vindex hooks/invite
-@code{hooks/invite}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/flood nick
+@end defun
 
-@item
-@vindex hooks/join
-@code{hooks/join}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/invite nick channel
+@end defun
 
-@item
-@vindex hooks/kick
-@code{hooks/kick}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/join nick channel
+@end defun
 
-@item
-@vindex hooks/part
-@code{hooks/part}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/kick target from channel reason
+@end defun
 
-@item
-@vindex hooks/mode
-@code{hooks/mode}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/leave nick channel
+@defunx hooks/part nick channel
+@end defun
 
-@item
-@vindex hooks/message
-@code{hooks/message}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/mode nick channel modes
+@end defun
 
-@item
-@vindex hooks/notice
-@code{hooks/notice}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/message from message
+@end defun
 
-@item
-@vindex hooks/public
-@code{hooks/public}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/notice nick message
+@end defun
 
-@item
-@vindex hooks/public-notice
-@code{hooks/public-notice}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/public from to message
+@end defun
 
-@item
-@vindex hooks/raw
-@code{hooks/raw}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/public-notice nick to message
+@end defun
 
-@item
-@vindex hooks/timer
-@code{hooks/timer}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/raw raw-message
+@end defun
 
-@item
-@vindex hooks/topic
-@code{hooks/topic}
-@itemize @minus
-@item
-Description of the hook
-@item
-# of args
-@itemize @minus
-@item
-@code{arg1}: desc
-@end itemize
-@end itemize
+@defun hooks/timer time
+This hook seems to be called once a minute.  @var{time} is in
+@code{hh:mm} format.
+@end defun
 
-@item
-@vindex hooks/dcc/begin
-@code{hooks/dcc/begin}
-@itemize @minus
-@item
-This hook is triggered when a user begins a DCC CHAT with the bot. 
-@item
-@var{FROM}
-@itemize @minus
-@item
-@var{FROM}: This is the user's address in the form
-@samp{nick!user@@host}.
-@end itemize
-@end itemize
+@defun hooks/topic nick channel new-topic
+@end defun
 
-@item
-@vindex hooks/dcc/message
-@code{hooks/dcc/message}
-@itemize @minus
-@item
-This hook is triggered when a user sends a message to the bot through
-a DCC CHAT
-@item
-@var{FROM} @var{MESSAGE}
-@itemize @minus
-@item
-@var{FROM}: This is the user's address in the form
-@samp{nick!user@@host}.
-@item
-@var{MESSAGE}: This is the message the user sent to the bot.
-@end itemize
-@end itemize
-@end itemize
+@defun hooks/send/public mynick dest message
+@end defun
+
+@defun hooks/send/message botnick message
+@end defun
 
+@defun hooks/send/action mynick to message
+@end defun
+
+@defun hooks/send/ctcp mynick to command message
+@end defun
+
+@defun hooks/dcc/chat-begin from
+This hook is triggered when a user begins a DCC CHAT with the bot.
+@var{from} is the user's address in the form @samp{nick!user@@host}.
+@end defun
+
+@defun hooks/dcc/chat-message from message
+This hook is triggered when a user sends a message to the bot through
+a DCC CHAT @var{from} is the user's address in the form
+@samp{nick!user@@host}.  @var{message} is the message the user sent to
+the bot.
+@end defun
 
 @node Scheme User Levels, Sending Messages, Hooks, Scripting
 @section Scheme User Levels
@@ -982,12 +784,11 @@ you must think more about what users can use new commands you add.
 @section Sending Messages
 
 There are several types of messages you can send with Bobot++ from
-scripts. There is the simple, but rather limited, @code{bot:say}, 
-@code{bot:action} and @code{bot:msg}, and
-the more powerful, but lower level, @code{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).
+scripts. There is the simple, but rather limited, @code{bot:say},
+@code{bot:action} and @code{bot:msg}, and the more powerful, but lower
+level, @code{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::  
@@ -997,25 +798,37 @@ level functions (in progress).
 @node High Level Message Functions, Low Level Message Functions, Sending Messages, Sending Messages
 @subsection ``High Level'' Message Functions
 
-...
+@defun bot:say channel message
+Send a public or private @var{message} to @var{channel}.
+
+Sends a normal text message, as if a user had typed it in.  The
+@var{dest} can be a nickname or a channel.
+@end defun
+
+@defun bot:action channel message
+Send an ``action'' type  @var{message} to @var{channel}
+@end defun
+
+@defun bot:msg nick message
+The same as if a user typed @code{/msg nick message} to their IRC client.
+@end defun
 
 @node Low Level Message Functions,  , High Level Message Functions, Sending Messages
 @subsection ``Low Level'' Message Functions
 
+@c Add a url for rfc2812
 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
-@code{*unspecified*} always, so don't use the return value for anything.
-
-@itemize @bullet
+@code{*unspecified*} always, so don't use the return value for
+anything.
 
-@item @code{bot:send-CTCP to command message}
+@defun bot:send-CTCP to command message
 @code{to} is the target of your CTCP message, @code{command} is the
 CTCP command, and @code{message} is the message (or arguments) of the
 command. Make sure to @code{bot:ctcp-quote} the message!
-
-@end itemize
+@end defun
 
 @node Misc Scripting Stuff,  , Sending Messages, Scripting
 @section Misc. Scripting Stuff
@@ -1029,6 +842,306 @@ If you want to execute code when the bot exits, just do
 argumentless procedure (a thunk). When the bot exits your thunk will
 be called.
 
+@quotation
+[ I didn't know where to put any of these, so I jsut stuck them in
+here.
+
+There probably needs to be several sections added, like dealing with
+users (kicking, added, etc), dealing with the bot (channels, nickname
+of the bot, etc), server issues (serverlist), useful tools (nslookup,
+whois), and do on. ]
+@end quotation
+
+
+@defun bot:adduser nick-or-mask cbannel-mask level prot auto-op
+Adds an user to the userlist, for a @code{nick!user@@host} matching the
+one given, on a channel matching the @var{channelMask} given.
+
+@multitable @columnfractions 0.33 0.33 0.33
+@item The @var{level} can be: @tab The @var{prot} can be:  @tab The @var{auto-op} can be: 
+@item  0 - No level      @tab   0 - No protection @tab  0 - No auto-op
+@item  1 - User          @tab   1 - No ban        @tab  1 - Op on join
+@item  2 - Trusted User  @tab   2 - No kick       @tab
+@item  3 - Friend        @tab   3 - No deop       @tab
+@item  4 - Master        @tab                     @tab
+@end multitable
+
+@end defun
+
+@c (3, 4, 0)
+@defun bot:addserver hostname ip-address [portnumber]
+Adds the server specified by @var{hostname} or @var{ip-address} to
+the server list.
+@end defun
+
+@c (3, 2, 0)
+@defun bot:addshit nick-or-mask channel-mask level [time reason]
+Adds an user to the shitlist, for a nick!user@@host matching the
+one given, on a channel matching the @var{channelMask} given.
+
+@display
+The @var{level} can be:
+  0 - No shit
+  1 - No op
+  2 - Kick and Ban on join
+  3 - Kick and Ban on join, no deban
+@end display
+
+@end defun
+
+@c (2, 0, 0)
+@defun bot:ban channel mask-or-nick
+Bans @var{mask} or @var{nick} from @var{channel}. You need to be a trusted
+user to ban with a @var{mask}.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:change-command-level nick-or-mask channel-mask new-level
+Gives @var{nick} or @var{mask} level @var{new-level} on channel(s)
+@var{channel-mask}. Note that you can not change level for someone
+whose level is greater than yours, and that you can not give a
+level greater than yours.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:cycle channel
+Makes the bot leave and join @var{channel}.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:deban channel mask-or-nick
+Debans @var{mask} or @var{nick} from @var{channel}. You need to be a trusted
+user to deban with a @var{mask}.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:delserver server-number
+Deletes server from server list whose number in the server list
+is @var{server-number}
+@end defun
+
+@c (2, 0, 0)
+@defun bot:deluser nick-or-mask channel-mask
+Removes @var{nick} or @var{mask} from the userlist.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:delshit nick-or-mask channel-mask
+Removes @var{nick} or @var{mask} from the shitlist.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:deop channel mask-or-nick
+Deops @var{mask} or @var{nick} on @var{channel}.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:die reason
+Makes the bot stop immediately.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:do ?
+@end defun
+
+@c (2, 0, 0)
+@defun bot:invite channel nick
+Invites @var{nick} on @var{channel}.
+@end defun
+
+@c (1, 1, 0)
+@defun bot:join channel
+Makes the bot join @var{channel}.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:keep channel modes
+Sets the @var{modes} that the bot will keep for @var{channel}.
+See also STATS.
+@end defun
+
+@c (2, 1, 0)
+@defun bot:kick channel mask-or-nick [reason]
+Kicks @var{mask} or @var{nick} out of @var{channel}, because of @var{reason}.
+You need to be a trusted user to use a @var{mask}.
+@end defun
+
+@c (2, 1, 0)
+@defun bot:kickban channel mask-or-nick [reason]
+Bans then kicks @var{mask} or @var{nick} out of @var{channel},
+because of @var{reason}.
+You need to be a trusted user to use a @var{mask}.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:lock channel
+Locks topic on @var{channel}.
+@end defun
+
+@c (0, 0, 0)
+@defun bot:logport
+[ Probably returns the log port? ]
+@end defun
+
+@c (2, 0, 0)
+@defun bot:mode channel mode-string
+Sends @var{mode-string} as mode for @var{channel}.
+@end defun
+
+@c (0, 0, 0)
+@defun bot:nextserver
+Makes the bot connect to the next server in its server list.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:nick nick
+Makes the bot use nickname @var{nick}.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:op channel nick
+Ops @var{nick} on @var{channel}.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:part channel
+Makes the bot leave @var{channel}.
+@end defun
+
+@c (0, 0, 0)
+@defun bot:reconnect
+Makes the bot reconnect to its current server.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:server server-number
+Select the server to connect to. @var{server-number} is the number of
+the server in the serverlist.
+@end defun
+
+@c (1, 0, 0)
+@defun bot:setfloodrate ?
+@end defun
+
+@c (1, 0, 0)
+@defun bot:setversion ?
+@end defun
+
+@c (3, 0, 0)
+@defun bot:tban channel nick-or-mask time
+Bans @var{nick} or @var{mask} from @var{channel} for @var{time} seconds.
+@end defun
+
+@c (3, 1, 0)
+@defun bot:tkban channel nick-or-mask time [reason]
+Bans @var{nick} or @var{mask} from @var{channel} for @var{time} seconds,
+then kicks him/them because of @var{reason}.
+@end defun
+
+@c (2, 0, 0)
+@defun bot:topic channel topic
+If no @var{topic} is given, prints @var{channel}'s topic. Otherwise,
+the bot will change @var{channel}'s topic to @var{topic}.
+@end defun
+
+@defun bot:unlock channel
+Makes the bot unlock topic on @var{channel}.
+@end defun
+
+@c (0, 0, 0)
+@defun bot:getnickname
+[ Gets the bot's nickname? ]
+@end defun
+
+@c (0, 0, 0)
+@defun bot:getserver
+@end defun
+
+@c (0, 0, 0)
+@defun bot:getserverlist
+@end defun
+
+@c (0, 0, 0)
+@defun bot:flush
+[ Flushes the socket to the server? ]
+@end defun
+
+@c (0, 0, 0)
+@defun bot:flushport
+[ Flushes the log port? ]
+@end defun
+
+@c (1, 0, 0)
+@defun bot:random ?
+[ Returns a random number?  What range?  Why? ]
+@end defun
+
+@c (1, 0, 0)
+@defun bot:delcommand
+[ Probably deletes a command added with @code{bot:addcommand} ? ]
+@end defun
+
+@c (2, 0, 0)
+@defun bot:addtimer ?  ?
+@end defun
+
+@c (1, 0, 0)
+@defun bot:deltimer ?
+@end defun
+
+@c (2, 0, 0)
+@defun bot:dcc-chat-send ? ?
+@end defun
+
+@quotation
+[ And what about the stuff defined in @file{bobot-utils.scm} ? I just
+added it here so it could be somewhere.  There should also be a
+section dealing with modules.  How to use them.  What module scripts
+are in.  What module bobot++ provided primites are in.  And so on. ]
+@end quotation
+
+@defun bot:log . messages
+Write as many @var{messages} as you want to the log.  If the arg is a
+thunk it will be executed and it's output will be written to the log.
+@end defun
+
+@defun bot:load file
+@end defun
+
+@defun bot:load-module module-spec
+@end defun
+
+@defun bot:use-module module-spec
+@end defun
+
+@defun bot:match-not-channel regex
+match-not-channel adds a prefix regex to your @var{regex} so it
+doesn't match the sender or channel in a PUBLIC message
+@end defun
+
+@defun bot:match-to-me regex
+match-to-me matches text that was addressed to the bot with a
+':',  ',',  or nothing after the bot name.
+@end defun
+
+@defun bot:sent-to-me? message
+@end defun
+
+@defun bot:ctcp-quote message
+Returns the CTCP quoted message
+Input @emph{MUST NOT} contain the trailing @code{\r\n}
+(it is added by the message sending code).
+@end defun
+
+
+@defvar %bot:loadpath
+@end defvar
+
+@defun %bot:load-extensions
+@end defun
+
+
+
 @node Concept Index, Function Index, Scripting, Top
 @unnumbered Concept Index
 @printindex cp
index 6a9e6f8..b16ac0f 100644 (file)
@@ -1,4 +1,4 @@
-; -*- guile-scheme -*-
+; -*- scheme -*-
 (use-modules (ice-9 slib))
 
 (require 'coerce)
index 68d9a56..c6340b0 100644 (file)
@@ -32,6 +32,7 @@
 // static class member initial definitions
 Bot * Interp::bot = 0;
 SCM Interp::bot_module = 0;
+
 #ifdef MULTITHREAD
 pthread_mutex_t Interp::mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif
@@ -210,6 +211,7 @@ interp_post_startup_helper (void *bot_module)
   SCM module = static_cast<SCM> (bot_module);
   scm_c_define ("the-bot-module", module);
   scm_c_export ("the-bot-module", 0);
+
   // load bobot-utils
   scm_primitive_load 
     (scm_makfrom0str (String(PREFIX) + 
index 122800e..a262cd5 100644 (file)
@@ -872,6 +872,13 @@ Parser::parseCTCP (ServerConnection * cnx,
   else if (command == "ACTION")
     {
       cnx->bot->botInterp->RunHooks (Hook::ACTION,
+                                    // FIXME: from->getAddress should
+                                    // be nick. MAYBE, depending on
+                                    // whether this could be
+                                    // considered a bug or a feature
+                                    // change to normalize
+                                    // hooks/action with the other
+                                    // hooks. Maybe a 3.0 change?
                                     from->getAddress () + " " + to +
                                     " " + rest,
                                     scm_listify (Utils::