[project @ 2005-06-28 09:54:46 by unknown_lamer]
[clinton/bobotpp.git] / bobot++.texinfo
index c9fd5e9..1349ce1 100644 (file)
@@ -564,7 +564,8 @@ your code to use the new functions.
 @node Adding New Commands, Hooks, Scripting, Scripting
 @section Adding New Commands
 
-Adding a new command is simple. To register a new command use @code{bot:addcommand}.  
+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
 
@@ -598,17 +599,18 @@ This will display ``Hello World!'' if called as @kbd{!hello} and
 @cindex Background on 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.
+added in. A hook is called when a regular expression is matched
+against a message sent to or by the bot.
+
+Bobot++ uses different hook types for each IRC message type, and also
+includes a hook for accessing raw irc messages. Hooks are tagged with
+a priority and a flag that specifies whether to call the next hook
+that matches after calling the current one or to stop
+processing. 
+
+Hooks are processed from the highest to lowest priority, with
+fallthrough hooks of equal priority to non-fallthrough hooks being
+executed first.
 
 @menu
 * Creating a Hook::             
@@ -685,6 +687,10 @@ This hook gets called when someone changes thir nickname from
 @end defun
 
 @defun hooks/disconnect server
+This is called when the bot is disconnected from a server
+unintentionally. @code{hooks/signoff} is called when the bot purposefully
+disconnected. The hook function is passed the hostname of the
+server it was disconnected from.
 @end defun
 
 @defun hooks/flood nick
@@ -812,6 +818,11 @@ Send an ``action'' type  @var{message} to @var{channel}
 The same as if a user typed @code{/msg nick message} to their IRC client.
 @end defun
 
+@defun bot:notice target message
+Sends @var{message} as a NOTICE to @var{target}. @var{target} may be a
+user (nick) or a channel. This returns 0 on success.
+@end defun
+
 @node Low Level Message Functions,  , High Level Message Functions, Sending Messages
 @subsection ``Low Level'' Message Functions
 
@@ -823,12 +834,20 @@ before using these. If you have no idea what these do, read rfc 2812
 @code{*unspecified*} always, so don't use the return value for
 anything.
 
-@defun 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 defun
 
+@defun bot:send-ctcp-reply to command message
+@code{to} is the target of your CTCP reply, @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!
+
+This is used to reply to a ctcp that the bot has received.
+@end defun
+
 @node Misc Scripting Stuff,  , Sending Messages, Scripting
 @section Misc. Scripting Stuff