73eb09b336ed4b73c70c8dbc379e68b2349abbab
[clinton/bobotpp.git] / bobot++.info
1 This is bobot++.info, produced by makeinfo version 4.1 from
2 bobot++.texinfo.
3
4 This file documents Bobot++ by Clinton Ebadi and Etienne Bernard
5 (original author, no longer works on program).
6
7 Copyright 2002 Clinton Ebadi
8
9 Permission is granted to copy, distribute and/or modify this document
10 under the terms of the GNU Free Documentation License, Version 1.1 or
11 any later version published by the Free Software Foundation; with no
12 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
13 Texts.
14
15 \1f
16 File: bobot++.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
17
18 This document describes Bobot++ by Clinton Ebadi and Etienne Bernard
19 (original author, no longer works on program).
20
21 This document applies to version 2.1.0 of the program named Bobot++
22
23 Copyright 2002 Clinton Ebadi
24
25 Permission is granted to copy, distribute and/or modify this document
26 under the terms of the GNU Free Documentation License, Version 1.1 or
27 any later version published by the Free Software Foundation; with no
28 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
29 Texts.
30
31 * Menu:
32
33 * Introduction::
34 * Configuration::
35 * Scripting::
36 * Concept Index::
37 * Function Index::
38 * Variable Index::
39
40 \1f
41 File: bobot++.info, Node: Introduction, Next: Configuration, Prev: Top, Up: Top
42
43 Introduction
44 ************
45
46 This manual feels abused and neglected because it has almost no
47 content.
48
49 \1f
50 File: bobot++.info, Node: Configuration, Next: Scripting, Prev: Introduction, Up: Top
51
52 Configuration
53 *************
54
55 Bobot++ is easy to configure. The configuration file format may be
56 changing in the 2.1 series, so it is not documented for now. See the
57 `examples' directory for an example configuration.
58
59 * Menu:
60
61 * Configuration File Syntax::
62 * Configure File Placement::
63
64 \1f
65 File: bobot++.info, Node: Configuration File Syntax, Next: Configure File Placement, Prev: Configuration, Up: Configuration
66
67 Configuration File Syntax
68 =========================
69
70 Not here yet.
71
72 \1f
73 File: bobot++.info, Node: Configure File Placement, Prev: Configuration File Syntax, Up: Configuration
74
75 Configuration File Placement
76 ============================
77
78 Bobot++ will look in `/etc/bobotpp/default/' for its default config
79 if none is specified on the command line. Put the configuration files
80 you want to be loaded by default in this directory. If you are not root
81 or you want to have your own personal configration, put it in
82 `~/.bobotpp/config/default/'.
83
84 \1f
85 File: bobot++.info, Node: Scripting, Next: Concept Index, Prev: Configuration, Up: Top
86
87 Scripting
88 *********
89
90 Bobot++'s most powerful feature is its scripting system. You write
91 scripts using Guile Scheme. This manual does not cover how to use Guile
92 or how to learn Scheme. *Note Guile Reference Manual: (guile)Top, for
93 the Guile reference manual and
94 <http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html> for a
95 good tutorial on Scheme.
96
97 Note that in previous versions the scripting commands where in the
98 form `bot-FUNCTION'. They are now in the form `bot:FUNCTION'. The old
99 names are still available, but are deprecated and will be removed in
100 Bobot++ 2.4. The command `perl -pi -e ``s/bot-/bot:/g'' YOUR-FILES'
101 should be enough to convert your code to use the new functions.
102
103 * Menu:
104
105 * Adding New Commands::
106 * Hooks::
107
108 \1f
109 File: bobot++.info, Node: Adding New Commands, Next: Hooks, Prev: Scripting, Up: Scripting
110
111 Adding New Commands
112 ===================
113
114 Not here yet.
115
116 \1f
117 File: bobot++.info, Node: Hooks, Prev: Adding New Commands, Up: Scripting
118
119 Hooks
120 =====
121
122 Hooks are a powerful feature of Bobot++. Hooks are a hybrid of ircII
123 hooks and tiny fugue (a MUD bot) hooks. The basic idea of a hook if
124 that you match a text against regular expression and call a function if
125 text in a message matches that regex. The different types of hooks
126 provided by Bobot++ correspond to the different classes of messages
127 that Bobot++ can recieve. A Hook also has several properties, including
128 its priority and whether or not it is a fallthrough hook. Higher
129 priority hooks are executed before lower priority hooks and fallthrough
130 hooks are executed before non-fallthrough hooks. A fallthrough hook can
131 match and processing of hooks will continue; as soon as the first
132 non-fallthrough hooks matches processing of hooks stops.
133
134 * Menu:
135
136 * Creating a Hook::
137 * Hook Types::
138
139 \1f
140 File: bobot++.info, Node: Creating a Hook, Next: Hook Types, Prev: Hooks, Up: Hooks
141
142 Creating a Hook
143 ---------------
144
145 To add a new hook you use the function `bot:addhook'. `bot:addhook'
146 is prototyped as `(bot:addhook type regex function pri fall)'. `type'
147 specifies the type of hook (the types of hooks are listed in *Note Hook
148 Types::). `regex' is a standard regular expression. If `regex' is
149 matched, `function' will be called. `function' will take a different
150 number of args depending on the hook type. `pri' specifies the priority
151 of the hook-higher priority hooks are executed first. This argument is
152 optional and defaults to `0'. `fall' is `#t' if the hook is a
153 fallthrough hook and `#f' is the hook is not a fallthrough hook. This
154 arg is also optional and default to `#t'.
155
156 \1f
157 File: bobot++.info, Node: Hook Types, Prev: Creating a Hook, Up: Hooks
158
159 Hook Types
160 ----------
161
162 Here is a list of the various hooks are notes on each one. The
163 general format of a hook is:
164
165 * `hooks/name' (this is the Scheme variable name of the hook)
166 - Description of the hook
167
168 - # of args
169 - `arg1': desc
170
171 - `arg2': desc
172
173 - ...
174
175 - `argN': desc
176
177 That said, here is the list of available hooks:
178
179 * `hooks/action'
180 - Description of the hook
181
182 - # of args
183 - `arg1': desc
184
185
186 * `hooks/nickname'
187 - Description of the hook
188
189 - # of args
190 - `arg1': desc
191
192
193 * `hooks/signoff'
194 - Description of the hook
195
196 - # of args
197 - `arg1': desc
198
199
200 * `hooks/ctcp'
201 - Description of the hook
202
203 - # of args
204 - `arg1': desc
205
206
207 * `hooks/ctcp-reply'
208 - Description of the hook
209
210 - # of args
211 - `arg1': desc
212
213
214 * `hooks/disconnect'
215 - Description of the hook
216
217 - # of args
218 - `arg1': desc
219
220
221 * `hooks/flood'
222 - Description of the hook
223
224 - # of args
225 - `arg1': desc
226
227
228 * `hooks/invite'
229 - Description of the hook
230
231 - # of args
232 - `arg1': desc
233
234
235 * `hooks/join'
236 - Description of the hook
237
238 - # of args
239 - `arg1': desc
240
241
242 * `hooks/kick'
243 - Description of the hook
244
245 - # of args
246 - `arg1': desc
247
248
249 * `hooks/part'
250 - Description of the hook
251
252 - # of args
253 - `arg1': desc
254
255
256 * `hooks/mode'
257 - Description of the hook
258
259 - # of args
260 - `arg1': desc
261
262
263 * `hooks/message'
264 - Description of the hook
265
266 - # of args
267 - `arg1': desc
268
269
270 * `hooks/notice'
271 - Description of the hook
272
273 - # of args
274 - `arg1': desc
275
276
277 * `hooks/public'
278 - Description of the hook
279
280 - # of args
281 - `arg1': desc
282
283
284 * `hooks/public-notice'
285 - Description of the hook
286
287 - # of args
288 - `arg1': desc
289
290
291 * `hooks/raw'
292 - Description of the hook
293
294 - # of args
295 - `arg1': desc
296
297
298 * `hooks/timer'
299 - Description of the hook
300
301 - # of args
302 - `arg1': desc
303
304
305 * `hooks/topic'
306 - Description of the hook
307
308 - # of args
309 - `arg1': desc
310
311
312 \1f
313 File: bobot++.info, Node: Concept Index, Next: Function Index, Prev: Scripting, Up: Top
314
315 Concept Index
316 *************
317
318 * Menu:
319 \1f
320 File: bobot++.info, Node: Function Index, Next: Variable Index, Prev: Concept Index, Up: Top
321
322 Function Index
323 **************
324
325 * Menu:
326 \1f
327 File: bobot++.info, Node: Variable Index, Prev: Function Index, Up: Top
328
329 Variable Index
330 **************
331
332 * Menu:
333
334 \1f
335 Tag Table:
336 Node: Top\7f517
337 Node: Introduction\7f1228
338 Node: Configuration\7f1419
339 Node: Configuration File Syntax\7f1801
340 Node: Configure File Placement\7f2003
341 Node: Scripting\7f2477
342 Node: Adding New Commands\7f3316
343 Node: Hooks\7f3473
344 Node: Creating a Hook\7f4363
345 Node: Hook Types\7f5153
346 Node: Concept Index\7f7626
347 Node: Function Index\7f7758
348 Node: Variable Index\7f7897
349 \1f
350 End Tag Table