1 \input texinfo @c -*- texinfo -*-
3 @setfilename bobot++.info
4 @settitle Bobot++: A Schemeable IRC Bot
9 This file documents Bobot++ by Clinton Ebadi and Etienne Bernard
10 (original author, no longer works on program).
12 Copyright 2002 Clinton Ebadi
14 Permission is granted to copy, distribute and/or modify this document
15 under the terms of the GNU Free Documentation License, Version 1.1 or
16 any later version published by the Free Software Foundation; with no
17 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
23 @title Bobot++: A Schemeable IRC Bot
27 @vskip Opt plus 1filll
28 Copyright @copyright{} 2002 Clinton Ebadi
30 Permission is granted to copy, distribute and/or modify this document
31 under the terms of the GNU Free Documentation License, Version 1.1 or
32 any later version published by the Free Software Foundation; with no
33 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
38 @node Top, Introduction, (dir), (dir)
39 @comment node-name, next, previous, up
42 This document describes Bobot++ by Clinton Ebadi and Etienne Bernard
43 (original author, no longer works on program).
45 This document applies to version 2.1.0 of the program named
48 Copyright 2002 Clinton Ebadi
50 Permission is granted to copy, distribute and/or modify this document
51 under the terms of the GNU Free Documentation License, Version 1.1 or
52 any later version published by the Free Software Foundation; with no
53 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
66 @node Introduction, Configuration, Top, Top
69 This manual feels abused and neglected because it has almost no
72 @node Configuration, Scripting, Introduction, Top
73 @chapter Configuration
75 Bobot++ is easy to configure. The configuration file format may be
76 changing in the 2.1 series, so it is not documented for now. See the
77 @file{examples} directory for an example configuration.
80 * Configuration File Syntax::
81 * Configure File Placement::
84 @node Configuration File Syntax, Configure File Placement, Configuration, Configuration
85 @section Configuration File Syntax
89 @node Configure File Placement, , Configuration File Syntax, Configuration
90 @section Configuration File Placement
92 Bobot++ will look in @file{/etc/bobotpp/default/} for its default
93 config if none is specified on the command line. Put the configuration
94 files you want to be loaded by default in this directory. If you are
95 not root or you want to have your own personal configration, put it in
96 @file{~/.bobotpp/config/default/}.
98 @node Scripting, Concept Index, Configuration, Top
101 Bobot++'s most powerful feature is its scripting system. You write
102 scripts using Guile Scheme. This manual does not cover how to use
103 Guile or how to learn Scheme. @xref{Top, , Guile Reference Manual,
104 guile, The Guile Reference Manual}, for the Guile reference manual and
105 @url{http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html} for
106 a good tutorial on Scheme.
108 Note that in previous versions the scripting commands where in the
109 form @code{bot-@var{function}}. They are now in the form
110 @code{bot:@var{function}}. The old names are still available, but are
111 deprecated and will be removed in Bobot++ 2.4. The command
112 @command{perl -pi -e ``s/bot-/bot:/g'' @var{your-files}} should be enough to
113 convert your code to use the new functions.
116 * Adding New Commands::
120 @node Adding New Commands, Hooks, Scripting, Scripting
121 @section Adding New Commands
125 @node Hooks, , Adding New Commands, Scripting
128 Hooks are a powerful feature of Bobot++. Hooks are a hybrid of ircII
129 hooks and tiny fugue (a MUD bot) hooks. The basic idea of a hook if
130 that you match a text against regular expression and call a function
131 if text in a message matches that regex. The different types of hooks
132 provided by Bobot++ correspond to the different classes of messages
133 that Bobot++ can recieve. A Hook also has several properties,
134 including its priority and whether or not it is a fallthrough
135 hook. Higher priority hooks are executed before lower priority hooks
136 and fallthrough hooks are executed before non-fallthrough hooks. A
137 fallthrough hook can match and processing of hooks will continue; as
138 soon as the first non-fallthrough hooks matches processing of hooks
146 @node Creating a Hook, Hook Types, Hooks, Hooks
147 @subsection Creating a Hook
149 To add a new hook you use the function
150 @code{bot:addhook}. @code{bot:addhook} is prototyped as
151 @code{(bot:addhook type regex function pri fall)}. @code{type}
152 specifies the type of hook (the types of hooks are listed in @ref{Hook
153 Types}). @code{regex} is a standard regular expression. If
154 @code{regex} is matched, @code{function} will be
155 called. @code{function} will take a different number of args depending
156 on the hook type. @code{pri} specifies the priority of the
157 hook--higher priority hooks are executed first. This argument is
158 optional and defaults to @code{0}. @code{fall} is @code{#t} if the
159 hook is a fallthrough hook and @code{#f} is the hook is not a
160 fallthrough hook. This arg is also optional and default to @code{#t}.
162 @node Hook Types, , Creating a Hook, Hooks
163 @subsection Hook Types
165 Here is a list of the various hooks are notes on each one. The general
170 @code{hooks/name} (this is the Scheme variable name of the hook)
173 Description of the hook
189 That said, here is the list of available hooks:
196 Description of the hook
208 @code{hooks/nickname}
211 Description of the hook
226 Description of the hook
241 Description of the hook
253 @code{hooks/ctcp-reply}
256 Description of the hook
268 @code{hooks/disconnect}
271 Description of the hook
286 Description of the hook
301 Description of the hook
316 Description of the hook
331 Description of the hook
346 Description of the hook
361 Description of the hook
376 Description of the hook
391 Description of the hook
406 Description of the hook
418 @code{hooks/public-notice}
421 Description of the hook
436 Description of the hook
451 Description of the hook
466 Description of the hook
478 @node Concept Index, Function Index, Scripting, Top
479 @unnumbered Concept Index
482 @node Function Index, Variable Index, Concept Index, Top
483 @unnumbered Function Index
486 @node Variable Index, , Function Index, Top
487 @unnumbered Variable Index