~ubuntu-branches/ubuntu/oneiric/eggdrop/oneiric

« back to all changes in this revision

Viewing changes to doc/html/tcl-commands.html

  • Committer: Bazaar Package Importer
  • Author(s): Guilherme de S. Pastore
  • Date: 2004-06-17 09:15:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040617091528-64rrw1sa33lkfhmh
Tags: 1.6.16-2
* Fixed typo on README.Debian
* Fixed hyphens in manual page
* Converted debian/rules to CDBS
* Set path to binary on example config file
* Changed LANGDIR on src/eggdrop.h (Closes: #254824)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 
2
<!-- $Id: tcl-commands.html,v 1.39 2004/05/27 01:30:11 wcc Exp $ -->
 
3
 
 
4
<html>
 
5
  <head>
 
6
    <title>Eggdrop Documentation: Eggdrop Tcl Commands</title>
 
7
  </head>
 
8
 
 
9
  <body>
 
10
    <div align="center">
 
11
      <p><strong>Eggdrop Tcl Commands</strong></p>
 
12
    </div>
 
13
    <hr>
 
14
 
 
15
    <p>This is an exhaustive list of all the Tcl commands added to Eggdrop.
 
16
    All of the normal Tcl built-in commands are still there, of course, but
 
17
    you can also use these to manipulate features of the bot. They are listed
 
18
    according to category.</p>
 
19
 
 
20
    <p>This list is accurate for Eggdrop v1.6.16. Scripts written for
 
21
    v1.3/v1.4 series of Eggdrop should probably work with a few minor
 
22
    modifications depending on the script. Scripts which were written for
 
23
    v0.9, v1.0, v1.1 or v1.2 will probably not work without modification.
 
24
    Commands which have been changed in this version of Eggdrop (or are
 
25
    just new commands) are marked with an asterisk (*).</p>
 
26
 
 
27
    <blockquote>
 
28
      <ol>
 
29
        <li><a href="#output">Output commands</a></li>
 
30
 
 
31
        <li><a href="#urmc">User record manipulation commands</a></li>
 
32
 
 
33
        <li><a href="#chancmds">Channel commands</a></li>
 
34
 
 
35
        <li><a href="#dcccmds">DCC commands</a></li>
 
36
 
 
37
        <li><a href="#notes">Notes module</a></li>
 
38
 
 
39
        <li><a href="#assoc">Assoc module</a></li>
 
40
 
 
41
        <li><a href="#compress">Compress module</a></li>
 
42
 
 
43
        <li><a href="#filesys">Filesys module</a></li>
 
44
 
 
45
        <li><a href="#misc">Miscellaneous commands</a></li>
 
46
 
 
47
        <li><a href="#globvars">Global variables</a></li>
 
48
 
 
49
        <li>
 
50
          <a href="#bind">Bind</a>
 
51
 
 
52
          <ol type="a">
 
53
            <li><a href="#binda">Bind types</a></li>
 
54
 
 
55
            <li><a href="#bindb">Return values</a></li>
 
56
          </ol>
 
57
        </li>
 
58
 
 
59
        <li><a href="#control">Control procedures</a></li>
 
60
 
 
61
        <li><a href="#tcp">TCP connections</a></li>
 
62
 
 
63
        <li><a href="#matchchars">Match characters</a></li>
 
64
      </ol>
 
65
    </blockquote>
 
66
    <hr>
 
67
 
 
68
    <p><a name="output"></a>1. <strong>Output commands</strong></p>
 
69
 
 
70
    <blockquote>
 
71
      <dl>
 
72
        <dt><strong>putserv &lt;text&gt; [options]</strong></dt>
 
73
 
 
74
        <dd>
 
75
          <p><strong>Description:</strong> sends text to the server, like
 
76
          &#39;.dump&#39; (intended for direct server commands); output is
 
77
          queued so that the bot won&#39;t flood itself off the server.</p>
 
78
 
 
79
          <p><strong>Options:</strong></p>
 
80
 
 
81
          <blockquote>
 
82
            <p><strong>-next</strong>: push messages to the front of the
 
83
            queue<br>
 
84
            <strong>-normal</strong>: no effect</p>
 
85
          </blockquote>
 
86
 
 
87
          <p><strong>Returns:</strong> nothing</p>
 
88
 
 
89
          <p><strong>Module:</strong> server</p>
 
90
        </dd>
 
91
 
 
92
        <dt><strong>puthelp &lt;text&gt; [options]</strong></dt>
 
93
 
 
94
        <dd>
 
95
          <p><strong>Description:</strong> sends text to the server, like
 
96
          &#39;putserv&#39;, but it uses a different queue intended for
 
97
          sending messages to channels or people.</p>
 
98
 
 
99
          <p><strong>Options:</strong></p>
 
100
 
 
101
          <blockquote>
 
102
            <p><strong>-next</strong>: push messages to the front of the
 
103
            queue<br>
 
104
            <strong>-normal</strong>: no effect</p>
 
105
          </blockquote>
 
106
 
 
107
          <p><strong>Returns:</strong> nothing</p>
 
108
 
 
109
          <p><strong>Module:</strong> server</p>
 
110
        </dd>
 
111
 
 
112
        <dt><strong>putquick &lt;text&gt; [options]</strong></dt>
 
113
 
 
114
        <dd>
 
115
          <p><strong>Description:</strong> sends text to the server, like
 
116
          &#39;putserv&#39;, but it uses a different (and faster) queue.</p>
 
117
 
 
118
          <p><strong>Options:</strong></p>
 
119
 
 
120
          <blockquote>
 
121
            <p><strong>-next</strong>: push messages to the front of the
 
122
            queue<br>
 
123
            <strong>-normal</strong>: no effect</p>
 
124
          </blockquote>
 
125
 
 
126
          <p><strong>Returns:</strong> nothing</p>
 
127
 
 
128
          <p><strong>Module:</strong> server</p>
 
129
        </dd>
 
130
 
 
131
        <dt><strong>putkick &lt;channel&gt; &lt;nick,nick,...&gt;
 
132
        [reason]</strong></dt>
 
133
 
 
134
        <dd>
 
135
          <p><strong>Description:</strong> sends kicks to the server and
 
136
          tries to put as many nicks into one kick command as possible.</p>
 
137
 
 
138
          <p><strong>Returns:</strong> nothing</p>
 
139
 
 
140
          <p><strong>Module:</strong> irc</p>
 
141
        </dd>
 
142
 
 
143
        <dt><strong>putlog &lt;text&gt;</strong></dt>
 
144
 
 
145
        <dd>
 
146
          <p><strong>Description:</strong> sends text to the bot&#39;s
 
147
          logfile, marked as &#39;misc&#39; (o)</p>
 
148
 
 
149
          <p><strong>Returns:</strong> nothing</p>
 
150
 
 
151
          <p><strong>Module:</strong> core</p>
 
152
        </dd>
 
153
 
 
154
        <dt><strong>putcmdlog &lt;text&gt;</strong></dt>
 
155
 
 
156
        <dd>
 
157
          <p><strong>Description:</strong> sends text to the bot&#39;s
 
158
          logfile, marked as &#39;command&#39; (c)</p>
 
159
 
 
160
          <p><strong>Returns:</strong> nothing</p>
 
161
 
 
162
          <p><strong>Module:</strong> core</p>
 
163
        </dd>
 
164
 
 
165
        <dt><strong>putxferlog &lt;text&gt;</strong></dt>
 
166
 
 
167
        <dd>
 
168
          <p><strong>Description:</strong> sends text to the bot&#39;s
 
169
          logfile, marked as &#39;file-area&#39; (x)</p>
 
170
 
 
171
          <p><strong>Returns:</strong> nothing</p>
 
172
 
 
173
          <p><strong>Module:</strong> core</p>
 
174
        </dd>
 
175
 
 
176
        <dt><strong>putloglev &lt;level(s)&gt; &lt;channel&gt;
 
177
        &lt;text&gt;</strong></dt>
 
178
 
 
179
        <dd>
 
180
          <p><strong>Description:</strong> sends text to the bot&#39;s
 
181
          logfile, tagged with all of the valid levels given. Use
 
182
          &quot;*&quot; to indicate all log levels.</p>
 
183
 
 
184
          <p><strong>Returns:</strong> nothing</p>
 
185
 
 
186
          <p><strong>Module:</strong> core</p>
 
187
        </dd>
 
188
 
 
189
        <dt><strong>dumpfile &lt;nick&gt; &lt;filename&gt;</strong></dt>
 
190
 
 
191
        <dd>
 
192
          <p><strong>Description:</strong> dumps file from the help/text
 
193
          directory to a user on IRC via msg (one line per msg). The user
 
194
          has no flags, so the flag bindings won&#39;t work within the
 
195
          file.</p>
 
196
 
 
197
          <p><strong>Returns:</strong> nothing</p>
 
198
 
 
199
          <p><strong>Module:</strong> core</p>
 
200
        </dd>
 
201
 
 
202
        <dt><strong>queuesize [queue]</strong></dt>
 
203
 
 
204
        <dd>
 
205
          <p><strong>Returns:</strong> the number of messages in all queues.
 
206
          If a queue is specified, only the size of this queue is returned.
 
207
          Valid queues are: mode, server, help.</p>
 
208
 
 
209
          <p><strong>Module:</strong> server</p>
 
210
        </dd>
 
211
 
 
212
        <dt><strong>clearqueue &lt;queue&gt;</strong></dt>
 
213
 
 
214
        <dd>
 
215
          <p><strong>Description:</strong> removes all messages from a
 
216
          queue. Valid arguments are: mode, server, help, or all.</p>
 
217
 
 
218
          <p><strong>Returns:</strong> the number of deleted lines from
 
219
          the specified queue.</p>
 
220
 
 
221
          <p><strong>Module:</strong> server</p>
 
222
        </dd>
 
223
      </dl>
 
224
    </blockquote>
 
225
 
 
226
    <p><a name="urmc"></a>2. <strong>User record manipulation
 
227
    commands</strong></p>
 
228
 
 
229
    <blockquote>
 
230
      <dl>
 
231
        <dt><strong>countusers</strong></dt>
 
232
 
 
233
        <dd>
 
234
          <p><strong>Returns:</strong> number of users in the bot&#39;s
 
235
          database</p>
 
236
 
 
237
          <p><strong>Module:</strong> core</p>
 
238
        </dd>
 
239
 
 
240
        <dt><strong>validuser &lt;handle&gt;</strong></dt>
 
241
 
 
242
        <dd>
 
243
          <p><strong>Returns:</strong> 1 if a user by that name exists;
 
244
          0 otherwise</p>
 
245
 
 
246
          <p><strong>Module:</strong> core</p>
 
247
        </dd>
 
248
 
 
249
        <dt><strong>finduser &lt;nick!user@host&gt;</strong></dt>
 
250
 
 
251
        <dd>
 
252
          <p><strong>Description:</strong> finds the user record which most
 
253
          closely matches the given nick!user@host</p>
 
254
 
 
255
          <p><strong>Returns:</strong> the handle found, or &quot;*&quot;
 
256
          if none</p>
 
257
 
 
258
          <p><strong>Module:</strong> core</p>
 
259
        </dd>
 
260
 
 
261
        <dt><strong>userlist [flags]</strong></dt>
 
262
 
 
263
        <dd>
 
264
          <p><strong>Returns:</strong> a list of users on the bot. You
 
265
          can use the flag matching system here
 
266
          ([global]{&amp;/|}[chan]{&amp;/|}[bot]). &#39;&amp;&#39; specifies
 
267
          &quot;and&quot;; &#39;|&#39; specifies &quot;or&quot;.</p>
 
268
 
 
269
          <p><strong>Module:</strong> core</p>
 
270
        </dd>
 
271
 
 
272
        <dt><strong>passwdok &lt;handle&gt; &lt;pass&gt;</strong></dt>
 
273
 
 
274
        <dd>
 
275
          <p><strong>Description:</strong> checks the password given against
 
276
          the user&#39;s password. Check against the password &quot;&quot;
 
277
          (a blank string) or &quot;-&quot; to find out if a user has no
 
278
          password set.</p>
 
279
 
 
280
          <p><strong>Returns:</strong> 1 if the password matches for that
 
281
          user; 0 otherwise</p>
 
282
 
 
283
          <p><strong>Module:</strong> core</p>
 
284
        </dd>
 
285
 
 
286
        <dt><strong>getuser &lt;handle&gt; &lt;entry-type&gt;
 
287
        [extra info]</strong></dt>
 
288
 
 
289
        <dd>
 
290
          <p><strong>Description:</strong> an interface to the new generic
 
291
          userfile support. Valid entry types are:</p>
 
292
 
 
293
          <blockquote>
 
294
            <table>
 
295
              <tr valign="top">
 
296
                <td>
 
297
                  <p><strong>BOTFL</strong></p>
 
298
                </td>
 
299
 
 
300
                <td>
 
301
                  <p>returns the current bot-specific flags for the user
 
302
                  (bot-only)</p>
 
303
                </td>
 
304
              </tr>
 
305
 
 
306
              <tr valign="top">
 
307
                <td>
 
308
                  <p><strong>BOTADDR</strong></p>
 
309
                </td>
 
310
 
 
311
                <td>
 
312
                  <p>returns a list containing the bot&#39;s address, telnet
 
313
                  port, and relay port (bot-only)</p>
 
314
                </td>
 
315
              </tr>
 
316
 
 
317
              <tr valign="top">
 
318
                <td>
 
319
                  <p><strong>HOSTS</strong></p>
 
320
                </td>
 
321
 
 
322
                <td>
 
323
                  <p>returns a list of hosts for the user</p>
 
324
                </td>
 
325
              </tr>
 
326
 
 
327
              <tr valign="top">
 
328
                <td>
 
329
                  <p><strong>LASTON</strong></p>
 
330
                </td>
 
331
 
 
332
                <td>
 
333
                  <p>returns a list containing the unixtime last seen and
 
334
                  the last seen place. LASTON #channel returns the time
 
335
                  last seen time for the channel or 0 if no info exists.</p>
 
336
                </td>
 
337
              </tr>
 
338
 
 
339
              <tr valign="top">
 
340
                <td>
 
341
                  <p><strong>INFO</strong></p>
 
342
                </td>
 
343
 
 
344
                <td>
 
345
                  <p>returns the user&#39;s global info line</p>
 
346
                </td>
 
347
              </tr>
 
348
 
 
349
              <tr valign="top">
 
350
                <td>
 
351
                  <p><strong>XTRA</strong></p>
 
352
                </td>
 
353
 
 
354
                <td>
 
355
                  <p>returns the user&#39;s XTRA info</p>
 
356
                </td>
 
357
              </tr>
 
358
 
 
359
              <tr valign="top">
 
360
                <td>
 
361
                  <p><strong>COMMENT</strong></p>
 
362
                </td>
 
363
 
 
364
                <td>
 
365
                  <p>returns the master-visible only comment for the user</p>
 
366
                </td>
 
367
              </tr>
 
368
 
 
369
              <tr valign="top">
 
370
                <td>
 
371
                  <p><strong>EMAIL</strong></p>
 
372
                </td>
 
373
 
 
374
                <td>
 
375
                  <p>returns the user&#39;s e-mail address</p>
 
376
                </td>
 
377
              </tr>
 
378
 
 
379
              <tr valign="top">
 
380
                <td>
 
381
                  <p><strong>URL</strong></p>
 
382
                </td>
 
383
 
 
384
                <td>
 
385
                  <p>returns the user&#39;s url</p>
 
386
                </td>
 
387
              </tr>
 
388
 
 
389
              <tr valign="top">
 
390
                <td>
 
391
                  <p><strong>HANDLE</strong></p>
 
392
                </td>
 
393
 
 
394
                <td>
 
395
                  <p>returns the user&#39;s handle as it is saved in the
 
396
                  userfile</p>
 
397
                </td>
 
398
              </tr>
 
399
 
 
400
              <tr valign="top">
 
401
                <td>
 
402
                  <p><strong>PASS</strong></p>
 
403
                </td>
 
404
 
 
405
                <td>
 
406
                  <p>returns the user&#39;s encrypted password</p>
 
407
                </td>
 
408
              </tr>
 
409
            </table>
 
410
          </blockquote>
 
411
 
 
412
          <p><strong>Returns:</strong> info specific to each entry-type</p>
 
413
 
 
414
          <p><strong>Module:</strong> core</p>
 
415
        </dd>
 
416
 
 
417
        <dt><strong>setuser &lt;handle&gt; &lt;entry-type&gt;
 
418
        [extra info]</strong></dt>
 
419
 
 
420
        <dd>
 
421
          <p><strong>Description:</strong> this is the counterpart of
 
422
          getuser. It lets you set the various values. Other then the ones
 
423
          listed below, the entry-types are the same as getuser&#39;s.</p>
 
424
 
 
425
          <blockquote>
 
426
            <table>
 
427
              <tr valign="top">
 
428
                <td>
 
429
                  <p><strong>HOSTS</strong></p>
 
430
                </td>
 
431
 
 
432
                <td>
 
433
                  <p>if used with no third arg, all hosts for the user will
 
434
                  be cleared. Otherwise, *1* hostmask is added :P</p>
 
435
                </td>
 
436
              </tr>
 
437
 
 
438
              <tr valign="top">
 
439
                <td>
 
440
                  <p><strong>LASTON</strong></p>
 
441
                </td>
 
442
 
 
443
                <td>
 
444
                  <p>This setting has 3 forms. &quot;setuser &lt;handle&gt;
 
445
                  LASTON &lt;unixtime&gt; &lt;place&gt;&quot; sets global
 
446
                  LASTON time, &quot;setuser &lt;handle&gt; LASTON
 
447
                  &lt;unixtime&gt;&quot; sets global LASTON time (leaving the
 
448
                  place field empty), and &quot;setuser &lt;handle&gt; LASTON
 
449
                  &lt;unixtime&gt; &lt;channel&gt;&quot; sets a users LASTON
 
450
                  time for a channel (if it is a  valid channel).</p>
 
451
                </td>
 
452
              </tr>
 
453
 
 
454
              <tr valign="top">
 
455
                <td>
 
456
                  <p><strong>PASS</strong></p>
 
457
                </td>
 
458
 
 
459
                <td>
 
460
                  <p>sets a users password (no third arg will clear it)</p>
 
461
                </td>
 
462
              </tr>
 
463
            </table>
 
464
          </blockquote>
 
465
 
 
466
          <p><strong>Returns:</strong> nothing</p>
 
467
 
 
468
          <p><strong>Module:</strong> core</p>
 
469
        </dd>
 
470
 
 
471
        <dt><strong>chhandle &lt;old-handle&gt;
 
472
        &lt;new-handle&gt;</strong></dt>
 
473
 
 
474
        <dd>
 
475
          <p><strong>Description:</strong> changes a user&#39;s handle</p>
 
476
 
 
477
          <p><strong>Returns:</strong> 1 on success; 0 if the new handle is
 
478
          invalid or already used, or if the user can&#39;t be found</p>
 
479
 
 
480
          <p><strong>Module:</strong> core</p>
 
481
        </dd>
 
482
 
 
483
        <dt><strong>chattr &lt;handle&gt; [changes [channel]]</strong></dt>
 
484
 
 
485
        <dd>
 
486
          <p><strong>Description:</strong> changes the attributes for a user
 
487
          record, if you include any. Changes are of the form &#39;+f&#39;,
 
488
          &#39;-o&#39;, &#39;+dk&#39;, &#39;-o+d&#39;, etc. If changes are
 
489
          specified in the format of &lt;changes&gt; &lt;channel&lt;, the
 
490
          channel-specific flags for that channel are altered. You can now
 
491
          use the +o|-o #channel format here too.</p>
 
492
 
 
493
          <p><strong>Returns:</strong>  new flags for the user (if you made
 
494
          no changes, the current flags are returned). If a channel was
 
495
          specified, the global AND the channel-specific flags for that
 
496
          channel are returned in the format of globalflags|channelflags.
 
497
          &quot;*&quot; is returned if the specified user does not exist.</p>
 
498
 
 
499
          <p><strong>Module:</strong> core</p>
 
500
        </dd>
 
501
 
 
502
        <dt><strong>botattr &lt;handle&gt; [changes [channel]]</strong></dt>
 
503
 
 
504
        <dd>
 
505
          <p><strong>Description:</strong> similar to chattr except this
 
506
          modifies bot flags rather than normal user attributes.</p>
 
507
 
 
508
          <p><strong>Returns:</strong>  new flags for the bot (if you made
 
509
          no changes, the current flags are returned). If a channel was
 
510
          specified, the global AND the channel-specific flags for that
 
511
          channel are returned in the format of globalflags|channelflags.
 
512
          &quot;*&quot; is returned if the specified bot does not exist.</p>
 
513
 
 
514
          <p><strong>Module:</strong> core</p>
 
515
        </dd>
 
516
 
 
517
        <dt><strong>matchattr &lt;handle&gt; &lt;flags&gt;
 
518
        [channel]</strong></dt>
 
519
 
 
520
        <dd>
 
521
          <p><strong>Returns:</strong> 1 if the specified user has the
 
522
          specified flags; 0 otherwise</p>
 
523
 
 
524
          <p><strong>Module:</strong> core</p>
 
525
        </dd>
 
526
 
 
527
        <dt><strong>adduser &lt;handle&gt; [hostmask]</strong></dt>
 
528
 
 
529
        <dd>
 
530
          <p><strong>Description:</strong> creates a new user entry with the
 
531
          handle and hostmask given (with no password and the default
 
532
          flags)</p>
 
533
 
 
534
          <p><strong>Returns:</strong> 1 if successful; 0 if the handle
 
535
          already exists</p>
 
536
 
 
537
          <p><strong>Module:</strong> core</p>
 
538
        </dd>
 
539
 
 
540
        <dt><strong>addbot &lt;handle&gt; &lt;address&gt;</strong></dt>
 
541
 
 
542
        <dd>
 
543
          <p><strong>Description:</strong> adds a new bot to the userlist
 
544
          with the handle and bot address given (with no password and no
 
545
          flags)</p>
 
546
 
 
547
          <p><strong>Returns:</strong> 1 if successful; 0 if the bot
 
548
          already exists</p>
 
549
 
 
550
          <p><strong>Module:</strong> core</p>
 
551
        </dd>
 
552
 
 
553
        <dt><strong>deluser &lt;handle&gt;</strong></dt>
 
554
 
 
555
        <dd>
 
556
          <p><strong>Description:</strong> attempts to erase the user record
 
557
          for a handle</p>
 
558
 
 
559
          <p><strong>Returns:</strong> 1 if successful, 0 if no such user
 
560
          exists</p>
 
561
 
 
562
          <p><strong>Module:</strong> core</p>
 
563
        </dd>
 
564
 
 
565
        <dt><strong>delhost &lt;handle&gt; &lt;hostmask&gt;</strong></dt>
 
566
 
 
567
        <dd>
 
568
          <p><strong>Description:</strong> deletes a hostmask from a
 
569
          user&#39;s host list</p>
 
570
 
 
571
          <p><strong>Returns:</strong> 1 on success; 0 if the hostmask (or
 
572
          user) doesn&#39;t exist</p>
 
573
 
 
574
          <p><strong>Module:</strong> core</p>
 
575
        </dd>
 
576
 
 
577
        <dt><strong>addchanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
 
578
 
 
579
        <dd>
 
580
          <p><strong>Description:</strong> adds a channel record for a
 
581
          user</p>
 
582
 
 
583
          <p><strong>Returns:</strong> 1 on success; 0 if the user or channel
 
584
          does not exist</p>
 
585
 
 
586
          <p><strong>Module:</strong> channels</p>
 
587
        </dd>
 
588
 
 
589
        <dt><strong>delchanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
 
590
 
 
591
        <dd>
 
592
          <p><strong>Description:</strong> removes a channel record for a
 
593
          user. This includes all associated channel flags.</p>
 
594
 
 
595
          <p><strong>Returns:</strong> 1 on success; 0 if the user or channel
 
596
          does not exist</p>
 
597
 
 
598
          <p><strong>Module:</strong> channels</p>
 
599
        </dd>
 
600
 
 
601
        <dt><strong>haschanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
 
602
 
 
603
        <dd>
 
604
          <p><strong>Returns:</strong> 1 if the given handle has a chanrec
 
605
          for the specified channel; 0 otherwise</p>
 
606
 
 
607
          <p><strong>Module:</strong> channels</p>
 
608
        </dd>
 
609
 
 
610
        <dt><strong>getchaninfo &lt;handle&gt; &lt;channel&gt;</strong></dt>
 
611
 
 
612
        <dd>
 
613
          <p><strong>Returns:</strong> info line for a specific channel
 
614
          (behaves just like &#39;getinfo&#39;)</p>
 
615
 
 
616
          <p><strong>Module:</strong> channels</p>
 
617
        </dd>
 
618
 
 
619
        <dt><strong>setchaninfo &lt;handle&gt; &lt;channel&gt;
 
620
        &lt;info&gt;</strong></dt>
 
621
 
 
622
        <dd>
 
623
          <p><strong>Description:</strong> sets the info line on a specific
 
624
          channel for a user. If info is &quot;none&quot;, it will be
 
625
          removed.</p>
 
626
 
 
627
          <p><strong>Returns:</strong> nothing</p>
 
628
 
 
629
          <p><strong>Module:</strong> channels</p>
 
630
        </dd>
 
631
 
 
632
        <dt><strong>newchanban &lt;channel&gt; &lt;ban&gt; &lt;creator&gt;
 
633
        &lt;comment&gt; [lifetime] [options]</strong></dt>
 
634
 
 
635
        <dd>
 
636
          <p><strong>Description:</strong> adds a ban to the ban list of a
 
637
          channel; creator is given credit for the ban in the ban list.
 
638
          lifetime is specified in minutes. If lifetime is not specified,
 
639
          ban-time (usually 60) is used. Setting the lifetime to 0 makes
 
640
          it a permanent ban.</p>
 
641
 
 
642
          <p><strong>Options:</strong></p>
 
643
 
 
644
          <blockquote>
 
645
            <p><strong>sticky</strong>: forces the ban to be always active
 
646
            on a channel, even with dynamicbans on<br>
 
647
            <strong>none</strong>: no effect</p>
 
648
          </blockquote>
 
649
 
 
650
          <p><strong>Returns:</strong> nothing</p>
 
651
 
 
652
          <p><strong>Module:</strong> channels</p>
 
653
        </dd>
 
654
 
 
655
        <dt><strong>newban &lt;ban&gt; &lt;creator&gt; &lt;comment&gt;
 
656
        [lifetime] [options]</strong></dt>
 
657
 
 
658
        <dd>
 
659
          <p><strong>Description:</strong> adds a ban to the global ban list
 
660
          (which takes effect on all channels); creator is given credit for
 
661
          the ban in the ban list. lifetime is specified in minutes. If
 
662
          lifetime is not specified, global-ban-time (usually 60) is used.
 
663
          Setting the lifetime to 0 makes it a permanent ban.</p>
 
664
 
 
665
          <p><strong>Options:</strong></p>
 
666
 
 
667
          <blockquote>
 
668
            <p><strong>sticky</strong>: forces the ban to be always active
 
669
            on a channel, even with dynamicbans on<br>
 
670
            <strong>none</strong>: no effect</p>
 
671
          </blockquote>
 
672
 
 
673
          <p><strong>Returns:</strong> nothing</p>
 
674
 
 
675
          <p><strong>Module:</strong> channels</p>
 
676
        </dd>
 
677
 
 
678
        <dt><strong>newchanexempt &lt;channel&gt; &lt;exempt&gt;
 
679
        &lt;creator&gt; &lt;comment&gt; [lifetime] [options]</strong></dt>
 
680
 
 
681
        <dd>
 
682
          <p><strong>Description:</strong> adds a exempt to the exempt list
 
683
          of a channel; creator is given credit for the exempt in the exempt
 
684
          list. lifetime is specified in minutes. If lifetime is not
 
685
          specified, exempt-time (usually 60) is used. Setting the lifetime
 
686
          to 0 makes it a permanent exempt. The exempt will not be removed
 
687
          until the corresponding ban has been removed. For timed bans,
 
688
          once the time period has expired, the exempt will not be removed
 
689
          until the corresponding ban has either expired or been removed.</p>
 
690
 
 
691
          <p><strong>Options:</strong></p>
 
692
 
 
693
          <blockquote>
 
694
            <p><strong>sticky</strong>: forces the exempt to be always active
 
695
            on a channel, even with dynamicexempts on<br>
 
696
            <strong>none</strong>: no effect</p>
 
697
          </blockquote>
 
698
 
 
699
          <p><strong>Returns:</strong> nothing</p>
 
700
 
 
701
          <p><strong>Module:</strong> channels</p>
 
702
        </dd>
 
703
 
 
704
        <dt><strong>newexempt &lt;exempt&gt; &lt;creator&gt; &lt;comment&gt;
 
705
        [lifetime] [options]</strong></dt>
 
706
 
 
707
        <dd>
 
708
          <p><strong>Description:</strong> adds a exempt to the global
 
709
          exempt list (which takes effect on all channels); creator is
 
710
          given credit for the exempt in the exempt list. lifetime is
 
711
          specified in minutes. If lifetime is not specified, exempt-time
 
712
          (usually 60) is used. Setting the lifetime to 0 makes it a
 
713
          permanent exempt. The exempt will not be removed until the
 
714
          corresponding ban has been removed.</p>
 
715
 
 
716
          <p><strong>Options:</strong></p>
 
717
 
 
718
          <blockquote>
 
719
            <p><strong>sticky</strong>: forces the exempt to be always active
 
720
            on a channel, even with dynamicexempts on<br>
 
721
            <strong>none</strong>: no effect</p>
 
722
          </blockquote>
 
723
 
 
724
          <p><strong>Returns:</strong> nothing</p>
 
725
 
 
726
          <p><strong>Module:</strong> channels</p>
 
727
        </dd>
 
728
 
 
729
        <dt><strong>newchaninvite &lt;channel&gt; &lt;invite&gt;
 
730
        &lt;creator&gt; &lt;comment&gt; [lifetime] [options]</strong></dt>
 
731
 
 
732
        <dd>
 
733
          <p><strong>Description:</strong> adds a invite to the invite list
 
734
          of a channel; creator is given credit for the invite in the invite
 
735
          list. lifetime is specified in minutes. If lifetime is not
 
736
          specified, invite-time (usually 60) is used. Setting the lifetime
 
737
          to 0 makes it a permanent invite. The invite will not be removed
 
738
          until the channel has gone -i.</p>
 
739
 
 
740
          <p><strong>Options:</strong></p>
 
741
 
 
742
          <blockquote>
 
743
            <p><strong>sticky</strong>: forces the invite to be always active
 
744
            on a channel, even with dynamicinvites on<br>
 
745
            <strong>none</strong>: no effect</p>
 
746
          </blockquote>
 
747
 
 
748
          <p><strong>Returns:</strong> nothing</p>
 
749
 
 
750
          <p><strong>Module:</strong> channels</p>
 
751
        </dd>
 
752
 
 
753
        <dt><strong>newinvite &lt;invite&gt; &lt;creator&gt; &lt;comment&gt;
 
754
        [lifetime] [options]</strong></dt>
 
755
 
 
756
        <dd>
 
757
          <p><strong>Description:</strong> adds a invite to the global invite
 
758
          list (which takes effect on all channels); creator is given credit
 
759
          for the invite in the invite list. lifetime is specified in
 
760
          minutes. If lifetime is not specified, invite-time (usually 60)
 
761
          is used. Setting the lifetime to 0 makes it a permanent invite.
 
762
          The invite will not be removed until the channel has gone -i.</p>
 
763
 
 
764
          <p><strong>Options:</strong></p>
 
765
 
 
766
          <blockquote>
 
767
            <p><strong>sticky</strong>: forces the invite to be always active
 
768
            on a channel, even with dynamicinvites on<br>
 
769
            <strong>none</strong>: no effect</p>
 
770
          </blockquote>
 
771
 
 
772
          <p><strong>Returns:</strong> nothing</p>
 
773
 
 
774
          <p><strong>Module:</strong> channels</p>
 
775
        </dd>
 
776
 
 
777
        <dt><strong>stick &lt;banmask&gt; [channel]</strong></dt>
 
778
 
 
779
        <dd>
 
780
          <p><strong>Description:</strong> makes a ban sticky, or, if a
 
781
          channel is specified, then it is set sticky on that channel
 
782
          only.</p>
 
783
 
 
784
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
785
 
 
786
          <p><strong>Module:</strong> channels</p>
 
787
        </dd>
 
788
 
 
789
        <dt><strong>unstick &lt;banmask&gt; [channel]</strong></dt>
 
790
 
 
791
        <dd>
 
792
          <p><strong>Description:</strong> makes a ban no longer sticky,
 
793
          or, if a channel is specified, then it is unstuck on that channel
 
794
          only.</p>
 
795
 
 
796
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
797
 
 
798
          <p><strong>Module:</strong> channels</p>
 
799
        </dd>
 
800
 
 
801
        <dt><strong>stickexempt &lt;exemptmask&gt; [channel]</strong></dt>
 
802
 
 
803
        <dd>
 
804
          <p><strong>Description:</strong> makes an exempt sticky, or, if
 
805
          a channel is specified, then it is set sticky on that channel
 
806
          only.</p>
 
807
 
 
808
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
809
 
 
810
          <p><strong>Module:</strong> channels</p>
 
811
        </dd>
 
812
 
 
813
        <dt><strong>unstickexempt &lt;exemptmask&gt; [channel]</strong></dt>
 
814
 
 
815
        <dd>
 
816
          <p><strong>Description:</strong> makes an exempt no longer sticky,
 
817
          or, if a channel is specified, then it is unstuck on that channel
 
818
          only.</p>
 
819
 
 
820
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
821
 
 
822
          <p><strong>Module:</strong> channels</p>
 
823
        </dd>
 
824
 
 
825
        <dt><strong>stickinvite &lt;invitemask&gt; [channel]</strong></dt>
 
826
 
 
827
        <dd>
 
828
          <p><strong>Description:</strong> makes an invite sticky, or, if
 
829
          a channel is specified, then it is set sticky on that channel
 
830
          only.</p>
 
831
 
 
832
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
833
 
 
834
          <p><strong>Module:</strong> channels</p>
 
835
        </dd>
 
836
 
 
837
        <dt><strong>unstickinvite &lt;invitemask&gt; [channel]</strong></dt>
 
838
 
 
839
        <dd>
 
840
          <p><strong>Description:</strong> makes an invite no longer sticky,
 
841
          or, if a channel is specified, then it is unstuck on that channel
 
842
          only.</p>
 
843
 
 
844
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
845
 
 
846
          <p><strong>Module:</strong> channels</p>
 
847
        </dd>
 
848
 
 
849
        <dt><strong>killchanban &lt;channel&gt; &lt;ban&gt;</strong></dt>
 
850
 
 
851
        <dd>
 
852
          <p><strong>Description:</strong> removes a ban from the ban list
 
853
          for a channel</p>
 
854
 
 
855
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
856
 
 
857
          <p><strong>Module:</strong> channels</p>
 
858
        </dd>
 
859
 
 
860
        <dt><strong>killban &lt;ban&gt;</strong></dt>
 
861
 
 
862
        <dd>
 
863
          <p><strong>Description:</strong> removes a ban from the global
 
864
          ban list</p>
 
865
 
 
866
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
867
 
 
868
          <p><strong>Module:</strong> channels</p>
 
869
        </dd>
 
870
 
 
871
        <dt><strong>killchanexempt &lt;channel&gt;
 
872
        &lt;exempt&gt;</strong></dt>
 
873
 
 
874
        <dd>
 
875
          <p><strong>Description:</strong> removes an exempt from the exempt
 
876
          list for a channel</p>
 
877
 
 
878
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
879
 
 
880
          <p><strong>Module:</strong> channels</p>
 
881
        </dd>
 
882
 
 
883
        <dt><strong>killexempt &lt;exempt&gt;</strong></dt>
 
884
 
 
885
        <dd>
 
886
          <p><strong>Description:</strong> removes an exempt from the global
 
887
          exempt list</p>
 
888
 
 
889
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
890
 
 
891
          <p><strong>Module:</strong> channels</p>
 
892
        </dd>
 
893
 
 
894
        <dt><strong>killchaninvite &lt;channel&gt; &lt;invite&gt;</strong></dt>
 
895
 
 
896
        <dd>
 
897
          <p><strong>Description:</strong> removes an invite from the invite
 
898
          list for a channel</p>
 
899
 
 
900
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
901
 
 
902
          <p><strong>Module:</strong> channels</p>
 
903
        </dd>
 
904
 
 
905
        <dt><strong>killinvite &lt;invite&gt;</strong></dt>
 
906
 
 
907
        <dd>
 
908
          <p><strong>Description:</strong> removes an invite from the global
 
909
          invite list</p>
 
910
 
 
911
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
912
 
 
913
          <p><strong>Module:</strong> channels</p>
 
914
        </dd>
 
915
 
 
916
        <dt><strong>ischanjuped &lt;channel&gt;</strong></dt>
 
917
 
 
918
        <dd>
 
919
          <p><strong>Returns:</strong> 1 if the channel is juped, and the
 
920
          bot is unable to join; 0 otherwise</p>
 
921
 
 
922
          <p><strong>Module:</strong> channels</p>
 
923
        </dd>
 
924
 
 
925
        <dt><strong>isban &lt;ban&gt; [channel]</strong></dt>
 
926
 
 
927
        <dd>
 
928
          <p><strong>Returns:</strong> 1 if the specified ban is in the
 
929
          global ban list; 0 otherwise. If a channel is specified, that
 
930
          channel&#39;s ban list is checked as well.</p>
 
931
 
 
932
          <p><strong>Module:</strong> channels</p>
 
933
        </dd>
 
934
 
 
935
        <dt><strong>ispermban &lt;ban&gt; [channel]</strong></dt>
 
936
 
 
937
        <dd>
 
938
          <p><strong>Returns:</strong> 1 if the specified ban is in the
 
939
          global ban list AND is marked as permanent; 0 otherwise. If a
 
940
          channel is specified, that channel&#39;s ban list is checked as
 
941
          well.</p>
 
942
 
 
943
          <p><strong>Module:</strong> channels</p>
 
944
        </dd>
 
945
 
 
946
        <dt><strong>isexempt &lt;exempt&gt; [channel]</strong></dt>
 
947
 
 
948
        <dd>
 
949
          <p><strong>Returns:</strong> 1 if the specified exempt is in the
 
950
          global exempt list; 0 otherwise. If a channel is specified, that
 
951
          channel&#39;s exempt list is checked as well.</p>
 
952
 
 
953
          <p><strong>Module:</strong> channels</p>
 
954
        </dd>
 
955
 
 
956
        <dt><strong>ispermexempt &lt;exempt&gt; [channel]</strong></dt>
 
957
 
 
958
        <dd>
 
959
          <p><strong>Returns:</strong> 1 if the specified exempt is in the
 
960
          global exempt list AND is marked as permanent; 0 otherwise. If a
 
961
          channel is specified, that channel&#39;s exempt list is checked
 
962
          as well.</p>
 
963
 
 
964
          <p><strong>Module:</strong> channels</p>
 
965
        </dd>
 
966
 
 
967
        <dt><strong>isinvite &lt;invite&gt; [channel]</strong></dt>
 
968
 
 
969
        <dd>
 
970
          <p><strong>Returns:</strong> 1 if the specified invite is in
 
971
          the global invite list; 0 otherwise. If a channel is specified,
 
972
          that channel&#39;s invite list is checked as well.</p>
 
973
 
 
974
          <p><strong>Module:</strong> channels</p>
 
975
        </dd>
 
976
 
 
977
        <dt><strong>isperminvite &lt;invite&gt; [channel]</strong></dt>
 
978
 
 
979
        <dd>
 
980
          <p><strong>Returns:</strong> 1 if the specified invite is in
 
981
          the global invite list AND is marked as permanent; 0 otherwise.
 
982
          If a channel is specified, that channel&#39;s invite list is
 
983
          checked as well.</p>
 
984
 
 
985
          <p><strong>Module:</strong> channels</p>
 
986
        </dd>
 
987
 
 
988
        <dt><strong>isbansticky &lt;ban&gt; [channel]</strong></dt>
 
989
 
 
990
        <dd>
 
991
          <p><strong>Returns:</strong> 1 if the specified ban is marked as
 
992
          sticky in the global ban list; 0 otherwise. If a channel is
 
993
          specified, that channel&#39;s ban list is checked as well.</p>
 
994
 
 
995
          <p><strong>Module:</strong> channels</p>
 
996
        </dd>
 
997
 
 
998
        <dt><strong>isexemptsticky &lt;exempt&gt; [channel]</strong></dt>
 
999
 
 
1000
        <dd>
 
1001
          <p><strong>Returns:</strong> 1 if the specified exempt is marked
 
1002
          as sticky in the global exempt list; 0 otherwise. If a channel is
 
1003
          specified, that channel&#39;s exempt list is checked as well.</p>
 
1004
 
 
1005
          <p><strong>Module:</strong> channels</p>
 
1006
        </dd>
 
1007
 
 
1008
        <dt><strong>isinvitesticky &lt;invite&gt; [channel]</strong></dt>
 
1009
 
 
1010
        <dd>
 
1011
          <p><strong>Returns:</strong> 1 if the specified invite is marked
 
1012
          as sticky in the global invite list; 0 otherwise. If a channel
 
1013
          is specified, that channel&#39;s invite list is checked as well.</p>
 
1014
 
 
1015
          <p><strong>Module:</strong> channels</p>
 
1016
        </dd>
 
1017
 
 
1018
        <dt><strong>matchban &lt;nick!user@host&gt; [channel]</strong></dt>
 
1019
 
 
1020
        <dd>
 
1021
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
 
1022
          matches a ban in the global ban list; 0 otherwise. If a channel
 
1023
          is specified, that channel&#39;s ban list is checked as well.</p>
 
1024
 
 
1025
          <p><strong>Module:</strong> channels</p>
 
1026
        </dd>
 
1027
 
 
1028
        <dt><strong>matchexempt &lt;nick!user@host&gt;
 
1029
        [channel]</strong></dt>
 
1030
 
 
1031
        <dd>
 
1032
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
 
1033
          matches an exempt in the global exempt list; 0 otherwise. If a
 
1034
          channel is specified, that channel&#39;s exempt list is checked
 
1035
          as well.</p>
 
1036
 
 
1037
          <p><strong>Module:</strong> channels</p>
 
1038
        </dd>
 
1039
 
 
1040
        <dt><strong>matchinvite &lt;nick!user@host&gt; [channel]</strong></dt>
 
1041
 
 
1042
        <dd>
 
1043
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
 
1044
          matches an invite in the global invite list; 0 otherwise. If a
 
1045
          channel is specified, that channel&#39;s invite list is checked
 
1046
          as well.</p>
 
1047
 
 
1048
          <p><strong>Module:</strong> channels</p>
 
1049
        </dd>
 
1050
 
 
1051
        <dt><strong>banlist [channel]</strong></dt>
 
1052
 
 
1053
        <dd>
 
1054
          <p><strong>Returns:</strong> a list of global bans, or, if a
 
1055
          channel is specified, a list of channel-specific bans. Each entry
 
1056
          is a sublist containing: hostmask, comment, expiration timestamp,
 
1057
          time added, last time active, and creator. The three timestamps
 
1058
          are in unixtime format.</p>
 
1059
 
 
1060
          <p><strong>Module:</strong> channels</p>
 
1061
        </dd>
 
1062
 
 
1063
        <dt><strong>exemptlist [channel]</strong></dt>
 
1064
 
 
1065
        <dd>
 
1066
          <p><strong>Returns:</strong> a list of global exempts, or, if a
 
1067
          channel is specified, a list of channel-specific exempts. Each
 
1068
          entry is a sublist containing: hostmask, comment, expiration
 
1069
          timestamp, time added, last time active, and creator. The three
 
1070
          timestamps are in unixtime format.</p>
 
1071
 
 
1072
          <p><strong>Module:</strong> channels</p>
 
1073
        </dd>
 
1074
 
 
1075
        <dt><strong>invitelist [channel]</strong></dt>
 
1076
 
 
1077
        <dd>
 
1078
          <p><strong>Returns:</strong> a list of global invites, or, if a
 
1079
          channel is specified, a list of channel-specific invites. Each
 
1080
          entry is a sublist containing: hostmask, comment, expiration
 
1081
          timestamp, time added, last time active, and creator. The three
 
1082
          timestamps are in unixtime format.</p>
 
1083
 
 
1084
          <p><strong>Module:</strong> channels</p>
 
1085
        </dd>
 
1086
 
 
1087
        <dt><strong>newignore &lt;hostmask&gt; &lt;creator&gt;
 
1088
        &lt;comment&gt; [lifetime]</strong></dt>
 
1089
 
 
1090
        <dd>
 
1091
          <p><strong>Description:</strong> adds an entry to the ignore list;
 
1092
          creator is given credit for the ignore. lifetime is how many
 
1093
          minutes until the ignore expires and is removed. If lifetime is
 
1094
          not specified, ignore-time (usually 60) is used. Setting the
 
1095
          lifetime to 0 makes it a permanent ignore.</p>
 
1096
 
 
1097
          <p><strong>Returns:</strong> nothing</p>
 
1098
 
 
1099
          <p><strong>Module:</strong> core</p>
 
1100
        </dd>
 
1101
 
 
1102
        <dt><strong>killignore &lt;hostmask&gt;</strong></dt>
 
1103
 
 
1104
        <dd>
 
1105
          <p><strong>Description:</strong> removes an entry from the ignore
 
1106
          list</p>
 
1107
 
 
1108
          <p><strong>Returns:</strong> 1 if successful; 0 otherwise</p>
 
1109
 
 
1110
          <p><strong>Module:</strong> core</p>
 
1111
        </dd>
 
1112
 
 
1113
        <dt><strong>ignorelist</strong></dt>
 
1114
 
 
1115
        <dd>
 
1116
          <p><strong>Returns:</strong> a list of ignores. Each entry is a
 
1117
          sublist containing: hostmask, comment, expiration timestamp, time
 
1118
          added, and creator. The timestamps are in unixtime format.</p>
 
1119
 
 
1120
          <p><strong>Module:</strong> core</p>
 
1121
        </dd>
 
1122
 
 
1123
        <dt><strong>isignore &lt;hostmask&gt;</strong></dt>
 
1124
 
 
1125
        <dd>
 
1126
          <p><strong>Returns:</strong> 1 if the ignore is in the list;
 
1127
          0 otherwise</p>
 
1128
 
 
1129
          <p><strong>Module:</strong> core</p>
 
1130
        </dd>
 
1131
 
 
1132
        <dt><strong>save</strong></dt>
 
1133
 
 
1134
        <dd>
 
1135
          <p><strong>Description:</strong> writes the user and channel files
 
1136
          to disk</p>
 
1137
 
 
1138
          <p><strong>Returns:</strong> nothing</p>
 
1139
 
 
1140
          <p><strong>Module:</strong> core</p>
 
1141
        </dd>
 
1142
 
 
1143
        <dt><strong>reload</strong></dt>
 
1144
 
 
1145
        <dd>
 
1146
          <p><strong>Description:</strong> loads the userfile from disk,
 
1147
          replacing whatever is in memory</p>
 
1148
 
 
1149
          <p><strong>Returns:</strong> nothing</p>
 
1150
 
 
1151
          <p><strong>Module:</strong> core</p>
 
1152
        </dd>
 
1153
 
 
1154
        <dt><strong>backup</strong></dt>
 
1155
 
 
1156
        <dd>
 
1157
          <p><strong>Description:</strong> makes a simple backup of the
 
1158
          userfile that&#39;s on disk. If the channels module is loaded,
 
1159
          this also makes a simple backup of the channel file.</p>
 
1160
 
 
1161
          <p><strong>Returns:</strong> nothing</p>
 
1162
 
 
1163
          <p><strong>Module:</strong> core</p>
 
1164
        </dd>
 
1165
 
 
1166
        <dt><strong>getting-users</strong></dt>
 
1167
 
 
1168
        <dd>
 
1169
          <p><strong>Returns:</strong> 1 if the bot is currently downloading
 
1170
          a userfile from a sharebot (and hence, user records are about to
 
1171
          drastically change); 0 if not</p>
 
1172
 
 
1173
          <p><strong>Module:</strong> core</p>
 
1174
        </dd>
 
1175
      </dl>
 
1176
    </blockquote>
 
1177
 
 
1178
    <p><a name="chancmds"></a>3. <strong>Channel commands</strong></p>
 
1179
 
 
1180
    <blockquote>
 
1181
      <dl>
 
1182
        <dt><strong>channel add &lt;name&gt; [option-list]</strong></dt>
 
1183
 
 
1184
        <dd>
 
1185
          <p><strong>Description:</strong> adds a channel record for the
 
1186
          bot to monitor. The full list of possible options are given in
 
1187
          doc/settings/mod.channels. Note that the channel options must be
 
1188
          in a list (enclosed in {}).</p>
 
1189
 
 
1190
          <p><strong>Returns:</strong> nothing</p>
 
1191
 
 
1192
          <p><strong>Module:</strong> channels</p>
 
1193
        </dd>
 
1194
 
 
1195
        <dt><strong>channel set &lt;name&gt; &lt;options...&gt;</strong></dt>
 
1196
 
 
1197
        <dd>
 
1198
          <p><strong>Description:</strong> sets options for the channel
 
1199
          specified. The full list of possible options are given in
 
1200
          doc/settings/mod.channels.</p>
 
1201
 
 
1202
          <p><strong>Returns:</strong> nothing</p>
 
1203
 
 
1204
          <p><strong>Module:</strong> channels</p>
 
1205
        </dd>
 
1206
 
 
1207
        <dt><strong>channel info &lt;name&gt;</strong></dt>
 
1208
 
 
1209
        <dd>
 
1210
          <p><strong>Returns:</strong> a list of info about the specified
 
1211
          channel&#39;s settings.</p>
 
1212
 
 
1213
          <p><strong>Module:</strong> channels</p>
 
1214
        </dd>
 
1215
 
 
1216
        <dt><strong>channel get &lt;name&gt; &lt;setting&gt;</strong></dt>
 
1217
 
 
1218
        <dd>
 
1219
          <p><strong>Returns:</strong> The value of the setting you specify.
 
1220
          For flags, a value of 0 means it is disabled (-), and non-zero means
 
1221
          enabled (+).</p>
 
1222
 
 
1223
          <p><strong>Module:</strong> channels</p>
 
1224
        </dd>
 
1225
 
 
1226
        <dt><strong>channel remove &lt;name&gt;</strong></dt>
 
1227
 
 
1228
        <dd>
 
1229
          <p><strong>Description:</strong> removes a channel record from
 
1230
          the bot and makes the bot no longer monitor the channel</p>
 
1231
 
 
1232
          <p><strong>Returns:</strong> nothing</p>
 
1233
 
 
1234
          <p><strong>Module:</strong> channels</p>
 
1235
        </dd>
 
1236
 
 
1237
        <dt><strong>savechannels</strong></dt>
 
1238
 
 
1239
        <dd>
 
1240
          <p><strong>Description:</strong> saves the channel settings to
 
1241
          the channel-file if one is defined.</p>
 
1242
 
 
1243
          <p><strong>Returns:</strong> nothing</p>
 
1244
 
 
1245
          <p><strong>Module:</strong> channels</p>
 
1246
        </dd>
 
1247
 
 
1248
        <dt><strong>loadchannels</strong></dt>
 
1249
 
 
1250
        <dd>
 
1251
          <p><strong>Description:</strong> reloads the channel settings from
 
1252
          the channel-file if one is defined.</p>
 
1253
 
 
1254
          <p><strong>Returns:</strong> nothing</p>
 
1255
 
 
1256
          <p><strong>Module:</strong> channels</p>
 
1257
        </dd>
 
1258
 
 
1259
        <dt><strong>channels</strong></dt>
 
1260
 
 
1261
        <dd>
 
1262
          <p><strong>Returns:</strong> a list of the channels the bot has
 
1263
          a channel record for</p>
 
1264
 
 
1265
          <p><strong>Module:</strong> channels</p>
 
1266
        </dd>
 
1267
 
 
1268
        <dt><strong>channame2dname &lt;channel-name&gt;</strong></dt>
 
1269
        <dt><strong>chandname2name &lt;channel-dname&gt;</strong></dt>
 
1270
 
 
1271
        <dd>
 
1272
          <p><strong>Description:</strong> these two functions are important
 
1273
          to correctly support !channels. The bot differentiates between
 
1274
          channel description names (chan dnames) and real channel names
 
1275
          (chan names). The chan dnames are what you would normally call
 
1276
          the channel, such as &quot;!channel&quot;. The chan names are
 
1277
          what the IRC server uses to identify the channel. They consist
 
1278
          of the chan dname prefixed with an ID; such as
 
1279
          &quot;!ABCDEchannel&quot;.</p>
 
1280
 
 
1281
          <p>For bot functions like isop, isvoice, etc. you need to know
 
1282
          the chan dnames. If you communicate with the server, you usually
 
1283
          get the chan name, though. That&#39;s what you need the
 
1284
          channame2dname function for.</p>
 
1285
 
 
1286
          <p>If you only have the chan dname and want to directly send raw
 
1287
          server commands, use the chandname2name command.</p>
 
1288
 
 
1289
          <p>For non-!channels, chan dname and chan name are the same.</p>
 
1290
 
 
1291
          <p><strong>Module:</strong> irc</p>
 
1292
        </dd>
 
1293
 
 
1294
        <dt><strong>isbotnick &lt;nick&gt;</strong></dt>
 
1295
 
 
1296
        <dd>
 
1297
          <p><strong>Returns:</strong> 1 if the nick matches the botnick;
 
1298
          0 otherwise</p>
 
1299
 
 
1300
          <p><strong>Module:</strong> server</p>
 
1301
        </dd>
 
1302
 
 
1303
        <dt><strong>botisop [channel]</strong></dt>
 
1304
 
 
1305
        <dd>
 
1306
          <p><strong>Returns:</strong> 1 if the bot has ops on the specified
 
1307
          channel (or any channel if no channel is specified); 0
 
1308
          otherwise</p>
 
1309
 
 
1310
          <p><strong>Module:</strong> irc</p>
 
1311
        </dd>
 
1312
 
 
1313
        <dt><strong>botishalfop [channel]</strong></dt>
 
1314
 
 
1315
        <dd>
 
1316
          <p><strong>Returns:</strong> 1 if the bot has halfops on the
 
1317
          specified channel (or any channel if no channel is specified); 0
 
1318
          otherwise</p>
 
1319
 
 
1320
          <p><strong>Module:</strong> irc</p>
 
1321
        </dd>
 
1322
 
 
1323
        <dt><strong>botisvoice [channel]</strong></dt>
 
1324
 
 
1325
        <dd>
 
1326
          <p><strong>Returns:</strong> 1 if the bot has a voice on the
 
1327
          specified channel (or any channel if no channel is specified); 0
 
1328
          otherwise</p>
 
1329
 
 
1330
          <p><strong>Module:</strong> irc</p>
 
1331
        </dd>
 
1332
 
 
1333
        <dt><strong>botonchan [channel]</strong></dt>
 
1334
 
 
1335
        <dd>
 
1336
          <p><strong>Returns:</strong> 1 if the bot is on the specified
 
1337
          channel (or any channel if no channel is specified); 0
 
1338
          otherwise</p>
 
1339
 
 
1340
          <p><strong>Module:</strong> irc</p>
 
1341
        </dd>
 
1342
 
 
1343
        <dt><strong>isop &lt;nickname&gt; [channel]</strong></dt>
 
1344
 
 
1345
        <dd>
 
1346
          <p><strong>Returns:</strong> 1 if someone by the specified
 
1347
          nickname is on the channel (or any channel if no channel name is
 
1348
          specified) and has ops; 0 otherwise</p>
 
1349
 
 
1350
          <p><strong>Module:</strong> irc</p>
 
1351
        </dd>
 
1352
 
 
1353
        <dt><strong>ishalfop &lt;nickname&gt; [channel]</strong></dt>
 
1354
 
 
1355
        <dd>
 
1356
          <p><strong>Returns:</strong> 1 if someone by the specified
 
1357
          nickname is on the channel (or any channel if no channel name is
 
1358
          specified) and has halfops; 0 otherwise</p>
 
1359
 
 
1360
          <p><strong>Module:</strong> irc</p>
 
1361
        </dd>
 
1362
 
 
1363
        <dt><strong>wasop &lt;nickname&gt; &lt;channel&gt;</strong></dt>
 
1364
 
 
1365
        <dd>
 
1366
          <p><strong>Returns:</strong> 1 if someone that just got
 
1367
          opped/deopped in the chan had op before the modechange; 0
 
1368
          otherwise</p>
 
1369
 
 
1370
          <p><strong>Module:</strong> irc</p>
 
1371
        </dd>
 
1372
 
 
1373
        <dt><strong>washalfop &lt;nickname&gt; &lt;channel&gt;</strong></dt>
 
1374
 
 
1375
        <dd>
 
1376
          <p><strong>Returns:</strong> 1 if someone that just got
 
1377
          halfopped/dehalopped in the chan had halfop before the modechange; 0
 
1378
          otherwise</p>
 
1379
 
 
1380
          <p><strong>Module:</strong> irc</p>
 
1381
        </dd>
 
1382
 
 
1383
        <dt><strong>isvoice &lt;nickname&gt; [channel]</strong></dt>
 
1384
 
 
1385
        <dd>
 
1386
          <p><strong>Returns:</strong> 1 if someone by that nickname is on
 
1387
          the channel (or any channel if no channel is specified) and has
 
1388
          voice (+v); 0 otherwise</p>
 
1389
 
 
1390
          <p><strong>Module:</strong> irc</p>
 
1391
        </dd>
 
1392
 
 
1393
        <dt><strong>onchan &lt;nickname&gt; [channel]</strong></dt>
 
1394
 
 
1395
        <dd>
 
1396
          <p><strong>Returns:</strong> 1 if someone by that nickname is on
 
1397
          the specified channel (or any channel if none is specified); 0
 
1398
          otherwise</p>
 
1399
 
 
1400
          <p><strong>Module:</strong> irc</p>
 
1401
        </dd>
 
1402
 
 
1403
        <dt><strong>nick2hand &lt;nickname&gt; [channel]</strong></dt>
 
1404
 
 
1405
        <dd>
 
1406
          <p><strong>Returns:</strong> the handle of a nickname on a channel.
 
1407
          If a channel is not specified, the bot will check all of its
 
1408
          channels. If the nick is not found, &quot;&quot; is returned. If
 
1409
          the nick is found but does not have a handle, &quot;*&quot; is
 
1410
          returned.</p>
 
1411
 
 
1412
          <p><strong>Module:</strong> irc</p>
 
1413
        </dd>
 
1414
 
 
1415
        <dt><strong>hand2nick &lt;handle&gt; [channel]</strong></dt>
 
1416
 
 
1417
        <dd>
 
1418
          <p><strong>Returns:</strong> nickname of the first person on the
 
1419
          specified channel (if one is specified) whose nick!user@host
 
1420
          matches the given handle; &quot;&quot; is returned if no match
 
1421
          is found. If no channel is specified, all channels are checked.</p>
 
1422
 
 
1423
          <p><strong>Module:</strong> irc</p>
 
1424
        </dd>
 
1425
 
 
1426
        <dt><strong>handonchan &lt;handle&gt; [channel]</strong></dt>
 
1427
 
 
1428
        <dd>
 
1429
          <p><strong>Returns:</strong> 1 if the the nick!user@host for
 
1430
          someone on the channel (or any channel if no channel name is
 
1431
          specified) matches for the handle given; 0 otherwise</p>
 
1432
 
 
1433
          <p><strong>Module:</strong> irc</p>
 
1434
        </dd>
 
1435
 
 
1436
        <dt><strong>ischanban &lt;ban&gt; &lt;channel&gt;</strong></dt>
 
1437
 
 
1438
        <dd>
 
1439
          <p><strong>Returns:</strong> 1 if the specified ban is on the
 
1440
          given channel&#39;s ban list (not the bot&#39;s banlist for the
 
1441
          channel)</p>
 
1442
 
 
1443
          <p><strong>Module:</strong> irc</p>
 
1444
        </dd>
 
1445
 
 
1446
        <dt><strong>ischanexempt &lt;exempt&gt; &lt;channel&gt;</strong></dt>
 
1447
 
 
1448
        <dd>
 
1449
          <p><strong>Returns:</strong> 1 if the specified exempt is on the
 
1450
          given channel&#39;s exempt list (not the bot&#39;s exemptlist for
 
1451
          the channel)</p>
 
1452
 
 
1453
          <p><strong>Module:</strong> irc</p>
 
1454
        </dd>
 
1455
 
 
1456
        <dt><strong>ischaninvite &lt;invite&gt; &lt;channel&gt;</strong></dt>
 
1457
 
 
1458
        <dd>
 
1459
          <p><strong>Returns:</strong> 1 if the specified invite is on the
 
1460
          given channel&#39;s invite list (not the bot&#39;s invitelist for
 
1461
          the channel)</p>
 
1462
 
 
1463
          <p><strong>Module:</strong> irc</p>
 
1464
        </dd>
 
1465
 
 
1466
        <dt><strong>chanbans &lt;channel&gt;</strong></dt>
 
1467
 
 
1468
        <dd>
 
1469
          <p><strong>Returns:</strong> a list of the current bans on the
 
1470
          channel. Each element is a sublist of the form {&lt;ban&gt;
 
1471
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
 
1472
          point of view</p>
 
1473
 
 
1474
          <p><strong>Module:</strong> irc</p>
 
1475
        </dd>
 
1476
 
 
1477
        <dt><strong>chanexempts &lt;channel&gt;</strong></dt>
 
1478
 
 
1479
        <dd>
 
1480
          <p><strong>Returns:</strong> a list of the current exempts on the
 
1481
          channel. Each element is a sublist of the form {&lt;exempts&gt;
 
1482
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
 
1483
          point of view</p>
 
1484
 
 
1485
          <p><strong>Module:</strong> irc</p>
 
1486
        </dd>
 
1487
 
 
1488
        <dt><strong>chaninvites &lt;channel&gt;</strong></dt>
 
1489
 
 
1490
        <dd>
 
1491
          <p><strong>Returns:</strong> a list of the current invites on the
 
1492
          channel. Each element is a sublist of the form {&lt;invites&gt;
 
1493
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
 
1494
          point of view</p>
 
1495
 
 
1496
          <p><strong>Module:</strong> irc</p>
 
1497
        </dd>
 
1498
 
 
1499
        <dt><strong>resetbans &lt;channel&gt;</strong></dt>
 
1500
 
 
1501
        <dd>
 
1502
          <p><strong>Description:</strong> removes all bans on the channel
 
1503
          that aren&#39;t in the bot&#39;s ban list and refreshes any bans
 
1504
          that should be on the channel but aren&#39;t</p>
 
1505
 
 
1506
          <p><strong>Returns:</strong> nothing</p>
 
1507
 
 
1508
          <p><strong>Module:</strong> irc</p>
 
1509
        </dd>
 
1510
 
 
1511
        <dt><strong>resetexempts [channel]</strong></dt>
 
1512
 
 
1513
        <dd>
 
1514
          <p><strong>Description:</strong> removes all exempt on the channel
 
1515
          that aren&#39;t in the bot&#39;s exempt list and refreshes any
 
1516
          exempts that should be on the channel but aren&#39;t</p>
 
1517
 
 
1518
          <p><strong>Returns:</strong> nothing</p>
 
1519
 
 
1520
          <p><strong>Module:</strong> irc</p>
 
1521
        </dd>
 
1522
 
 
1523
        <dt><strong>resetinvites [channel]</strong></dt>
 
1524
 
 
1525
        <dd>
 
1526
          <p><strong>Description:</strong> removes all invites on the channel
 
1527
          that aren&#39;t in the bot&#39;s invite list and refreshes any
 
1528
          invites that should be on the channel but aren&#39;t</p>
 
1529
 
 
1530
          <p><strong>Returns:</strong> nothing</p>
 
1531
 
 
1532
          <p><strong>Module:</strong> irc</p>
 
1533
        </dd>
 
1534
 
 
1535
        <dt><strong>resetchan &lt;channel&gt;</strong></dt>
 
1536
 
 
1537
        <dd>
 
1538
          <p><strong>Description:</strong> </p>
 
1539
 
 
1540
          <p><strong>Returns:</strong> rereads in the channel info from the
 
1541
          server</p>
 
1542
 
 
1543
          <p><strong>Module:</strong> irc</p>
 
1544
        </dd>
 
1545
 
 
1546
        <dt><strong>getchanhost &lt;nickname&gt; [channel]</strong></dt>
 
1547
 
 
1548
        <dd>
 
1549
          <p><strong>Returns:</strong> user@host of the specified nickname
 
1550
          (the nickname is not included in the returned host). If a channel
 
1551
          is not specified, bot will check all of its channels. If the
 
1552
          nickname is not on the channel(s), &quot;&quot; is returned.</p>
 
1553
 
 
1554
          <p><strong>Module:</strong> irc</p>
 
1555
        </dd>
 
1556
 
 
1557
        <dt><strong>getchanjoin &lt;nickname&gt; &lt;channel&gt;</strong></dt>
 
1558
 
 
1559
        <dd>
 
1560
          <p><strong>Returns:</strong> timestamp (unixtime format) of when
 
1561
          the specified nickname joined the channel</p>
 
1562
 
 
1563
          <p><strong>Module:</strong> irc</p>
 
1564
        </dd>
 
1565
 
 
1566
        <dt><strong>onchansplit &lt;nick&gt; [channel]</strong></dt>
 
1567
 
 
1568
        <dd>
 
1569
          <p><strong>Returns:</strong> 1 if that nick is split from the
 
1570
          channel (or any channel if no channel is specified); 0
 
1571
          otherwise</p>
 
1572
 
 
1573
          <p><strong>Module:</strong> irc</p>
 
1574
        </dd>
 
1575
 
 
1576
        <dt><strong>chanlist &lt;channel&gt;
 
1577
        [flags[&amp;chanflags]]</strong></dt>
 
1578
 
 
1579
        <dd>
 
1580
          <p><strong>Description:</strong> flags are any global flags; the
 
1581
          &#39;&amp;&#39; denotes to look for channel specific flags.
 
1582
          Examples:</p>
 
1583
 
 
1584
          <blockquote>
 
1585
            <table>
 
1586
              <tr valign="top">
 
1587
                <td>
 
1588
                  <p><strong>n</strong></p>
 
1589
                </td>
 
1590
 
 
1591
                <td>
 
1592
                  <p>Global Owner</p>
 
1593
                </td>
 
1594
              </tr>
 
1595
 
 
1596
              <tr valign="top">
 
1597
                <td>
 
1598
                  <p><strong>&amp;n</strong></p>
 
1599
                </td>
 
1600
 
 
1601
                <td>
 
1602
                  <p>Channel Owner</p>
 
1603
                </td>
 
1604
              </tr>
 
1605
 
 
1606
              <tr valign="top">
 
1607
                <td>
 
1608
                  <p><strong>o&amp;m</strong></p>
 
1609
                </td>
 
1610
 
 
1611
                <td>
 
1612
                  <p>Global Op, Channel Master</p>
 
1613
                </td>
 
1614
              </tr>
 
1615
            </table>
 
1616
          </blockquote>
 
1617
 
 
1618
          <p><strong>Returns:</strong> list of nicknames currently on the
 
1619
          bot&#39;s channel that have all of the flags specified;. If no
 
1620
          flags are given, all of the nicknames are returned. Please note
 
1621
          that if you&#39;re executing chanlist after a part or sign bind,
 
1622
          the gone user will still be listed, so you can check for wasop,
 
1623
          isop, etc.</p>
 
1624
 
 
1625
          <p><strong>Module:</strong> irc</p>
 
1626
        </dd>
 
1627
 
 
1628
        <dt><strong>getchanidle &lt;nickname&gt; &lt;channel&gt;</strong></dt>
 
1629
 
 
1630
        <dd>
 
1631
          <p><strong>Returns:</strong> number of minutes that person has
 
1632
          been idle; 0 if the specified user isn&#39;t on the channel</p>
 
1633
 
 
1634
          <p><strong>Module:</strong> irc</p>
 
1635
        </dd>
 
1636
 
 
1637
        <dt><strong>getchanmode &lt;channel&gt;</strong></dt>
 
1638
 
 
1639
        <dd>
 
1640
          <p><strong>Returns:</strong> string of the type &quot;+ntik
 
1641
          key&quot; for the channel specified</p>
 
1642
 
 
1643
          <p><strong>Module:</strong> irc</p>
 
1644
        </dd>
 
1645
 
 
1646
        <dt><strong>jump [server [port [password]]]</strong></dt>
 
1647
 
 
1648
        <dd>
 
1649
          <p><strong>Description:</strong> jumps to the server specified,
 
1650
          or (if none is specified) the next server in the bot&#39;s
 
1651
          serverlist</p>
 
1652
 
 
1653
          <p><strong>Returns:</strong> nothing</p>
 
1654
 
 
1655
          <p><strong>Module:</strong> server</p>
 
1656
        </dd>
 
1657
 
 
1658
        <dt><strong>pushmode &lt;channel&gt; &lt;mode&gt; [arg]</strong></dt>
 
1659
 
 
1660
        <dd>
 
1661
          <p><strong>Description:</strong> sends out a channel mode change
 
1662
          (ex: pushmode #lame +o goober) through the bot&#39;s queuing
 
1663
          system. All the mode changes will be sent out at once (combined
 
1664
          into one line as much as possible) after the script finishes, or
 
1665
          when &#39;flushmode&#39; is called.</p>
 
1666
 
 
1667
          <p><strong>Returns:</strong> nothing</p>
 
1668
 
 
1669
          <p><strong>Module:</strong> irc</p>
 
1670
        </dd>
 
1671
 
 
1672
        <dt><strong>flushmode &lt;channel&gt;</strong></dt>
 
1673
 
 
1674
        <dd>
 
1675
          <p><strong>Description:</strong> forces all previously pushed
 
1676
          channel mode changes to be sent to the server, instead of when
 
1677
          the script is finished (just for the channel specified)</p>
 
1678
 
 
1679
          <p><strong>Returns:</strong> nothing</p>
 
1680
 
 
1681
          <p><strong>Module:</strong> irc</p>
 
1682
        </dd>
 
1683
 
 
1684
        <dt><strong>topic &lt;channel&gt;</strong></dt>
 
1685
 
 
1686
        <dd>
 
1687
          <p><strong>Returns:</strong> string containing the current topic
 
1688
          of the specified channel</p>
 
1689
 
 
1690
          <p><strong>Module:</strong> irc</p>
 
1691
        </dd>
 
1692
 
 
1693
        <dt><strong>validchan &lt;channel&gt;</strong></dt>
 
1694
 
 
1695
        <dd>
 
1696
          <p><strong>Description:</strong> checks if the bot has a channel
 
1697
          record for the specified channel. Note that this does not
 
1698
          necessarily mean that the bot is ON the channel.</p>
 
1699
 
 
1700
          <p><strong>Returns:</strong> 1 if the channel exists, 0 if not</p>
 
1701
 
 
1702
          <p><strong>Module:</strong> nothing</p>
 
1703
        </dd>
 
1704
 
 
1705
        <dt><strong>isdynamic &lt;channel&gt;</strong></dt>
 
1706
 
 
1707
        <dd>
 
1708
          <p><strong>Returns:</strong> 1 if the channel is a dynamic
 
1709
          channel; 0 otherwise</p>
 
1710
 
 
1711
          <p><strong>Module:</strong> channels</p>
 
1712
        </dd>
 
1713
 
 
1714
        <dt><strong>setudef &lt;flag/int/str&gt; &lt;name&gt;</strong></dt>
 
1715
 
 
1716
        <dd>
 
1717
          <p><strong>Description:</strong> initializes a user defined channel
 
1718
          flag, string, or integer setting. You can use it like any other
 
1719
          flag/setting. IMPORTANT: Don&#39;t forget to reinitialize your
 
1720
          flags/settings after a restart, or it&#39;ll be lost.</p>
 
1721
 
 
1722
          <p><strong>Returns:</strong> nothing</p>
 
1723
 
 
1724
          <p><strong>Module:</strong> channels</p>
 
1725
        </dd>
 
1726
 
 
1727
        <dt><strong>renudef &lt;flag/int/str&gt; &lt;oldname&gt;
 
1728
        &lt;newname&gt;</strong></dt>
 
1729
 
 
1730
        <dd>
 
1731
          <p><strong>Description:</strong> renames a user defined channel
 
1732
          flag, string, or integer setting.</p>
 
1733
 
 
1734
          <p><strong>Returns:</strong> nothing</p>
 
1735
 
 
1736
          <p><strong>Module:</strong> channels</p>
 
1737
        </dd>
 
1738
 
 
1739
        <dt><strong>deludef &lt;flag/int/str&gt; &lt;name&gt;</strong></dt>
 
1740
 
 
1741
        <dd>
 
1742
          <p><strong>Description:</strong> deletes a user defined channel
 
1743
          flag, string, or integer setting.</p>
 
1744
 
 
1745
          <p><strong>Returns:</strong> nothing</p>
 
1746
 
 
1747
          <p><strong>Module:</strong> channels</p>
 
1748
        </dd>
 
1749
      </dl>
 
1750
    </blockquote>
 
1751
 
 
1752
    <p><a name="dcccmds"></a>4. <strong>Dcc commands</strong></p>
 
1753
 
 
1754
    <blockquote>
 
1755
      <dl>
 
1756
        <dt><strong>putdcc &lt;idx&gt; &lt;text&gt;</strong></dt>
 
1757
 
 
1758
        <dd>
 
1759
          <p><strong>Description:</strong> sends text to the idx specified</p>
 
1760
 
 
1761
          <p><strong>Returns:</strong> nothing</p>
 
1762
 
 
1763
          <p><strong>Module:</strong> core</p>
 
1764
        </dd>
 
1765
 
 
1766
        <dt><strong>dccbroadcast &lt;message&gt;</strong></dt>
 
1767
 
 
1768
        <dd>
 
1769
          <p><strong>Description:</strong> sends a message to everyone on
 
1770
          the party line across the botnet, in the form of &quot;***
 
1771
          &lt;message&gt;&quot; for local users and &quot;*** (Bot)
 
1772
          &lt;message&gt;&quot; for users on other bots</p>
 
1773
 
 
1774
          <p><strong>Returns:</strong> nothing</p>
 
1775
 
 
1776
          <p><strong>Module:</strong> core</p>
 
1777
        </dd>
 
1778
 
 
1779
        <dt><strong>dccputchan &lt;channel&gt; &lt;message&gt;</strong></dt>
 
1780
 
 
1781
        <dd>
 
1782
          <p><strong>Description:</strong> sends your message to everyone
 
1783
          on a certain channel on the botnet, in a form exactly like
 
1784
          dccbroadcast does. Valid channels are 0 through 99999.</p>
 
1785
 
 
1786
          <p><strong>Returns:</strong> nothing</p>
 
1787
 
 
1788
          <p><strong>Module:</strong> core</p>
 
1789
        </dd>
 
1790
 
 
1791
        <dt><strong>boot &lt;user@bot&gt; [reason]</strong></dt>
 
1792
 
 
1793
        <dd>
 
1794
          <p><strong>Description:</strong> boots a user from the partyline</p>
 
1795
 
 
1796
          <p><strong>Returns:</strong> nothing</p>
 
1797
 
 
1798
          <p><strong>Module:</strong> core</p>
 
1799
        </dd>
 
1800
 
 
1801
        <dt><strong>dccsimul &lt;idx&gt; &lt;text&gt;</strong></dt>
 
1802
 
 
1803
        <dd>
 
1804
          <p><strong>Description:</strong> simulates text typed in by the
 
1805
          dcc user specified. Note that in v0.9, this only simulated
 
1806
          commands; now a command must be preceded by a &#39;.&#39; to be
 
1807
          simulated.</p>
 
1808
 
 
1809
          <p><strong>Returns:</strong> nothing</p>
 
1810
 
 
1811
          <p><strong>Module:</strong> core</p>
 
1812
        </dd>
 
1813
 
 
1814
        <dt><strong>hand2idx &lt;handle&gt;</strong></dt>
 
1815
 
 
1816
        <dd>
 
1817
          <p><strong>Returns:</strong> the idx (a number greater than or
 
1818
          equal to zero) for the user given if the user is on the party
 
1819
          line in chat mode (even if she is currently on a channel or in
 
1820
          chat off), the file area, or in the control of a script. -1 is
 
1821
          returned if no idx is found. If the user is on multiple times,
 
1822
          the oldest idx is returned.</p>
 
1823
 
 
1824
          <p><strong>Module:</strong> core</p>
 
1825
        </dd>
 
1826
 
 
1827
        <dt><strong>idx2hand &lt;idx&gt;</strong></dt>
 
1828
 
 
1829
        <dd>
 
1830
          <p><strong>Returns:</strong> handle of the user with the given
 
1831
          idx</p>
 
1832
 
 
1833
          <p><strong>Module:</strong> core</p>
 
1834
        </dd>
 
1835
 
 
1836
        <dt><strong>valididx &lt;idx&gt;</strong></dt>
 
1837
 
 
1838
        <dd>
 
1839
          <p><strong>Returns:</strong> 1 if the idx currently exists; 0
 
1840
          otherwise</p>
 
1841
 
 
1842
          <p><strong>Module:</strong> core</p>
 
1843
        </dd>
 
1844
 
 
1845
        <dt><strong>getchan &lt;idx&gt;</strong></dt>
 
1846
 
 
1847
        <dd>
 
1848
          <p><strong>Returns:</strong> the current party line channel
 
1849
          for a user on the party line; &quot;0&quot; indicates he&#39;s
 
1850
          on the group party line, &quot;-1&quot; means he has chat off,
 
1851
          and a value from 1 to 99999 is a private channel</p>
 
1852
 
 
1853
          <p><strong>Module:</strong> core</p>
 
1854
        </dd>
 
1855
 
 
1856
        <dt><strong>setchan &lt;idx&gt; &lt;channel&gt;</strong></dt>
 
1857
 
 
1858
        <dd>
 
1859
          <p><strong>Description:</strong> sets a party line user&#39;s
 
1860
          channel. The party line user is not notified that she is now on
 
1861
          a new channel. A channel name can be used (provided it exists).</p>
 
1862
 
 
1863
          <p><strong>Returns:</strong> nothing</p>
 
1864
 
 
1865
          <p><strong>Module:</strong> core</p>
 
1866
        </dd>
 
1867
 
 
1868
        <dt><strong>console &lt;idx&gt; [channel]
 
1869
        [console-modes]</strong></dt>
 
1870
 
 
1871
        <dd>
 
1872
          <p><strong>Description:</strong> changes a dcc user&#39;s console
 
1873
          mode, either to an absolute mode (like &quot;mpj&quot;) or just
 
1874
          adding/removing flags (like &quot;+pj&quot; or &quot;-moc&quot;
 
1875
          or &quot;+mp-c&quot;). The user&#39;s console channel view can be
 
1876
          changed also (as long as the new channel is a valid channel).</p>
 
1877
 
 
1878
          <p><strong>Returns:</strong> a list containing the user&#39;s (new)
 
1879
          channel view and (new) console modes, or nothing if that user
 
1880
          isn&#39;t currently on the partyline</p>
 
1881
 
 
1882
          <p><strong>Module:</strong> core</p>
 
1883
        </dd>
 
1884
 
 
1885
        <dt><strong>echo &lt;idx&gt; [status]</strong></dt>
 
1886
 
 
1887
        <dd>
 
1888
          <p><strong>Description:</strong> turns a user&#39;s echo on or
 
1889
          off; the status has to be a 1 or 0</p>
 
1890
 
 
1891
          <p><strong>Returns:</strong> new value of echo for that user (or
 
1892
          the current value, if status was omitted)</p>
 
1893
 
 
1894
          <p><strong>Module:</strong> core</p>
 
1895
        </dd>
 
1896
 
 
1897
        <dt><strong>strip &lt;idx&gt; [+/-strip-flags]</strong></dt>
 
1898
 
 
1899
        <dd>
 
1900
          <p><strong>Description:</strong> modifies the strip-flags for a
 
1901
          user</p>
 
1902
 
 
1903
          <p><strong>Returns:</strong> new strip-flags for the specified user
 
1904
          (or the current flags, if strip-flags was omitted)</p>
 
1905
 
 
1906
          <p><strong>Module:</strong> core</p>
 
1907
        </dd>
 
1908
 
 
1909
        <dt><strong>putbot &lt;bot-nick&gt; &lt;message&gt;</strong></dt>
 
1910
 
 
1911
        <dd>
 
1912
          <p><strong>Description:</strong> sends a message across the
 
1913
          botnet to another bot. If no script intercepts the message on
 
1914
          the other end, the message is ignored.</p>
 
1915
 
 
1916
          <p><strong>Returns:</strong> nothing</p>
 
1917
 
 
1918
          <p><strong>Module:</strong> core</p>
 
1919
        </dd>
 
1920
 
 
1921
        <dt><strong>putallbots &lt;message&gt;</strong></dt>
 
1922
 
 
1923
        <dd>
 
1924
          <p><strong>Description:</strong> sends a message across the botnet
 
1925
          to all bots. If no script intercepts the message on the other end,
 
1926
          the message is ignored.</p>
 
1927
 
 
1928
          <p><strong>Returns:</strong> nothing</p>
 
1929
 
 
1930
          <p><strong>Module:</strong> core</p>
 
1931
        </dd>
 
1932
 
 
1933
        <dt><strong>killdcc &lt;idx&gt;</strong></dt>
 
1934
 
 
1935
        <dd>
 
1936
          <p><strong>Description:</strong> kills a partyline or file area
 
1937
          connection</p>
 
1938
 
 
1939
          <p><strong>Returns:</strong> nothing</p>
 
1940
 
 
1941
          <p><strong>Module:</strong> core</p>
 
1942
        </dd>
 
1943
 
 
1944
        <dt><strong>bots</strong></dt>
 
1945
 
 
1946
        <dd>
 
1947
          <p><strong>Returns:</strong> list of the bots currently connected
 
1948
          to the botnet</p>
 
1949
 
 
1950
          <p><strong>Module:</strong> core</p>
 
1951
        </dd>
 
1952
 
 
1953
        <dt><strong>botlist</strong></dt>
 
1954
 
 
1955
        <dd>
 
1956
          <p><strong>Returns:</strong> a list of bots currently on the
 
1957
          botnet. Each item in the list is a sublist with four elements:
 
1958
          bot, uplink, version, sharing status:</p>
 
1959
 
 
1960
          <blockquote>
 
1961
            <table>
 
1962
              <tr valign="top">
 
1963
                <td>
 
1964
                  <p><strong>bot</strong></p>
 
1965
                </td>
 
1966
 
 
1967
                <td>
 
1968
                  <p>the bot&#39;s botnetnick</p>
 
1969
                </td>
 
1970
              </tr>
 
1971
 
 
1972
              <tr valign="top">
 
1973
                <td>
 
1974
                  <p><strong>uplink</strong></p>
 
1975
                </td>
 
1976
 
 
1977
                <td>
 
1978
                  <p>the bot the bot is connected to</p>
 
1979
                </td>
 
1980
              </tr>
 
1981
 
 
1982
              <tr valign="top">
 
1983
                <td>
 
1984
                  <p><strong>version</strong></p>
 
1985
                </td>
 
1986
 
 
1987
                <td>
 
1988
                  <p>its current numeric version</p>
 
1989
                </td>
 
1990
              </tr>
 
1991
 
 
1992
              <tr valign="top">
 
1993
                <td>
 
1994
                  <p><strong>sharing</strong></p>
 
1995
                </td>
 
1996
 
 
1997
                <td>
 
1998
                  <p>a &quot;+&quot; if the bot is a sharebot; &quot;-&quot;
 
1999
                  otherwise</p>
 
2000
                </td>
 
2001
              </tr>
 
2002
            </table>
 
2003
          </blockquote>
 
2004
 
 
2005
          <p><strong>Module:</strong> core</p>
 
2006
        </dd>
 
2007
 
 
2008
        <dt><strong>killdcc &lt;idx&gt;</strong></dt>
 
2009
 
 
2010
        <dd>
 
2011
          <p><strong>Description:</strong> kills a partyline or file area
 
2012
          connection</p>
 
2013
 
 
2014
          <p><strong>Returns:</strong> nothing</p>
 
2015
 
 
2016
          <p><strong>Module:</strong> core</p>
 
2017
        </dd>
 
2018
 
 
2019
        <dt><strong>islinked &lt;bot&gt;</strong></dt>
 
2020
 
 
2021
        <dd>
 
2022
          <p><strong>Returns:</strong> 1 if the bot is currently linked; 0
 
2023
          otherwise</p>
 
2024
 
 
2025
          <p><strong>Module:</strong> core</p>
 
2026
        </dd>
 
2027
 
 
2028
        <dt><strong>dccused</strong></dt>
 
2029
 
 
2030
        <dd>
 
2031
          <p><strong>Returns:</strong> number of dcc connections currently
 
2032
          in use</p>
 
2033
 
 
2034
          <p><strong>Module:</strong> core</p>
 
2035
        </dd>
 
2036
 
 
2037
        <dt><strong>dcclist [type]</strong></dt>
 
2038
 
 
2039
        <dd>
 
2040
          <p><strong>Returns:</strong> a list of active connections, each
 
2041
          item in the list is a sublist containing six elements: {&lt;idx&gt;
 
2042
          &lt;handle&gt; &lt;hostname&gt; &lt;type&gt; {&lt;other&gt;}
 
2043
          &lt;timestamp&gt;}</p>
 
2044
 
 
2045
          <p>The types are: chat, bot, files, file_receiving, file_sending,
 
2046
          file_send_pending, script, socket (these are connections that
 
2047
          have not yet been put under &#39;control&#39;), telnet, and server.
 
2048
          The timestamp is in unixtime format.</p>
 
2049
 
 
2050
          <p><strong>Module:</strong> core</p>
 
2051
        </dd>
 
2052
 
 
2053
        <dt><strong>whom &lt;chan&gt;</strong></dt>
 
2054
 
 
2055
        <dd>
 
2056
          <p><strong>Returns:</strong> list of people on the botnet who are
 
2057
          on that channel. 0 is the default party line. Each item in the
 
2058
          list is a sublist with six elements: nickname, bot, hostname,
 
2059
          access flag (&#39;-&#39;, &#39;@&#39;, &#39;+&#39;, or
 
2060
          &#39;*&#39;), minutes idle, and away message (blank if the user
 
2061
          is not away). If you specify * for channel, every user on the
 
2062
          botnet is returned with an extra argument indicating the channel
 
2063
          the user is on.</p>
 
2064
 
 
2065
          <p><strong>Module:</strong> core</p>
 
2066
        </dd>
 
2067
 
 
2068
        <dt><strong>getdccidle &lt;idx&gt;</strong></dt>
 
2069
 
 
2070
        <dd>
 
2071
          <p><strong>Returns:</strong> number of seconds the dcc chat/file
 
2072
          system/script user has been idle</p>
 
2073
 
 
2074
          <p><strong>Module:</strong> core</p>
 
2075
        </dd>
 
2076
 
 
2077
        <dt><strong>getdccaway &lt;idx&gt;</strong></dt>
 
2078
 
 
2079
        <dd>
 
2080
          <p><strong>Returns:</strong> away message for a dcc chat user
 
2081
          (or &quot;&quot; if the user is not set away)</p>
 
2082
 
 
2083
          <p><strong>Module:</strong> core</p>
 
2084
        </dd>
 
2085
 
 
2086
        <dt><strong>setdccaway &lt;idx&gt; &lt;message&gt;</strong></dt>
 
2087
 
 
2088
        <dd>
 
2089
          <p><strong>Description:</strong> sets a party line user&#39;s away
 
2090
          message and marks them away. If set to &quot;&quot;, the user is
 
2091
          marked as no longer away.</p>
 
2092
 
 
2093
          <p><strong>Returns:</strong> nothing</p>
 
2094
 
 
2095
          <p><strong>Module:</strong> core</p>
 
2096
        </dd>
 
2097
 
 
2098
        <dt><strong>connect &lt;host&gt; &lt;port&gt;</strong></dt>
 
2099
 
 
2100
        <dd>
 
2101
          <p><strong>Description:</strong> makes an outgoing connection
 
2102
          attempt and creates a dcc entry for it. A &#39;control&#39;
 
2103
          command should be used immediately after a successful
 
2104
          &#39;connect&#39; so no input is lost.</p>
 
2105
 
 
2106
          <p><strong>Returns:</strong> idx of the new connection</p>
 
2107
 
 
2108
          <p><strong>Module:</strong> core</p>
 
2109
        </dd>
 
2110
 
 
2111
        <dt><strong>listen &lt;port&gt; &lt;type&gt; [options]
 
2112
        [flag]</strong></dt>
 
2113
 
 
2114
        <dd>
 
2115
          <p><strong>Description:</strong> opens a listening port to accept
 
2116
          incoming telnets; type must be one of &quot;bots&quot;,
 
2117
          &quot;all&quot;, &quot;users&quot;, &quot;script&quot;, or
 
2118
          &quot;off&quot;:</p>
 
2119
 
 
2120
          <blockquote>
 
2121
            <dl>
 
2122
              <dt><strong>listen &lt;port&gt; bots [mask]</strong></dt>
 
2123
 
 
2124
              <dd>
 
2125
                <p><strong>Description:</strong> accepts connections from
 
2126
                bots only; the optional mask is used to identify permitted
 
2127
                bot names. If the mask begins with &#39;@&#39;, it is
 
2128
                interpreted to be a mask of permitted hosts to accept
 
2129
                connections from.</p>
 
2130
 
 
2131
                <p><strong>Returns:</strong> port number</p>
 
2132
              </dd>
 
2133
 
 
2134
              <dt><strong>listen &lt;port&gt; users [mask]</strong></dt>
 
2135
 
 
2136
              <dd>
 
2137
                <p><strong>Description:</strong> accepts connections from
 
2138
                users only (no bots); the optional mask is used to identify
 
2139
                permitted nicknames. If the mask begins with &#39;@&#39;, it
 
2140
                is interpreted to be a mask of permitted hosts to accept
 
2141
                connections from.</p>
 
2142
 
 
2143
                <p><strong>Returns:</strong> port number</p>
 
2144
              </dd>
 
2145
 
 
2146
              <dt><strong>listen &lt;port&gt; all [mask]</strong></dt>
 
2147
 
 
2148
              <dd>
 
2149
                <p><strong>Description:</strong> accepts connections from
 
2150
                anyone; the optional mask is used to identify permitted
 
2151
                nicknames/botnames. If the mask begins with &#39;@&#39;,
 
2152
                it is interpreted to be a mask of permitted hosts to accept
 
2153
                connections from.</p>
 
2154
 
 
2155
                <p><strong>Returns:</strong> port number</p>
 
2156
              </dd>
 
2157
 
 
2158
              <dt><strong>listen &lt;port&gt; script &lt;proc&gt;
 
2159
              [flag]</strong></dt>
 
2160
 
 
2161
              <dd>
 
2162
                <p><strong>Description:</strong> accepts connections which
 
2163
                are immediately routed to a proc. The proc is called with
 
2164
                one parameter: the idx of the new connection. Flag may
 
2165
                currently only be &#39;pub&#39;, which makes the bot allow
 
2166
                anyone to connect.</p>
 
2167
 
 
2168
                <p><strong>Returns:</strong> port number</p>
 
2169
              </dd>
 
2170
 
 
2171
              <dt><strong>listen &lt;port&gt; off</strong></dt>
 
2172
 
 
2173
              <dd>
 
2174
                <p><strong>Description:</strong> stop listening on a port</p>
 
2175
 
 
2176
                <p><strong>Returns:</strong> nothing</p>
 
2177
              </dd>
 
2178
            </dl>
 
2179
          </blockquote>
 
2180
 
 
2181
          <p><strong>Module:</strong> core</p>
 
2182
        </dd>
 
2183
 
 
2184
        <dt><strong>dccdumpfile &lt;idx&gt; &lt;filename&gt;</strong></dt>
 
2185
 
 
2186
        <dd>
 
2187
          <p><strong>Description:</strong> dumps out a file from the text
 
2188
          directory to a dcc chat user. The flag matching that&#39;s used
 
2189
          everywhere else works here, too.</p>
 
2190
 
 
2191
          <p><strong>Returns:</strong> nothing</p>
 
2192
 
 
2193
          <p><strong>Module:</strong> core</p>
 
2194
        </dd>
 
2195
      </dl>
 
2196
    </blockquote>
 
2197
 
 
2198
    <p><a name="notes"></a>5. <strong>Notes module</strong></p>
 
2199
 
 
2200
    <blockquote>
 
2201
      <dl>
 
2202
        <dt><strong>notes &lt;user&gt; [numberlist]</strong></dt>
 
2203
 
 
2204
        <dd>
 
2205
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
 
2206
          failure. If a numberlist is not specified, the number of notes
 
2207
          stored for the user is returned. Otherwise, a list of sublists
 
2208
          containing information about notes stored for the user is
 
2209
          returned. Each sublist is in the format of: {&lt;from&gt;
 
2210
          &lt;timestamp&gt; &lt;note text&gt;}.</p>
 
2211
 
 
2212
          <p><strong>Module:</strong> notes</p>
 
2213
        </dd>
 
2214
 
 
2215
        <dt><strong>erasenotes &lt;user&gt; &lt;numberlist&gt;</strong></dt>
 
2216
 
 
2217
        <dd>
 
2218
          <p><strong>Description:</strong> erases some or all stored notes
 
2219
          for a user. Use &#39;-&#39; to erase all notes.</p>
 
2220
 
 
2221
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
 
2222
          failure, 0 if no such note, or number of erased notes.</p>
 
2223
 
 
2224
          <p><strong>Module:</strong> notes</p>
 
2225
        </dd>
 
2226
 
 
2227
        <dt><strong>listnotes &lt;user&gt; &lt;numberlist&gt;</strong></dt>
 
2228
 
 
2229
        <dd>
 
2230
          <p><strong>Description:</strong> lists existing notes according
 
2231
          to the numberlist (ex: &quot;2-4;8;16-&quot;)</p>
 
2232
 
 
2233
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
 
2234
          failure, 0 if no such note, list of existing notes.</p>
 
2235
 
 
2236
          <p><strong>Module:</strong> notes</p>
 
2237
        </dd>
 
2238
 
 
2239
        <dt><strong>storenote &lt;from&gt; &lt;to&gt; &lt;msg&gt;
 
2240
        &lt;idx&gt;</strong></dt>
 
2241
 
 
2242
        <dd>
 
2243
          <p><strong>Description:</strong> stores a note for later reading,
 
2244
          notifies idx of any results (use idx -1 for no notify).</p>
 
2245
 
 
2246
          <p><strong>Returns:</strong> 0 on success; non-0 on failure</p>
 
2247
 
 
2248
          <p><strong>Module:</strong> notes</p>
 
2249
        </dd>
 
2250
      </dl>
 
2251
    </blockquote>
 
2252
 
 
2253
    <p><a name="assoc"></a>6. <strong>Assoc module</strong></p>
 
2254
 
 
2255
    <blockquote>
 
2256
      <dl>
 
2257
        <dt><strong>assoc &lt;chan&gt; [name]</strong></dt>
 
2258
 
 
2259
        <dd>
 
2260
          <p><strong>Description:</strong> sets the name associated with a
 
2261
          botnet channel, if you specify one</p>
 
2262
 
 
2263
          <p><strong>Returns:</strong> current name for that channel, if
 
2264
          any</p>
 
2265
 
 
2266
          <p><strong>Module:</strong> assoc</p>
 
2267
        </dd>
 
2268
 
 
2269
        <dt><strong>killassoc &lt;chan&gt;</strong></dt>
 
2270
 
 
2271
        <dd>
 
2272
          <p><strong>Description:</strong> removes the name associated
 
2273
          with a botnet channel, if any exists. Use &#39;killassoc &amp;&#39;
 
2274
          to kill all assocs.</p>
 
2275
 
 
2276
          <p><strong>Returns:</strong> nothing</p>
 
2277
 
 
2278
          <p><strong>Module:</strong> assoc</p>
 
2279
        </dd>
 
2280
      </dl>
 
2281
    </blockquote>
 
2282
 
 
2283
    <p><a name="compress"></a>7. <strong>Compress module</strong></p>
 
2284
 
 
2285
    <blockquote>
 
2286
      <dl>
 
2287
        <dt><strong>compressfile [-level &lt;level&gt;] &lt;src-file&gt;
 
2288
        [target-file]<br>
 
2289
        uncompressfile &lt;src-file&gt; [target-file]</strong></dt>
 
2290
 
 
2291
        <dd>
 
2292
          <p><strong>Description:</strong> compresses or un-compresses
 
2293
          files. The level option specifies the compression mode to use
 
2294
          when compressing. Available modes are from 0 (minimum CPU usage,
 
2295
          minimum compression) all the way up to 9 (maximum CPU usage,
 
2296
          maximum compression). If you don&#39;t specify the target-file,
 
2297
          the src-file will be overwritten.</p>
 
2298
 
 
2299
          <p><strong>Returns:</strong> nothing</p>
 
2300
 
 
2301
          <p><strong>Module:</strong> compress</p>
 
2302
        </dd>
 
2303
 
 
2304
        <dt><strong>iscompressed &lt;filename&gt;</strong></dt>
 
2305
 
 
2306
        <dd>
 
2307
          <p><strong>Description:</strong> determines whether
 
2308
          &lt;filename&gt; is gzip compressed. Returns 1 if it is, 0 if it
 
2309
          isn&#39;t, and 2 if some kind of error prevented the checks from
 
2310
          succeeding.</p>
 
2311
 
 
2312
          <p><strong>Returns:</strong> nothing</p>
 
2313
 
 
2314
          <p><strong>Module:</strong> compress</p>
 
2315
        </dd>
 
2316
      </dl>
 
2317
    </blockquote>
 
2318
 
 
2319
    <p><a name="filesys"></a>8. <strong>Filesys module</strong></p>
 
2320
 
 
2321
    <blockquote>
 
2322
      <dl>
 
2323
        <dt><strong>setpwd &lt;idx&gt; &lt;dir&gt;</strong></dt>
 
2324
 
 
2325
        <dd>
 
2326
          <p><strong>Description:</strong> changes the directory of a file
 
2327
          system user, in exactly the same way as a &#39;cd&#39; command
 
2328
          would. The directory can be specified relative or absolute.</p>
 
2329
 
 
2330
          <p><strong>Returns:</strong> nothing</p>
 
2331
 
 
2332
          <p><strong>Module:</strong> filesys</p>
 
2333
        </dd>
 
2334
 
 
2335
        <dt><strong>getpwd &lt;idx&gt;</strong></dt>
 
2336
 
 
2337
        <dd>
 
2338
          <p><strong>Returns:</strong> the current directory of a file
 
2339
          system user</p>
 
2340
 
 
2341
          <p><strong>Module:</strong> filesys</p>
 
2342
        </dd>
 
2343
 
 
2344
        <dt><strong>getfiles &lt;dir&gt;</strong></dt>
 
2345
 
 
2346
        <dd>
 
2347
          <p><strong>Returns:</strong> a list of files in the directory
 
2348
          given; the directory is relative to dcc-path</p>
 
2349
 
 
2350
          <p><strong>Module:</strong> filesys</p>
 
2351
        </dd>
 
2352
 
 
2353
        <dt><strong>getdirs &lt;dir&gt;</strong></dt>
 
2354
 
 
2355
        <dd>
 
2356
          <p><strong>Returns:</strong> a list of subdirectories in the
 
2357
          directory given; the directory is relative to dcc-path</p>
 
2358
 
 
2359
          <p><strong>Module:</strong> filesys</p>
 
2360
        </dd>
 
2361
 
 
2362
        <dt><strong>dccsend &lt;filename&gt; &lt;ircnick&gt;</strong></dt>
 
2363
 
 
2364
        <dd>
 
2365
          <p><strong>Description:</strong> attempts to start a dcc file
 
2366
          transfer to the given nick; the filename must be specified either
 
2367
          by full pathname or in relation to the bot&#39;s startup
 
2368
          directory</p>
 
2369
 
 
2370
          <p><strong>Returns:</strong></p>
 
2371
 
 
2372
          <blockquote>
 
2373
            <table>
 
2374
              <tr valign="top">
 
2375
                <td>
 
2376
                  <p><strong>0</strong></p>
 
2377
                </td>
 
2378
 
 
2379
                <td>
 
2380
                  <p>success</p>
 
2381
                </td>
 
2382
              </tr>
 
2383
 
 
2384
              <tr valign="top">
 
2385
                <td>
 
2386
                  <p><strong>1</strong></p>
 
2387
                </td>
 
2388
 
 
2389
                <td>
 
2390
                  <p>the dcc table is full (too many connections)</p>
 
2391
                </td>
 
2392
              </tr>
 
2393
 
 
2394
              <tr valign="top">
 
2395
                <td>
 
2396
                  <p><strong>2</strong></p>
 
2397
                </td>
 
2398
 
 
2399
                <td>
 
2400
                  <p>can&#39;t open a socket for the transfer</p>
 
2401
                </td>
 
2402
              </tr>
 
2403
 
 
2404
              <tr valign="top">
 
2405
                <td>
 
2406
                  <p><strong>3</strong></p>
 
2407
                </td>
 
2408
 
 
2409
                <td>
 
2410
                  <p>the file doesn&#39;t exist</p>
 
2411
                </td>
 
2412
              </tr>
 
2413
 
 
2414
              <tr valign="top">
 
2415
                <td>
 
2416
                  <p><strong>4</strong></p>
 
2417
                </td>
 
2418
 
 
2419
                <td>
 
2420
                  <p>the file was queued for later transfer, which means that
 
2421
                  person has too many file transfers going right now</p>
 
2422
                </td>
 
2423
              </tr>
 
2424
 
 
2425
              <tr valign="top">
 
2426
                <td>
 
2427
                  <p><strong>5</strong></p>
 
2428
                </td>
 
2429
 
 
2430
                <td>
 
2431
                  <p>copy-to-tmp is enabled and the file already exists in the
 
2432
                  temp directory</p>
 
2433
                </td>
 
2434
              </tr>
 
2435
            </table>
 
2436
          </blockquote>
 
2437
 
 
2438
          <p><strong>Module:</strong> transfer</p>
 
2439
        </dd>
 
2440
 
 
2441
        <dt><strong>filesend &lt;idx&gt; &lt;filename&gt;
 
2442
        [ircnick]</strong></dt>
 
2443
 
 
2444
        <dd>
 
2445
          <p><strong>Description:</strong> like dccsend, except it operates
 
2446
          for a current filesystem user, and the filename is assumed to be
 
2447
          a relative path from that user&#39;s current directory</p>
 
2448
 
 
2449
          <p><strong>Returns:</strong> 0 on failure; 1 on success (either an
 
2450
          immediate send or a queued send)</p>
 
2451
 
 
2452
          <p><strong>Module:</strong> filesys</p>
 
2453
        </dd>
 
2454
 
 
2455
        <dt><strong>fileresend &lt;idx&gt; &lt;filename&gt;
 
2456
        [ircnick]</strong></dt>
 
2457
 
 
2458
        <dd>
 
2459
          <p><strong>Description:</strong> functions like filesend, only that
 
2460
          it sends a DCC RESEND instead of a DCC SEND, which allows people
 
2461
          to resume aborted file transfers if their client supports that
 
2462
          protocol. ircII/BitchX/etc. support it; mIRC does not.</p>
 
2463
 
 
2464
          <p><strong>Returns:</strong> 0 on failure; 1 on success (either
 
2465
          an immediate send or a queued send)</p>
 
2466
 
 
2467
          <p><strong>Module:</strong> filesys</p>
 
2468
        </dd>
 
2469
 
 
2470
        <dt><strong>setdesc &lt;dir&gt; &lt;file&gt; &lt;desc&gt;</strong></dt>
 
2471
 
 
2472
        <dd>
 
2473
          <p><strong>Description:</strong> sets the description for a file
 
2474
          in a file system directory; the directory is relative to
 
2475
          dcc-path</p>
 
2476
 
 
2477
          <p><strong>Returns:</strong> nothing</p>
 
2478
 
 
2479
          <p><strong>Module:</strong> filesys</p>
 
2480
        </dd>
 
2481
 
 
2482
        <dt><strong>getdesc &lt;dir&gt; &lt;file&gt;</strong></dt>
 
2483
 
 
2484
        <dd>
 
2485
          <p><strong>Returns:</strong> the description for a file in the
 
2486
          file system, if one exists</p>
 
2487
 
 
2488
          <p><strong>Module:</strong> filesys</p>
 
2489
        </dd>
 
2490
 
 
2491
        <dt><strong>setowner &lt;dir&gt; &lt;file&gt;
 
2492
        &lt;handle&gt;</strong></dt>
 
2493
 
 
2494
        <dd>
 
2495
          <p><strong>Description:</strong> changes the owner for a file in
 
2496
          the file system; the directory is relative to dcc-path</p>
 
2497
 
 
2498
          <p><strong>Returns:</strong> nothing</p>
 
2499
 
 
2500
          <p><strong>Module:</strong> filesys</p>
 
2501
        </dd>
 
2502
 
 
2503
        <dt><strong>getowner &lt;dir&gt; &lt;file&gt;</strong></dt>
 
2504
 
 
2505
        <dd>
 
2506
          <p><strong>Returns:</strong> the owner of a file in the file
 
2507
          system</p>
 
2508
 
 
2509
          <p><strong>Module:</strong> filesys</p>
 
2510
        </dd>
 
2511
 
 
2512
        <dt><strong>setlink &lt;dir&gt; &lt;file&gt; &lt;link&gt;</strong></dt>
 
2513
 
 
2514
        <dd>
 
2515
          <p><strong>Description:</strong> creates or changes a linked file
 
2516
          (a file that actually exists on another bot); the directory is
 
2517
          relative to dcc-path</p>
 
2518
 
 
2519
          <p><strong>Returns:</strong> nothing</p>
 
2520
 
 
2521
          <p><strong>Module:</strong> filesys</p>
 
2522
        </dd>
 
2523
 
 
2524
        <dt><strong>getlink &lt;dir&gt; &lt;file&gt;</strong></dt>
 
2525
 
 
2526
        <dd>
 
2527
          <p><strong>Returns:</strong> the link for a linked file, if it
 
2528
          exists</p>
 
2529
 
 
2530
          <p><strong>Module:</strong> filesys</p>
 
2531
        </dd>
 
2532
 
 
2533
        <dt><strong>getfileq &lt;handle&gt;</strong></dt>
 
2534
 
 
2535
        <dd>
 
2536
          <p><strong>Returns:</strong> list of files queued by someone;
 
2537
          each item in the list will be a sublist with two elements: nickname
 
2538
          the file is being sent to and the filename</p>
 
2539
 
 
2540
          <p><strong>Module:</strong> transfer</p>
 
2541
        </dd>
 
2542
 
 
2543
        <dt><strong>getfilesendtime &lt;idx&gt;</strong></dt>
 
2544
 
 
2545
        <dd>
 
2546
          <p><strong>Returns:</strong> the unixtime value for when a file
 
2547
          transfer started, or a negative number:</p>
 
2548
 
 
2549
          <blockquote>
 
2550
            <table>
 
2551
              <tr valign="top">
 
2552
                <td>
 
2553
                  <p><strong>-1</strong></p>
 
2554
                </td>
 
2555
 
 
2556
                <td>
 
2557
                  <p>no matching transfer with the specified idx was found</p>
 
2558
                </td>
 
2559
              </tr>
 
2560
 
 
2561
              <tr valign="top">
 
2562
                <td>
 
2563
                  <p><strong>-2</strong></p>
 
2564
                </td>
 
2565
 
 
2566
                <td>
 
2567
                  <p>the idx matches an entry which is not a file transfer</p>
 
2568
                </td>
 
2569
              </tr>
 
2570
            </table>
 
2571
          </blockquote>
 
2572
 
 
2573
          <p><strong>Module:</strong> transfer</p>
 
2574
        </dd>
 
2575
 
 
2576
        <dt><strong>mkdir &lt;directory&gt; [&lt;required-flags&gt;
 
2577
        [channel]]</strong></dt>
 
2578
 
 
2579
        <dd>
 
2580
          <p><strong>Description:</strong> creates a directory in the file
 
2581
          system. Only users with the required flags may access it.</p>
 
2582
 
 
2583
          <p><strong>Returns:</strong></p>
 
2584
 
 
2585
          <blockquote>
 
2586
            <table>
 
2587
              <tr valign="top">
 
2588
                <td>
 
2589
                  <p><strong>0</strong></p>
 
2590
                </td>
 
2591
 
 
2592
                <td>
 
2593
                  <p>success</p>
 
2594
                </td>
 
2595
              </tr>
 
2596
 
 
2597
              <tr valign="top">
 
2598
                <td>
 
2599
                  <p><strong>1</strong></p>
 
2600
                </td>
 
2601
 
 
2602
                <td>
 
2603
                  <p>can&#39;t create directory</p>
 
2604
                </td>
 
2605
              </tr>
 
2606
 
 
2607
              <tr valign="top">
 
2608
                <td>
 
2609
                  <p><strong>2</strong></p>
 
2610
                </td>
 
2611
 
 
2612
                <td>
 
2613
                  <p>directory exists but is not a directory</p>
 
2614
                </td>
 
2615
              </tr>
 
2616
            </table>
 
2617
          </blockquote>
 
2618
 
 
2619
          <p><strong>Module:</strong> filesys</p>
 
2620
        </dd>
 
2621
 
 
2622
        <dt><strong>rmdir &lt;directory&gt;</strong></dt>
 
2623
 
 
2624
        <dd>
 
2625
          <p><strong>Description:</strong> removes a directory from the
 
2626
          file system.</p>
 
2627
 
 
2628
          <p><strong>Returns:</strong> 0 on success; 1 on failure</p>
 
2629
 
 
2630
          <p><strong>Module:</strong> filesys</p>
 
2631
        </dd>
 
2632
 
 
2633
        <dt><strong>mv &lt;file&gt; &lt;destination&gt;</strong></dt>
 
2634
 
 
2635
        <dd>
 
2636
          <p><strong>Description:</strong> moves a file from its source to
 
2637
          the given destination. The file can also be a mask, such as
 
2638
          /incoming/*, provided the destination is a directory.</p>
 
2639
 
 
2640
          <p><strong>Returns:</strong> If the command was successful, the
 
2641
          number of files moved will be returned. Otherwise, a negative
 
2642
          number will be returned:</p>
 
2643
 
 
2644
          <blockquote>
 
2645
            <table>
 
2646
              <tr valign="top">
 
2647
                <td>
 
2648
                  <p><strong>-1</strong></p>
 
2649
                </td>
 
2650
 
 
2651
                <td>
 
2652
                  <p>invalid source file</p>
 
2653
                </td>
 
2654
              </tr>
 
2655
 
 
2656
              <tr valign="top">
 
2657
                <td>
 
2658
                  <p><strong>-2</strong></p>
 
2659
                </td>
 
2660
 
 
2661
                <td>
 
2662
                  <p>invalid destination</p>
 
2663
                </td>
 
2664
              </tr>
 
2665
 
 
2666
              <tr valign="top">
 
2667
                <td>
 
2668
                  <p><strong>-3</strong></p>
 
2669
                </td>
 
2670
 
 
2671
                <td>
 
2672
                  <p>destination file exists</p>
 
2673
                </td>
 
2674
              </tr>
 
2675
 
 
2676
              <tr valign="top">
 
2677
                <td>
 
2678
                  <p><strong>-4</strong></p>
 
2679
                </td>
 
2680
 
 
2681
                <td>
 
2682
                  <p>no matches found</p>
 
2683
                </td>
 
2684
              </tr>
 
2685
            </table>
 
2686
          </blockquote>
 
2687
 
 
2688
          <p><strong>Module:</strong> filesys</p>
 
2689
        </dd>
 
2690
 
 
2691
        <dt><strong>cp &lt;file&gt; &lt;destination&gt;</strong></dt>
 
2692
 
 
2693
        <dd>
 
2694
          <p><strong>Description:</strong> copies a file from its source
 
2695
          to the given destination. The file can also be a mask, such as
 
2696
          /incoming/*, provided the destination is a directory.</p>
 
2697
 
 
2698
          <p><strong>Returns:</strong> If the command was successful, the
 
2699
          number of files copied will be returned. Otherwise, a negative
 
2700
          number will be returned:</p>
 
2701
 
 
2702
          <blockquote>
 
2703
            <table>
 
2704
              <tr valign="top">
 
2705
                <td>
 
2706
                  <p><strong>-1</strong></p>
 
2707
                </td>
 
2708
 
 
2709
                <td>
 
2710
                  <p>invalid source file</p>
 
2711
                </td>
 
2712
              </tr>
 
2713
 
 
2714
              <tr valign="top">
 
2715
                <td>
 
2716
                  <p><strong>-2</strong></p>
 
2717
                </td>
 
2718
 
 
2719
                <td>
 
2720
                  <p>invalid destination</p>
 
2721
                </td>
 
2722
              </tr>
 
2723
 
 
2724
              <tr valign="top">
 
2725
                <td>
 
2726
                  <p><strong>-3</strong></p>
 
2727
                </td>
 
2728
 
 
2729
                <td>
 
2730
                  <p>destination file exists</p>
 
2731
                </td>
 
2732
              </tr>
 
2733
 
 
2734
              <tr valign="top">
 
2735
                <td>
 
2736
                  <p><strong>-4</strong></p>
 
2737
                </td>
 
2738
 
 
2739
                <td>
 
2740
                  <p>no matches found</p>
 
2741
                </td>
 
2742
              </tr>
 
2743
            </table>
 
2744
          </blockquote>
 
2745
 
 
2746
          <p><strong>Module:</strong> filesys</p>
 
2747
        </dd>
 
2748
 
 
2749
        <dt><strong>getflags &lt;dir&gt;</strong></dt>
 
2750
 
 
2751
        <dd>
 
2752
          <p><strong>Returns:</strong> the flags required to access a
 
2753
          directory</p>
 
2754
 
 
2755
          <p><strong>Module:</strong> filesys</p>
 
2756
        </dd>
 
2757
 
 
2758
        <dt><strong>setflags &lt;dir&gt; [&lt;flags&gt;
 
2759
        [channel]]</strong></dt>
 
2760
 
 
2761
        <dd>
 
2762
          <p><strong>Description:</strong> sets the flags required to
 
2763
          access a directory</p>
 
2764
 
 
2765
          <p><strong>Returns:</strong> 0 on success; -1 on failure</p>
 
2766
 
 
2767
          <p><strong>Module:</strong> filesys</p>
 
2768
        </dd>
 
2769
      </dl>
 
2770
    </blockquote>
 
2771
 
 
2772
    <p><a name="misc"></a>9. <strong>Miscellaneous commands</strong></p>
 
2773
 
 
2774
    <blockquote>
 
2775
      <dl>
 
2776
        <dt><strong>bind &lt;type&gt; &lt;flags&gt; &lt;keyword/mask&gt;
 
2777
        [proc-name]</strong></dt>
 
2778
 
 
2779
        <dd>
 
2780
          <p><strong>Description:</strong> You can use the &#39;bind&#39;
 
2781
          command to attach Tcl procedures to certain events. flags are the
 
2782
          flags the user must have to trigger the event (if applicable).
 
2783
          proc-name is the name of the Tcl procedure to call for this
 
2784
          command (see below for the format of the procedure call). If the
 
2785
          proc-name is omitted, no binding is added. Instead, the current
 
2786
          binding is returned (if it&#39;s stackable, a list of the current
 
2787
          bindings is returned).</p>
 
2788
 
 
2789
          <p><strong>Returns:</strong> name of the command that was added,
 
2790
          or (if proc-name was omitted), a list of the current bindings for
 
2791
          this command</p>
 
2792
 
 
2793
          <p><strong>Module:</strong> core</p>
 
2794
        </dd>
 
2795
 
 
2796
        <dt><strong>unbind &lt;type&gt; &lt;flags&gt; &lt;keyword/mask&gt;
 
2797
        &lt;proc-name&gt;</strong></dt>
 
2798
 
 
2799
        <dd>
 
2800
          <p><strong>Description:</strong> removes a previously created
 
2801
          bind</p>
 
2802
 
 
2803
          <p><strong>Returns:</strong> name of the command that was
 
2804
          removed</p>
 
2805
 
 
2806
          <p><strong>Module:</strong> core</p>
 
2807
        </dd>
 
2808
 
 
2809
        <dt><strong>binds [type/mask]</strong></dt>
 
2810
 
 
2811
        <dd>
 
2812
          <p><strong>Returns:</strong> a list of Tcl binds, each item in the
 
2813
          list is a sublist of five elements: {&lt;type&gt; &lt;flags&gt;
 
2814
          &lt;name&gt; &lt;hits&gt; &lt;proc&gt;}</p>
 
2815
 
 
2816
          <p><strong>Module:</strong> core</p>
 
2817
        </dd>
 
2818
 
 
2819
        <dt><strong>logfile [&lt;modes&gt; &lt;channel&gt;
 
2820
        &lt;filename&gt;]</strong></dt>
 
2821
 
 
2822
        <dd>
 
2823
          <p><strong>Description:</strong> creates a new logfile, which will
 
2824
          log the modes given for the channel listed. If no logfile is
 
2825
          specified, a list of existing logfiles will be returned.
 
2826
          &quot;*&quot; indicates all channels. You can also change the
 
2827
          modes and channel of an existing logfile with this command.
 
2828
          Entering a blank mode and channel (&quot;&quot;) makes the bot
 
2829
          stop logging there.</p>
 
2830
 
 
2831
          <p><strong>Returns:</strong> filename of logfile created, or, if
 
2832
          no logfile is specified, a list of logfiles such as: {mco *
 
2833
          eggdrop.log} {jp #lame lame.log}</p>
 
2834
 
 
2835
          <p><strong>Module:</strong> core</p>
 
2836
        </dd>
 
2837
 
 
2838
        <dt><strong>maskhost &lt;nick!user@host&gt;</strong></dt>
 
2839
 
 
2840
        <dd>
 
2841
          <p><strong>Returns:</strong> masked hostmask for the string
 
2842
          given (&quot;n!u@1.2.3.4&quot; -&gt; &quot;*!u@1.2.3.*&quot;,
 
2843
          &quot;n!u@lame.com&quot; -&gt; &quot;*!u@lame.com&quot;,
 
2844
          &quot;n!u@a.b.edu&quot; -&gt; &quot;*!u@*.b.edu&quot;)</p>
 
2845
 
 
2846
          <p><strong>Module:</strong> core</p>
 
2847
        </dd>
 
2848
 
 
2849
        <dt><strong>timer &lt;minutes&gt; &lt;tcl-command&gt;</strong></dt>
 
2850
 
 
2851
        <dd>
 
2852
          <p><strong>Description:</strong> executes the given Tcl command
 
2853
          after a certain number of minutes have passed</p>
 
2854
 
 
2855
          <p><strong>Returns:</strong> a timerID</p>
 
2856
 
 
2857
          <p><strong>Module:</strong> core</p>
 
2858
        </dd>
 
2859
 
 
2860
        <dt><strong>utimer &lt;seconds&gt; &lt;tcl-command&gt;</strong></dt>
 
2861
 
 
2862
        <dd>
 
2863
          <p><strong>Description:</strong> executes the given Tcl command
 
2864
          after a certain number of seconds have passed</p>
 
2865
 
 
2866
          <p><strong>Returns:</strong> a timerID</p>
 
2867
 
 
2868
          <p><strong>Module:</strong> core</p>
 
2869
        </dd>
 
2870
 
 
2871
        <dt><strong>timers</strong></dt>
 
2872
 
 
2873
        <dd>
 
2874
          <p><strong>Returns:</strong> a list of active minutely timers.
 
2875
          Each entry in the list contains the number of minutes left till
 
2876
          activation, the command that will be executed, and the timerID.</p>
 
2877
 
 
2878
          <p><strong>Module:</strong> core</p>
 
2879
        </dd>
 
2880
 
 
2881
        <dt><strong>utimers</strong></dt>
 
2882
 
 
2883
        <dd>
 
2884
          <p><strong>Returns:</strong> a list of active secondly timers.
 
2885
          Each entry in the list contains the number of minutes left till
 
2886
          activation, the command that will be executed, and the timerID.</p>
 
2887
 
 
2888
          <p><strong>Module:</strong> core</p>
 
2889
        </dd>
 
2890
 
 
2891
        <dt><strong>killtimer &lt;timerID&gt;</strong></dt>
 
2892
 
 
2893
        <dd>
 
2894
          <p><strong>Description:</strong> removes a minutely timer from
 
2895
          the list</p>
 
2896
 
 
2897
          <p><strong>Returns:</strong> nothing</p>
 
2898
 
 
2899
          <p><strong>Module:</strong> core</p>
 
2900
        </dd>
 
2901
 
 
2902
        <dt><strong>killutimer &lt;timerID&gt;</strong></dt>
 
2903
 
 
2904
        <dd>
 
2905
          <p><strong>Description:</strong> removes a secondly timer from
 
2906
          the list</p>
 
2907
 
 
2908
          <p><strong>Returns:</strong> nothing</p>
 
2909
 
 
2910
          <p><strong>Module:</strong> core</p>
 
2911
        </dd>
 
2912
 
 
2913
        <dt><strong>unixtime</strong></dt>
 
2914
 
 
2915
        <dd>
 
2916
          <p><strong>Returns:</strong> a long integer which represents the
 
2917
          number of seconds that have passed since 00:00 Jan 1, 1970 (GMT).</p>
 
2918
 
 
2919
          <p><strong>Module:</strong> core</p>
 
2920
        </dd>
 
2921
 
 
2922
        <dt><strong>duration &lt;seconds&gt;</strong></dt>
 
2923
 
 
2924
        <dd>
 
2925
          <p><strong>Returns:</strong> the number of seconds converted
 
2926
          into years, weeks, days, hours, minutes, and seconds. 804600
 
2927
          seconds is turned into 1 week 2 days 7 hours 30 minutes.</p>
 
2928
 
 
2929
          <p><strong>Module:</strong> core</p>
 
2930
        </dd>
 
2931
 
 
2932
        <dt><strong>strftime &lt;formatstring&gt; [time]</strong></dt>
 
2933
 
 
2934
        <dd>
 
2935
          <p><strong>Returns:</strong> a formatted string of time using
 
2936
          standard strftime format. If time is specified, the value of the
 
2937
          specified time is used. Otherwise, the current time is used.</p>
 
2938
 
 
2939
          <p><strong>Module:</strong> core</p>
 
2940
        </dd>
 
2941
 
 
2942
        <dt><strong>ctime &lt;unixtime&gt;</strong></dt>
 
2943
 
 
2944
        <dd>
 
2945
          <p><strong>Returns:</strong> a formatted date/time string based
 
2946
          on the current locale settings from the unixtime string given; for
 
2947
          example &quot;Fri Aug 3 11:34:55 1973&quot;</p>
 
2948
 
 
2949
          <p><strong>Module:</strong> core</p>
 
2950
        </dd>
 
2951
 
 
2952
        <dt><strong>myip</strong></dt>
 
2953
 
 
2954
        <dd>
 
2955
          <p><strong>Returns:</strong> a long number representing the
 
2956
          bot&#39;s IP address, as it might appear in (for example) a DCC
 
2957
          request</p>
 
2958
 
 
2959
          <p><strong>Module:</strong> core</p>
 
2960
        </dd>
 
2961
 
 
2962
        <dt><strong>rand &lt;limit&gt;</strong></dt>
 
2963
 
 
2964
        <dd>
 
2965
          <p><strong>Returns:</strong> a random integer between 0 and
 
2966
          limit-1</p>
 
2967
 
 
2968
          <p><strong>Module:</strong> core</p>
 
2969
        </dd>
 
2970
 
 
2971
        <dt><strong>control &lt;idx&gt; &lt;command&gt;</strong></dt>
 
2972
 
 
2973
        <dd>
 
2974
          <p><strong>Description:</strong> removes an idx from the party line
 
2975
          and sends all future input to the Tcl command given. The command
 
2976
          will be called with two parameters: the idx and the input text.
 
2977
          The command should return 0 to indicate success and 1 to indicate
 
2978
          that it relinquishes control of the user back to the bot. If the
 
2979
          input text is blank (&quot;&quot;), it indicates that the
 
2980
          connection has been dropped. Also, if the input text is blank,
 
2981
          never call killdcc on it, as it will fail with &quot;invalid
 
2982
          idx&quot;.</p>
 
2983
 
 
2984
          <p><strong>Returns:</strong> nothing</p>
 
2985
 
 
2986
          <p><strong>Module:</strong> core</p>
 
2987
        </dd>
 
2988
 
 
2989
        <dt><strong>sendnote &lt;from&gt; &lt;to[@bot]&gt;
 
2990
        &lt;message&gt;</strong></dt>
 
2991
 
 
2992
        <dd>
 
2993
          <p><strong>Description:</strong> simulates what happens when one
 
2994
          user sends a note to another</p>
 
2995
 
 
2996
          <p><strong>Returns:</strong></p>
 
2997
 
 
2998
          <blockquote>
 
2999
            <table>
 
3000
              <tr valign="top">
 
3001
                <td>
 
3002
                  <p><strong>0</strong></p>
 
3003
                </td>
 
3004
 
 
3005
                <td>
 
3006
                  <p>the send failed</p>
 
3007
                </td>
 
3008
              </tr>
 
3009
 
 
3010
              <tr valign="top">
 
3011
                <td>
 
3012
                  <p><strong>1</strong></p>
 
3013
                </td>
 
3014
 
 
3015
                <td>
 
3016
                  <p>the note was delivered locally or sent to another
 
3017
                  bot</p>
 
3018
                </td>
 
3019
              </tr>
 
3020
 
 
3021
              <tr valign="top">
 
3022
                <td>
 
3023
                  <p><strong>2</strong></p>
 
3024
                </td>
 
3025
 
 
3026
                <td>
 
3027
                  <p>the note was stored locally</p>
 
3028
                </td>
 
3029
              </tr>
 
3030
 
 
3031
              <tr valign="top">
 
3032
                <td>
 
3033
                  <p><strong>3</strong></p>
 
3034
                </td>
 
3035
 
 
3036
                <td>
 
3037
                  <p>the user&#39;s notebox is too full to store a note</p>
 
3038
                </td>
 
3039
              </tr>
 
3040
 
 
3041
              <tr valign="top">
 
3042
                <td>
 
3043
                  <p><strong>4</strong></p>
 
3044
                </td>
 
3045
 
 
3046
                <td>
 
3047
                  <p>a Tcl binding caught the note</p>
 
3048
                </td>
 
3049
              </tr>
 
3050
 
 
3051
              <tr valign="top">
 
3052
                <td>
 
3053
                  <p><strong>5</strong></p>
 
3054
                </td>
 
3055
 
 
3056
                <td>
 
3057
                  <p>the note was stored because the user is away</p>
 
3058
                </td>
 
3059
              </tr>
 
3060
            </table>
 
3061
          </blockquote>
 
3062
 
 
3063
          <p><strong>Module:</strong> core</p>
 
3064
        </dd>
 
3065
 
 
3066
        <dt><strong>link [via-bot] &lt;bot&gt;</strong></dt>
 
3067
 
 
3068
        <dd>
 
3069
          <p><strong>Description:</strong> attempts to link to another bot
 
3070
          directly. If you specify a via-bot, it tells the via-bot to
 
3071
          attempt the link.</p>
 
3072
 
 
3073
          <p><strong>Returns:</strong> 1 if the link will be attempted; 0
 
3074
          otherwise</p>
 
3075
 
 
3076
          <p><strong>Module:</strong> core</p>
 
3077
        </dd>
 
3078
 
 
3079
        <dt><strong>unlink &lt;bot&gt;</strong></dt>
 
3080
 
 
3081
        <dd>
 
3082
          <p><strong>Description:</strong> attempts to unlink a bot from
 
3083
          the botnet</p>
 
3084
 
 
3085
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
 
3086
 
 
3087
          <p><strong>Module:</strong> core</p>
 
3088
        </dd>
 
3089
 
 
3090
        <dt><strong>encrypt &lt;key&gt; &lt;string&gt;</strong></dt>
 
3091
 
 
3092
        <dd>
 
3093
          <p><strong>Returns:</strong> encrypted string (using the currently
 
3094
          loaded encryption module), encoded into ASCII using base-64</p>
 
3095
 
 
3096
          <p><strong>Module:</strong> encryption</p>
 
3097
        </dd>
 
3098
 
 
3099
        <dt><strong>decrypt &lt;key&gt;
 
3100
        &lt;encrypted-base64-string&gt;</strong></dt>
 
3101
 
 
3102
        <dd>
 
3103
          <p><strong>Returns:</strong> decrypted string (using the
 
3104
          currently loaded encryption module)</p>
 
3105
 
 
3106
          <p><strong>Module:</strong> encryption</p>
 
3107
        </dd>
 
3108
 
 
3109
        <dt><strong>encpass &lt;password&gt;</strong></dt>
 
3110
 
 
3111
        <dd>
 
3112
          <p><strong>Returns:</strong> encrypted string (using the currently
 
3113
          loaded encryption module)</p>
 
3114
 
 
3115
          <p><strong>Module:</strong> encryption</p>
 
3116
        </dd>
 
3117
 
 
3118
        <dt><strong>die [reason]</strong></dt>
 
3119
 
 
3120
        <dd>
 
3121
          <p><strong>Description:</strong> causes the bot to log a fatal
 
3122
          error and exit completely. If no reason is given,
 
3123
          &quot;EXIT&quot; is used.</p>
 
3124
 
 
3125
          <p><strong>Returns:</strong> nothing</p>
 
3126
 
 
3127
          <p><strong>Module:</strong> core</p>
 
3128
        </dd>
 
3129
 
 
3130
        <dt><strong>unames</strong></dt>
 
3131
 
 
3132
        <dd>
 
3133
          <p><strong>Returns:</strong> the current operating system the
 
3134
          bot is using</p>
 
3135
 
 
3136
          <p><strong>Module:</strong> core</p>
 
3137
        </dd>
 
3138
 
 
3139
        <dt><strong>dnslookup &lt;ip-address/hostname&gt; &lt;proc&gt;
 
3140
        [[arg1] [arg2] ... [argN]]</strong></dt>
 
3141
 
 
3142
        <dd>
 
3143
          <p><strong>Description:</strong> This issues an asynchronous dns
 
3144
          lookup request. The command will block if dns module is not loaded;
 
3145
          otherwise it will either return immediately or immediately call
 
3146
          the specified proc (e.g. if the lookup is already cached).</p>
 
3147
 
 
3148
          <p>As soon as the request completes, the specified proc will be
 
3149
          called as follows: &lt;proc&gt; &lt;ipaddress&gt; &lt;hostname&gt;
 
3150
          &lt;status&gt; [[arg1] [arg2] ... [argN]]</p>
 
3151
 
 
3152
          <p>status is 1 if the lookup was successful and 0 if it
 
3153
          wasn&#39;t. All additional parameters (called arg1, arg2 and argN
 
3154
          above) get appended to the proc&#39;s other parameters.</p>
 
3155
 
 
3156
          <p><strong>Returns:</strong> nothing</p>
 
3157
 
 
3158
          <p><strong>Module:</strong> core</p>
 
3159
        </dd>
 
3160
 
 
3161
        <dt><strong>md5 &lt;string&gt;</strong></dt>
 
3162
 
 
3163
        <dd>
 
3164
          <p><strong>Returns:</strong> the 128 bit MD5 message-digest of
 
3165
          the specified string</p>
 
3166
 
 
3167
          <p><strong>Module:</strong> core</p>
 
3168
        </dd>
 
3169
 
 
3170
        <dt><strong>callevent &lt;event&gt;</strong></dt>
 
3171
 
 
3172
        <dd>
 
3173
          <p><strong>Description:</strong> triggers the evnt bind manually
 
3174
          for a certain event. For example: callevent rehash.</p>
 
3175
 
 
3176
          <p><strong>Returns:</strong> nothing</p>
 
3177
 
 
3178
          <p><strong>Module:</strong> core</p>
 
3179
        </dd>
 
3180
 
 
3181
        <dt><strong>traffic</strong></dt>
 
3182
 
 
3183
        <dd>
 
3184
          <p><strong>Returns:</strong> a list of sublists containing
 
3185
          information about the bot&#39;s traffic usage in bytes. Each
 
3186
          sublist contains five elements: type, in-traffic today,
 
3187
          in-traffic total, out-traffic today, out-traffic total (in that
 
3188
          order).</p>
 
3189
 
 
3190
          <p><strong>Module:</strong> core</p>
 
3191
        </dd>
 
3192
 
 
3193
        <dt><strong>modules</strong></dt>
 
3194
 
 
3195
        <dd>
 
3196
          <p><strong>Returns:</strong> a list of sublists containing
 
3197
          information about the bot&#39;s currently loaded modules. Each
 
3198
          sublist contains three elements: module, version, and
 
3199
          dependencies. Each dependency is also a sublist containing the
 
3200
          module name and version.</p>
 
3201
 
 
3202
          <p><strong>Module:</strong> core</p>
 
3203
        </dd>
 
3204
 
 
3205
        <dt><strong>loadmodule &lt;module&gt;</strong></dt>
 
3206
 
 
3207
        <dd>
 
3208
          <p><strong>Description:</strong> attempts to load the specified
 
3209
          module.</p>
 
3210
 
 
3211
          <p><strong>Returns:</strong> &quot;Already loaded.&quot; if the
 
3212
          module is already loaded, &quot;&quot; if successful, or the
 
3213
          reason the module couldn&#39;t be loaded.</p>
 
3214
 
 
3215
          <p><strong>Module:</strong> core</p>
 
3216
        </dd>
 
3217
 
 
3218
        <dt><strong>unloadmodule &lt;module&gt;</strong></dt>
 
3219
 
 
3220
        <dd>
 
3221
          <p><strong>Description:</strong> attempts to unload the specified
 
3222
          module.</p>
 
3223
 
 
3224
          <p><strong>Returns:</strong> &quot;No such module&quot; if the
 
3225
          module is not loaded, &quot;&quot; otherwise.</p>
 
3226
 
 
3227
          <p><strong>Module:</strong> core</p>
 
3228
        </dd>
 
3229
 
 
3230
        <dt><strong>loadhelp &lt;helpfile-name&gt;</strong></dt>
 
3231
 
 
3232
        <dd>
 
3233
          <p><strong>Description:</strong> attempts to load the specified
 
3234
          help file from the help/ directory.</p>
 
3235
 
 
3236
          <p><strong>Returns:</strong> nothing</p>
 
3237
 
 
3238
          <p><strong>Module:</strong> core</p>
 
3239
        </dd>
 
3240
 
 
3241
        <dt><strong>unloadhelp &lt;helpfile-name&gt;</strong></dt>
 
3242
 
 
3243
        <dd>
 
3244
          <p><strong>Description:</strong> attempts to unload the specified
 
3245
          help file.</p>
 
3246
 
 
3247
          <p><strong>Returns:</strong> nothing</p>
 
3248
 
 
3249
          <p><strong>Module:</strong> core</p>
 
3250
        </dd>
 
3251
 
 
3252
        <dt><strong>reloadhelp</strong></dt>
 
3253
 
 
3254
        <dd>
 
3255
          <p><strong>Description:</strong> reloads the bot&#39;s help
 
3256
          files.</p>
 
3257
 
 
3258
          <p><strong>Returns:</strong> nothing</p>
 
3259
 
 
3260
          <p><strong>Module:</strong> core</p>
 
3261
        </dd>
 
3262
 
 
3263
        <dt><strong>restart</strong></dt>
 
3264
 
 
3265
        <dd>
 
3266
          <p><strong>Description:</strong> rehashes the bot, kills all
 
3267
          timers, reloads all modules, and reconnects the bot to the next
 
3268
          server in its list.</p>
 
3269
 
 
3270
          <p><strong>Returns:</strong> nothing</p>
 
3271
 
 
3272
          <p><strong>Module:</strong> core</p>
 
3273
        </dd>
 
3274
 
 
3275
        <dt><strong>rehash</strong></dt>
 
3276
 
 
3277
        <dd>
 
3278
          <p><strong>Description:</strong> rehashes the bot</p>
 
3279
 
 
3280
          <p><strong>Returns:</strong> nothing</p>
 
3281
 
 
3282
          <p><strong>Module:</strong> core</p>
 
3283
        </dd>
 
3284
      </dl>
 
3285
    </blockquote>
 
3286
 
 
3287
    <p><a name="globvars"></a>10. <strong>Global variables</strong></p>
 
3288
 
 
3289
    <blockquote>
 
3290
      <p><strong>NOTE:</strong> All config file variables are also global.</p>
 
3291
 
 
3292
      <dl>
 
3293
        <dt><strong>botnick</strong></dt>
 
3294
 
 
3295
        <dd>
 
3296
          <p><strong>Value:</strong> the current nickname the bot is using
 
3297
          (for example: &quot;Valis&quot;, &quot;Valis0&quot;, etc.)</p>
 
3298
 
 
3299
          <p><strong>Module:</strong> server</p>
 
3300
        </dd>
 
3301
 
 
3302
        <dt><strong>botname</strong></dt>
 
3303
 
 
3304
        <dd>
 
3305
          <p><strong>Value:</strong> the current nick!user@host that the
 
3306
          server sees (for example: &quot;Valis!valis@crappy.com&quot;)</p>
 
3307
 
 
3308
          <p><strong>Module:</strong> server</p>
 
3309
        </dd>
 
3310
 
 
3311
        <dt><strong>server</strong></dt>
 
3312
 
 
3313
        <dd>
 
3314
          <p><strong>Value:</strong> the current server&#39;s real name (what
 
3315
          server calls itself) and port bot is connected to (for example:
 
3316
          "irc.math.ufl.edu:6667") Note that this does not nececerilly match
 
3317
          the servers internet address.</p>
 
3318
 
 
3319
          <p><strong>Module:</strong> server</p>
 
3320
        </dd>
 
3321
 
 
3322
        <dt><strong>serveraddress</strong></dt>
 
3323
 
 
3324
        <dd>
 
3325
          <p><strong>Value:</strong> the current server&#39;s internet address
 
3326
          (hostname or IP) and port bot is connected to. This will correspond
 
3327
          to the entry in server list (for example: "eu.undernet.org:6667").
 
3328
          Note that this does not necessarily match the name server calls
 
3329
          itself.</p>
 
3330
 
 
3331
          <p><strong>Module:</strong> server</p>
 
3332
        </dd>
 
3333
 
 
3334
        <dt><strong>version</strong></dt>
 
3335
 
 
3336
        <dd>
 
3337
          <p><strong>Value:</strong> current bot version &quot;1.1.2+pl1
 
3338
          1010201 pl1&quot;; first item is the text version, second item
 
3339
          is a numerical version, and any following items are the names of
 
3340
          patches that have been added</p>
 
3341
 
 
3342
          <p><strong>Module:</strong> core</p>
 
3343
        </dd>
 
3344
 
 
3345
        <dt><strong>numversion</strong></dt>
 
3346
 
 
3347
        <dd>
 
3348
          <p><strong>Value:</strong> the current numeric bot version (for
 
3349
          example: &quot;1010201&quot;). Numerical version is in the format
 
3350
          of &quot;MNNRRPP&quot;, where:</p>
 
3351
 
 
3352
          <blockquote>
 
3353
            <table>
 
3354
              <tr valign="top">
 
3355
                <td>
 
3356
                  <p><strong>M</strong></p>
 
3357
                </td>
 
3358
 
 
3359
                <td>
 
3360
                  <p>major release number</p>
 
3361
                </td>
 
3362
              </tr>
 
3363
 
 
3364
              <tr valign="top">
 
3365
                <td>
 
3366
                  <p><strong>NN</strong></p>
 
3367
                </td>
 
3368
 
 
3369
                <td>
 
3370
                  <p>minor release number</p>
 
3371
                </td>
 
3372
              </tr>
 
3373
 
 
3374
              <tr valign="top">
 
3375
                <td>
 
3376
                  <p><strong>RR</strong></p>
 
3377
                </td>
 
3378
 
 
3379
                <td>
 
3380
                  <p>sub-release number</p>
 
3381
                </td>
 
3382
              </tr>
 
3383
 
 
3384
              <tr valign="top">
 
3385
                <td>
 
3386
                  <p><strong>PP</strong></p>
 
3387
                </td>
 
3388
 
 
3389
                <td>
 
3390
                  <p>patch level for that sub-release</p>
 
3391
                </td>
 
3392
              </tr>
 
3393
            </table>
 
3394
          </blockquote>
 
3395
 
 
3396
          <p><strong>Module:</strong> core</p>
 
3397
        </dd>
 
3398
 
 
3399
        <dt><strong>uptime</strong></dt>
 
3400
 
 
3401
        <dd>
 
3402
          <p><strong>Value:</strong> the unixtime value for when the bot
 
3403
          was started</p>
 
3404
 
 
3405
          <p><strong>Module:</strong> core</p>
 
3406
        </dd>
 
3407
 
 
3408
        <dt><strong>server-online</strong></dt>
 
3409
 
 
3410
        <dd>
 
3411
          <p><strong>Value:</strong> the unixtime value for when the bot
 
3412
          connected to its current server</p>
 
3413
 
 
3414
          <p><strong>Module:</strong> server</p>
 
3415
        </dd>
 
3416
 
 
3417
        <dt><strong>lastbind</strong></dt>
 
3418
 
 
3419
        <dd>
 
3420
          <p><strong>Value:</strong> the last command binding which was
 
3421
          triggered. This allows you to identify which command triggered
 
3422
          a Tcl proc.</p>
 
3423
 
 
3424
          <p><strong>Module:</strong> core</p>
 
3425
        </dd>
 
3426
 
 
3427
        <dt><strong>isjuped</strong></dt>
 
3428
 
 
3429
        <dd>
 
3430
          <p><strong>Value:</strong> 1 if bot&#39;s nick is juped(437);
 
3431
          0 otherwise</p>
 
3432
 
 
3433
          <p><strong>Module:</strong> server</p>
 
3434
        </dd>
 
3435
 
 
3436
        <dt><strong>handlen</strong></dt>
 
3437
 
 
3438
        <dd>
 
3439
          <p><strong>Value:</strong> the value of the HANDLEN define in
 
3440
          src/eggdrop.h</p>
 
3441
 
 
3442
          <p><strong>Module:</strong> core</p>
 
3443
        </dd>
 
3444
 
 
3445
        <dt><strong>config</strong></dt>
 
3446
 
 
3447
        <dd>
 
3448
          <p><strong>Value:</strong> the filename of the config file Eggdrop
 
3449
          is currently using</p>
 
3450
 
 
3451
          <p><strong>Module:</strong> core</p>
 
3452
        </dd>
 
3453
      </dl>
 
3454
    </blockquote>
 
3455
 
 
3456
    <p><a name="bind"></a>11. <strong>Bind</strong></p>
 
3457
 
 
3458
    <blockquote>
 
3459
      <p>You can use the &#39;bind&#39; command to attach Tcl procedures
 
3460
      to certain events. For example, you can write a Tcl procedure that
 
3461
      gets called every time a user says &quot;danger&quot; on the
 
3462
      channel.</p>
 
3463
 
 
3464
      <p>Some bind types are marked as &quot;stackable&quot;. That means
 
3465
      that you can bind multiple commands to the same trigger. Normally, for
 
3466
      example, a bind such as &#39;bind msg - stop msg:stop&#39; (which
 
3467
      makes a msg-command &quot;stop&quot; call the Tcl proc
 
3468
      &quot;msg:stop&quot;) will overwrite any previous binding you had for
 
3469
      then msg command &quot;stop&quot;. With stackable bindings, like
 
3470
      &#39;msgm&#39; for example, you can bind the same command to multiple
 
3471
      procs. When the bind is triggered, ALL of the Tcl procs that are
 
3472
      bound to it will be called.</p>
 
3473
 
 
3474
      <p>To remove a bind, use the &#39;unbind&#39; command. For example,
 
3475
      to remove the bind for the &quot;stop&quot; msg command, use
 
3476
      &#39;unbind msg - stop msg:stop&#39;.</p>
 
3477
 
 
3478
      <ol type="A">
 
3479
        <li>
 
3480
          <p><a name="binda"></a><strong>Bind types</strong></p>
 
3481
 
 
3482
          <ol>
 
3483
            <li>
 
3484
              <p><strong>MSG</strong></p>
 
3485
 
 
3486
              <p><strong>bind msg &lt;flags&gt; &lt;command&gt;
 
3487
              &lt;proc&gt;<br>
 
3488
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3489
              &lt;text&gt;</strong></p>
 
3490
 
 
3491
              <p><strong>Description:</strong> used for /msg commands. The
 
3492
              first word of the user&#39;s msg is the command, and
 
3493
              everything else becomes the text argument.</p>
 
3494
 
 
3495
              <p><strong>Module:</strong> server</p>
 
3496
            </li>
 
3497
 
 
3498
            <li>
 
3499
              <p><strong>DCC</strong></p>
 
3500
 
 
3501
              <p><strong>bind dcc &lt;flags&gt; &lt;command&gt;
 
3502
              &lt;proc&gt;<br>
 
3503
              procname &lt;handle&gt; &lt;idx&gt; &lt;text&gt;</strong></p>
 
3504
 
 
3505
              <p><strong>Description:</strong> used for partyline commands;
 
3506
              the command is the first word and everything else becomes
 
3507
              the text argument. The idx is valid until the user disconnects.
 
3508
              After that, it may be reused, so be careful about storing an
 
3509
              idx for long periods of time.</p>
 
3510
 
 
3511
              <p><strong>Module:</strong> core</p>
 
3512
            </li>
 
3513
 
 
3514
            <li>
 
3515
              <p><strong>FIL</strong></p>
 
3516
 
 
3517
              <p><strong>bind fil &lt;flags&gt; &lt;command&gt;
 
3518
              &lt;proc&gt;<br>
 
3519
              procname &lt;handle&gt; &lt;idx&gt; &lt;text&gt;</strong></p>
 
3520
 
 
3521
              <p><strong>Description:</strong> the same as DCC, except this
 
3522
              is triggered if the user is in the file area instead of the
 
3523
              party line</p>
 
3524
 
 
3525
              <p><strong>Module:</strong> filesys</p>
 
3526
            </li>
 
3527
 
 
3528
            <li>
 
3529
              <p><strong>PUB</strong></p>
 
3530
 
 
3531
              <p><strong>bind pub &lt;flags&gt; &lt;command&gt;
 
3532
              &lt;proc&gt;<br>
 
3533
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3534
              &lt;channel&gt; &lt;text&gt;</strong></p>
 
3535
 
 
3536
              <p><strong>Description:</strong> used for commands given on
 
3537
              a channel. The first word becomes the command and everything
 
3538
              else is the text argument.</p>
 
3539
 
 
3540
              <p><strong>Module:</strong> irc</p>
 
3541
            </li>
 
3542
 
 
3543
            <li>
 
3544
              <p><strong>MSGM (stackable)</strong></p>
 
3545
 
 
3546
              <p><strong>bind msgm &lt;flags&gt; &lt;mask&gt;
 
3547
              &lt;proc&gt;<br>
 
3548
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3549
              &lt;text&gt;</strong></p>
 
3550
 
 
3551
              <p><strong>Description:</strong> matches the entire line of
 
3552
              text from a /msg with the mask. This is useful for binding
 
3553
              Tcl procs to words or phrases spoken anywhere within a line
 
3554
              of text.</p>
 
3555
 
 
3556
              <p><strong>Module:</strong> server</p>
 
3557
            </li>
 
3558
 
 
3559
            <li>
 
3560
              <p><strong>PUBM (stackable)</strong></p>
 
3561
 
 
3562
              <p><strong>bind pubm &lt;flags&gt; &lt;mask&gt;
 
3563
              &lt;proc&gt;<br>
 
3564
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3565
              &lt;channel&gt; &lt;text&gt;</strong></p>
 
3566
 
 
3567
              <p><strong>Description:</strong> just like MSGM, except
 
3568
              it&#39;s triggered by things said on a channel instead of
 
3569
              things /msg&#39;d to the bot. The mask is matched against
 
3570
              the channel name followed by the text and can contain
 
3571
              wildcards. Also, if a line triggers a PUB bind, it will not
 
3572
              trigger a PUBM bind.</p>
 
3573
 
 
3574
              <p><strong>Module:</strong> irc</p>
 
3575
            </li>
 
3576
 
 
3577
            <li>
 
3578
              <p><strong>NOTC (stackable)</strong></p>
 
3579
 
 
3580
              <p><strong>bind notc &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3581
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3582
              &lt;text&gt; &lt;dest&gt;</strong></p>
 
3583
 
 
3584
              <p><strong>Description:</strong> dest will be a nickname (the
 
3585
              bot&#39;s nickname, obviously) or a channel name. mask is
 
3586
              matched against the entire notice and can contain wildcards.
 
3587
              It is considered a breach of protocol to respond to a /notice
 
3588
              on IRC, so this is intended for internal use (logging, etc.)
 
3589
              only.Note that server notices do not trigger the NOTC bind.</p>
 
3590
 
 
3591
              <p>New Tcl procs should be declared as</p>
 
3592
 
 
3593
<pre>
 
3594
  proc notcproc {nick uhost hand text {dest &quot;&quot;}} {
 
3595
    global botnick; if {$dest == &quot;&quot;} {set dest $botnick}
 
3596
    ...
 
3597
  }
 
3598
</pre>
 
3599
 
 
3600
              <p>for compatibility.</p>
 
3601
 
 
3602
              <p><strong>Module:</strong> server</p>
 
3603
            </li>
 
3604
 
 
3605
            <li>
 
3606
              <p><strong>JOIN (stackable)</strong></p>
 
3607
 
 
3608
              <p><strong>bind join &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3609
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3610
              &lt;channel&gt;</strong></p>
 
3611
 
 
3612
              <p><strong>Description:</strong> triggered by someone joining
 
3613
              the channel. The mask in the bind is matched against
 
3614
              &quot;#channel nick!user@host&quot; and can contain
 
3615
              wildcards.</p>
 
3616
 
 
3617
              <p><strong>Module:</strong> irc</p>
 
3618
            </li>
 
3619
 
 
3620
            <li>
 
3621
              <p><strong>PART (stackable)</strong></p>
 
3622
 
 
3623
              <p><strong>bind part &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3624
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3625
              &lt;channel&gt; &lt;msg&gt;</strong></p>
 
3626
 
 
3627
              <p><strong>Description:</strong> triggered by someone leaving
 
3628
              the channel. The mask is matched against &quot;#channel
 
3629
              nick!user@host&quot; and can contain wildcards. If no part
 
3630
              message is specified, msg will be set to &quot;&quot;.</p>
 
3631
 
 
3632
              <p>New Tcl procs should be declared as</p>
 
3633
 
 
3634
<pre>
 
3635
  proc partproc {nick uhost hand chan {msg &quot;&quot;}} { ... }
 
3636
</pre>
 
3637
 
 
3638
              <p>for compatibility.</p>
 
3639
 
 
3640
              <p><strong>Module:</strong> irc</p>
 
3641
            </li>
 
3642
 
 
3643
            <li>
 
3644
              <p><strong>SIGN (stackable)</strong></p>
 
3645
 
 
3646
              <p><strong>bind sign &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3647
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3648
              &lt;channel&gt; &lt;reason&gt;</strong></p>
 
3649
 
 
3650
              <p><strong>Description:</strong> triggered by a signoff, or
 
3651
              possibly by someone who got netsplit and never returned. The
 
3652
              signoff message is the last argument to the proc. Wildcards
 
3653
              can be used in the mask, which is matched against &#39;#channel
 
3654
              nick!user@host&#39;.</p>
 
3655
 
 
3656
              <p><strong>Module:</strong> irc</p>
 
3657
            </li>
 
3658
 
 
3659
            <li>
 
3660
              <p><strong>TOPC (stackable)</strong></p>
 
3661
 
 
3662
              <p><strong>bind topc &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3663
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3664
              &lt;channel&gt; &lt;topic&gt;</strong></p>
 
3665
 
 
3666
              <p><strong>Description:</strong> triggered by a topic change.
 
3667
              mask can contain wildcards and is matched against &#39;#channel
 
3668
              &lt;new topic&gt;&#39;.</p>
 
3669
 
 
3670
              <p><strong>Module:</strong> irc</p>
 
3671
            </li>
 
3672
 
 
3673
            <li>
 
3674
              <p><strong>KICK (stackable)</strong></p>
 
3675
 
 
3676
              <p><strong>bind kick &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3677
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3678
              &lt;channel&gt; &lt;target&gt; &lt;reason&gt;</strong></p>
 
3679
 
 
3680
              <p><strong>Description:</strong> triggered when someone is
 
3681
              kicked off the channel. The mask is matched against
 
3682
              &#39;#channel target reason&#39; where the target is the nickname of
 
3683
              the person who got kicked (can contain wildcards). The proc
 
3684
              is called with the nick, user@host, and handle of the kicker,
 
3685
              plus the channel, the nickname of the person who was kicked,
 
3686
              and the reason; flags are ignored.</p>
 
3687
 
 
3688
              <p><strong>Module:</strong> irc</p>
 
3689
            </li>
 
3690
 
 
3691
            <li>
 
3692
              <p><strong>NICK (stackable)</strong></p>
 
3693
 
 
3694
              <p><strong>bind nick &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3695
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3696
              &lt;channel&gt; &lt;newnick&gt;</strong></p>
 
3697
 
 
3698
              <p><strong>Description:</strong> triggered when someone changes
 
3699
              nicknames. The mask is matched against &#39;#channel newnick&#39;
 
3700
              and can contain wildcards. Channel is "*" if the user isn&#39;t
 
3701
              on a channel (usually the bot not yet in a channel).</p>
 
3702
 
 
3703
              <p><strong>Module:</strong> irc</p>
 
3704
            </li>
 
3705
 
 
3706
            <li>
 
3707
              <p><strong>MODE (stackable)</strong></p>
 
3708
 
 
3709
              <p><strong>bind mode &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3710
              proc-name &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3711
              &lt;channel&gt; &lt;mode-change&gt; &lt;victim&gt;</strong></p>
 
3712
 
 
3713
              <p><strong>Description:</strong> mode changes are broken down
 
3714
              into their component parts before being sent here, so the
 
3715
              &lt;mode-change&gt; will always be a single mode, such as
 
3716
              &quot;+m&quot; or &quot;-o&quot;. victim will show the argument
 
3717
              of the mode change (for o/v/b/e/I) or &quot;&quot; if the set
 
3718
              mode does not take an argument. Flags are ignored. The
 
3719
              bot&#39;s automatic response to a mode change will happen
 
3720
              AFTER all matching Tcl procs are called. The mask will be
 
3721
              matched against &#39;#channel +/-modes&#39; and can
 
3722
              contain wildcards.</p>
 
3723
 
 
3724
              <p>If it is a server mode, nick will be &quot;&quot;, user@host
 
3725
              is the server name, and handle is *.</p>
 
3726
 
 
3727
              <p>Note that &quot;victim&quot; was added in 1.3.23 and that
 
3728
              this will break Tcl scripts that were written for pre-1.3.23
 
3729
              versions and use this binding. An easy fix (by guppy) is as
 
3730
              follows (example):</p>
 
3731
 
 
3732
              <p>Old script looks as follows:</p>
 
3733
 
 
3734
<pre>
 
3735
  bind mode - * mode_proc
 
3736
  proc mode_proc {nick uhost hand chan mc} { ... }
 
3737
</pre>
 
3738
 
 
3739
              <p>To make it work with 1.3.23+ and stay compatible with older
 
3740
              bots, do:</p>
 
3741
 
 
3742
<pre>
 
3743
  bind mode - * mode_proc_fix
 
3744
  proc mode_proc_fix {nick uhost hand chan mc {victim &quot;&quot;}} {
 
3745
    if {$victim != &quot;&quot;} {append mc &quot; $victim&quot;}
 
3746
    mode_proc $nick $uhost $hand $chan $mc
 
3747
  }
 
3748
  proc mode_proc {nick uhost hand chan mc} { ... }
 
3749
</pre>
 
3750
 
 
3751
              <p><strong>Module:</strong> irc</p>
 
3752
            </li>
 
3753
 
 
3754
            <li>
 
3755
              <p><strong>CTCP (stackable)</strong></p>
 
3756
 
 
3757
              <p><strong>bind ctcp &lt;flags&gt; &lt;keyword&gt;
 
3758
              &lt;proc&gt;<br>
 
3759
              proc-name &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3760
              &lt;dest&gt; &lt;keyword&gt; &lt;text&gt;</strong></p>
 
3761
 
 
3762
              <p><strong>Description:</strong> dest will be a nickname (the
 
3763
              bot&#39;s nickname, obviously) or channel name. keyword is
 
3764
              the ctcp command (which can contain wildcards), and text may
 
3765
              be empty. If the proc returns 0, the bot will attempt its
 
3766
              own processing of the ctcp command.</p>
 
3767
 
 
3768
              <p><strong>Module:</strong> server</p>
 
3769
            </li>
 
3770
 
 
3771
            <li>
 
3772
              <p><strong>CTCR (stackable)</strong></p>
 
3773
 
 
3774
              <p><strong>bind ctcr &lt;flags&gt; &lt;keyword&gt;
 
3775
              &lt;proc&gt;<br>
 
3776
              proc-name &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3777
              &lt;dest&gt; &lt;keyword&gt; &lt;text&gt;</strong></p>
 
3778
 
 
3779
              <p><strong>Description:</strong> just like ctcp, but this is
 
3780
              triggered for a ctcp-reply (ctcp embedded in a notice instead
 
3781
              of a privmsg)</p>
 
3782
 
 
3783
              <p><strong>Module:</strong> server</p>
 
3784
            </li>
 
3785
 
 
3786
            <li>
 
3787
              <p><strong>RAW (stackable)</strong></p>
 
3788
 
 
3789
              <p><strong>bind raw &lt;flags&gt; &lt;keyword-mask&gt;
 
3790
              &lt;proc&gt;<br>
 
3791
              procname &lt;from&gt; &lt;keyword&gt; &lt;text&gt;</strong></p>
 
3792
 
 
3793
              <p><strong>Description:</strong> previous versions of Eggdrop
 
3794
              required a special compile option to enable this binding, but
 
3795
              it&#39;s now standard. The keyword is either a numeric, like
 
3796
              &quot;368&quot;, or a keyword, such as &quot;PRIVMSG&quot;. from
 
3797
              will be the server name or the source user (depending on the
 
3798
              keyword); flags are ignored. The order of the arguments is
 
3799
              identical to the order that the IRC server sends to the bot. The
 
3800
              pre-processing  only splits it apart enough to determine the
 
3801
              keyword. If the proc returns 1, Eggdrop will not process the line
 
3802
              any further (this could cause unexpected behavior in some
 
3803
              cases).</p>
 
3804
 
 
3805
              <p><strong>Module:</strong> server</p>
 
3806
            </li>
 
3807
 
 
3808
            <li>
 
3809
              <p><strong>BOT</strong></p>
 
3810
 
 
3811
              <p><strong>bind bot &lt;flags&gt; &lt;command&gt;
 
3812
              &lt;proc&gt;<br>
 
3813
              proc-name &lt;from-bot&gt; &lt;command&gt;
 
3814
              &lt;text&gt;</strong></p>
 
3815
 
 
3816
              <p><strong>Description:</strong> triggered by a message coming
 
3817
              from another bot in the botnet. The first word is the command
 
3818
              and the rest becomes the text argument; flags are ignored.</p>
 
3819
 
 
3820
              <p><strong>Module:</strong> core</p>
 
3821
            </li>
 
3822
            <li>
 
3823
              <p><strong>CHON (stackable)</strong></p>
 
3824
 
 
3825
              <p><strong>bind chon &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3826
              proc-name &lt;handle&gt; &lt;idx&gt;</strong></p>
 
3827
 
 
3828
              <p><strong>Description:</strong> when someone first enters the
 
3829
              party-line area of the bot via dcc chat or telnet, this is
 
3830
              triggered before they are connected to a chat channel (so,
 
3831
              yes, you can change the channel in a &#39;chon&#39; proc).
 
3832
              mask is matched against the handle and supports wildcards.
 
3833
              This is NOT triggered when someone returns from the file area,
 
3834
              etc.</p>
 
3835
 
 
3836
              <p><strong>Module:</strong> core</p>
 
3837
            </li>
 
3838
 
 
3839
            <li>
 
3840
              <p><strong>CHOF (stackable)</strong></p>
 
3841
 
 
3842
              <p><strong>bind chof &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3843
              proc-name &lt;handle&gt; &lt;idx&gt;</strong></p>
 
3844
 
 
3845
              <p><strong>Description:</strong> triggered when someone leaves
 
3846
              the party line to disconnect from the bot. mask is matched
 
3847
              against the handle and can contain wildcards. Note that the
 
3848
              connection may have already been dropped by the user, so
 
3849
              don&#39;t send output to the idx.</p>
 
3850
 
 
3851
              <p><strong>Module:</strong> core</p>
 
3852
            </li>
 
3853
 
 
3854
            <li>
 
3855
              <p><strong>SENT (stackable)</strong></p>
 
3856
 
 
3857
              <p><strong>bind sent &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3858
              proc-name &lt;handle&gt; &lt;nick&gt;
 
3859
              &lt;path/to/file&gt;</strong></p>
 
3860
 
 
3861
              <p><strong>Description:</strong> after a user has successfully
 
3862
              downloaded a file from the bot, this binding is triggered. mask
 
3863
              is matched against the handle of the user that initiated the
 
3864
              transfer and supports wildcards. nick is the actual recipient
 
3865
              (on IRC) of the file. The path is relative to the dcc
 
3866
              directory (unless the file transfer was started by a script
 
3867
              call to &#39;dccsend&#39;, in which case the path is the
 
3868
              exact path given in the call to &#39;dccsend&#39;).</p>
 
3869
 
 
3870
              <p><strong>Module:</strong> transfer</p>
 
3871
            </li>
 
3872
 
 
3873
            <li>
 
3874
              <p><strong>RCVD (stackable)</strong></p>
 
3875
 
 
3876
              <p><strong>bind rcvd &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3877
              proc-name &lt;handle&gt; &lt;nick&gt;
 
3878
              &lt;path/to/file&gt;</strong></p>
 
3879
 
 
3880
              <p><strong>Description:</strong> triggered after a user
 
3881
              uploads a file successfully. mask is matched against the
 
3882
              user&#39;s handle. nick is the IRC nickname that the file
 
3883
              transfer originated from. The path is where the file ended
 
3884
              up, relative to the dcc directory (usually this is your
 
3885
              incoming dir).</p>
 
3886
 
 
3887
              <p><strong>Module:</strong> transfer</p>
 
3888
            </li>
 
3889
 
 
3890
            <li>
 
3891
              <p><strong>CHAT (stackable)</strong></p>
 
3892
 
 
3893
              <p><strong>bind chat &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3894
              proc-name &lt;handle&gt; &lt;channel#&gt;
 
3895
              &lt;text&gt;</strong></p>
 
3896
 
 
3897
              <p><strong>Description:</strong> when someone says something on
 
3898
              the botnet, it invokes this binding. Flags are ignored; handle
 
3899
              could be a user on this bot (&quot;DronePup&quot;) or on
 
3900
              another bot (&quot;Eden@Wilde&quot;) and therefore you can&#39;t
 
3901
              rely on a local user record. The mask is checked against the
 
3902
              entire line of text and supports wildcards.</p>
 
3903
 
 
3904
              <p><strong>Module:</strong> core</p>
 
3905
            </li>
 
3906
 
 
3907
            <li>
 
3908
              <p><strong>LINK (stackable)</strong></p>
 
3909
 
 
3910
              <p><strong>bind link &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3911
              proc-name &lt;botname&gt; &lt;via&gt;</strong></p>
 
3912
 
 
3913
              <p><strong>Description:</strong> triggered when a bot links
 
3914
              into the botnet. botname is the botnetnick of the bot that
 
3915
              just linked in; via is the bot it linked through. The mask
 
3916
              is checked against the botnetnick of the bot that linked and
 
3917
              supports wildcards. flags are ignored.</p>
 
3918
 
 
3919
              <p><strong>Module:</strong> core</p>
 
3920
            </li>
 
3921
 
 
3922
            <li>
 
3923
              <p><strong>DISC (stackable)</strong></p>
 
3924
 
 
3925
              <p><strong>bind disc &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3926
              proc-name &lt;botname&gt;</strong></p>
 
3927
 
 
3928
              <p><strong>Description:</strong> triggered when a bot
 
3929
              disconnects from the botnet for whatever reason. Just like
 
3930
              the link bind, flags are ignored; mask is matched against
 
3931
              the botnetnick of the bot that unlinked. Wildcards are
 
3932
              supported in mask.</p>
 
3933
 
 
3934
              <p><strong>Module:</strong> core</p>
 
3935
            </li>
 
3936
 
 
3937
            <li>
 
3938
              <p><strong>SPLT (stackable)</strong></p>
 
3939
 
 
3940
              <p><strong>bind splt &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3941
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3942
              &lt;channel&gt;</strong></p>
 
3943
 
 
3944
              <p><strong>Description:</strong> triggered when someone gets
 
3945
              netsplit on the channel. Be aware that this may be a false
 
3946
              alarm (it&#39;s easy to fake a netsplit signoff message on
 
3947
              some networks); mask may contain wildcards and is matched
 
3948
              against &#39;#channel nick!user@host&#39;. Anyone who is SPLT
 
3949
              will trigger a REJN or SIGN within the next wait-split
 
3950
              (defined in the config file) minutes.</p>
 
3951
 
 
3952
              <p><strong>Module:</strong> irc</p>
 
3953
            </li>
 
3954
 
 
3955
            <li>
 
3956
              <p><strong>REJN (stackable)</strong></p>
 
3957
 
 
3958
              <p><strong>bind rejn &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3959
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
3960
              &lt;channel&gt;</strong></p>
 
3961
 
 
3962
              <p><strong>Description:</strong> someone who was split has
 
3963
              rejoined. mask can contain wildcards, and is matched against
 
3964
              &#39;#channel nick!user@host&#39;.</p>
 
3965
 
 
3966
              <p><strong>Module:</strong> irc</p>
 
3967
            </li>
 
3968
 
 
3969
            <li>
 
3970
              <p><strong>FILT (stackable)</strong></p>
 
3971
 
 
3972
              <p><strong>bind filt &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3973
              procname &lt;idx&gt; &lt;text&gt;</strong></p>
 
3974
 
 
3975
              <p><strong>Description:</strong> party line and file system
 
3976
              users have their text sent through filt before being
 
3977
              processed. If the proc returns a blank string, the text is
 
3978
              considered parsed. Otherwise, the bot will use the text
 
3979
              returned from the proc and continue parsing that.</p>
 
3980
 
 
3981
              <p><strong>Module:</strong> core</p>
 
3982
            </li>
 
3983
 
 
3984
            <li>
 
3985
              <p><strong>NEED (stackable)</strong></p>
 
3986
 
 
3987
              <p><strong>bind need &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
3988
              procname &lt;channel&gt; &lt;type&gt;</strong></p>
 
3989
 
 
3990
              <p><strong>Description:</strong> this bind is triggered on
 
3991
              certain events, like when the bot needs operator status or
 
3992
              the key for a channel. The types are: op, unban, invite,
 
3993
              limit, and key; the mask is matched against &#39;#channel
 
3994
              type&#39; and can contain wildcards. flags are ignored.</p>
 
3995
 
 
3996
              <p>Example:</p>
 
3997
 
 
3998
              <p>bind need - &quot;% op&quot; needop &lt; handles only need
 
3999
              op<br>
 
4000
              bind need - &quot;*&quot; needall   &lt; handles all needs</p>
 
4001
 
 
4002
              <p><strong>Module:</strong> irc</p>
 
4003
            </li>
 
4004
 
 
4005
            <li>
 
4006
              <p><strong>FLUD (stackable)</strong></p>
 
4007
 
 
4008
              <p><strong>bind flud &lt;flags&gt; &lt;type&gt; &lt;proc&gt;<br>
 
4009
              procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt;
 
4010
              &lt;type&gt; &lt;channel&gt;</strong></p>
 
4011
 
 
4012
              <p><strong>Description:</strong> any floods detected through
 
4013
              the flood control settings (like &#39;flood-ctcp&#39;) are
 
4014
              sent here before processing. If the proc returns 1, no
 
4015
              further action is taken on the flood; if the proc returns 0,
 
4016
              the bot will do its normal &quot;punishment&quot; for the
 
4017
              flood. The flood types are: pub, msg, join, or ctcp (and can
 
4018
              be masked to &quot;*&quot; for the bind); flags are ignored.</p>
 
4019
 
 
4020
              <p><strong>Module:</strong> server</p>
 
4021
            </li>
 
4022
 
 
4023
            <li>
 
4024
              <p><strong>NOTE</strong></p>
 
4025
 
 
4026
              <p><strong>bind note &lt;flags&gt; &lt;handle&gt; &lt;proc&gt;<br>
 
4027
              procname &lt;from&gt; &lt;to&gt; &lt;text&gt;</strong></p>
 
4028
 
 
4029
              <p><strong>Description:</strong> incoming notes (either from
 
4030
              the party line, someone on IRC, or someone on another bot on
 
4031
              the botnet) are checked against these binds before being
 
4032
              processed. If a bind exists, the bot will not deliver the
 
4033
              note. The handle must be an exact match (no wildcards), but
 
4034
              it is not case sensitive; flags are ignored.</p>
 
4035
 
 
4036
              <p><strong>Module:</strong> core</p>
 
4037
            </li>
 
4038
 
 
4039
            <li>
 
4040
              <p><strong>ACT (stackable)</strong></p>
 
4041
 
 
4042
              <p><strong>bind act &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4043
              proc-name &lt;handle&gt; &lt;channel#&gt;
 
4044
              &lt;action&gt;</strong></p>
 
4045
 
 
4046
              <p><strong>Description:</strong> when someone does an action
 
4047
              on the botnet, it invokes this binding. flags are ignored;
 
4048
              the mask is matched against the text of the action and can
 
4049
              support wildcards.</p>
 
4050
 
 
4051
              <p><strong>Module:</strong> core</p>
 
4052
            </li>
 
4053
 
 
4054
            <li>
 
4055
              <p><strong>WALL (stackable)</strong></p>
 
4056
 
 
4057
              <p><strong>bind wall &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4058
              proc-name &lt;handle&gt; &lt;msg&gt;</strong></p>
 
4059
 
 
4060
              <p><strong>Description:</strong> when the bot receives a
 
4061
              wallops, it invokes this binding. flags are ignored; the
 
4062
              mask is matched against the text of the wallops msg.</p>
 
4063
 
 
4064
              <p><strong>Module:</strong> server</p>
 
4065
            </li>
 
4066
 
 
4067
            <li>
 
4068
              <p><strong>BCST (stackable)</strong></p>
 
4069
 
 
4070
              <p><strong>bind bcst &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4071
              proc-name &lt;botname&gt; &lt;channel#&gt;
 
4072
              &lt;text&gt;</strong></p>
 
4073
 
 
4074
              <p><strong>Description:</strong> when a bot broadcasts
 
4075
              something on the botnet (see &#39;dccbroadcast&#39; above),
 
4076
              it invokes this binding. flags are ignored; the mask is
 
4077
              matched against the message text and can contain wildcards.</p>
 
4078
 
 
4079
              <p><strong>Module:</strong> core</p>
 
4080
            </li>
 
4081
 
 
4082
            <li>
 
4083
              <p><strong>CHJN (stackable)</strong></p>
 
4084
 
 
4085
              <p><strong>bind chjn &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4086
              proc-name &lt;botname&gt; &lt;handle&gt; &lt;channel#&gt;
 
4087
              &lt;flag&gt; &lt;idx&gt; &lt;user@host&gt;</strong></p>
 
4088
 
 
4089
              <p><strong>Description:</strong> when someone joins a botnet
 
4090
              channel, it invokes this binding. The mask is matched against
 
4091
              the channel and can contain wildcards. flag is one of: *
 
4092
              (owner), + (master), @ (op), or % (botnet master).</p>
 
4093
 
 
4094
              <p><strong>Module:</strong> core</p>
 
4095
            </li>
 
4096
 
 
4097
            <li>
 
4098
              <p><strong>CHPT (stackable)</strong></p>
 
4099
 
 
4100
              <p><strong>bind chpt &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4101
              proc-name &lt;botname&gt; &lt;handle&gt; &lt;idx&gt;
 
4102
              &lt;channel#&gt;</strong></p>
 
4103
 
 
4104
              <p><strong>Description:</strong> when someone parts a botnet
 
4105
              channel, it invokes this binding. flags are ignored; the mask
 
4106
              is matched against the channel and can contain wildcards.</p>
 
4107
 
 
4108
              <p><strong>Module:</strong> core</p>
 
4109
            </li>
 
4110
 
 
4111
            <li>
 
4112
              <p><strong>TIME (stackable)</strong></p>
 
4113
 
 
4114
              <p><strong>bind time &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4115
              proc-name &lt;minute&gt; &lt;hour&gt; &lt;day&gt; &lt;month&gt;
 
4116
              &lt;year&gt;</strong></p>
 
4117
 
 
4118
              <p><strong>Description:</strong> allows you to schedule
 
4119
              procedure calls at certain times. mask matches 5 space
 
4120
              separated integers of the form: &quot;minute hour day month
 
4121
              year&quot;. minute, hour, day, month have a zero padding so
 
4122
              they are exactly two characters long; year is extended to
 
4123
              four characters in the same way. flags are ignored.</p>
 
4124
 
 
4125
              <p><strong>Module:</strong> core</p>
 
4126
            </li>
 
4127
 
 
4128
            <li>
 
4129
              <p><strong>AWAY (stackable)</strong></p>
 
4130
 
 
4131
              <p><strong>bind away &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4132
              proc-name &lt;botname&gt; &lt;idx&gt; &lt;text&gt;</strong></p>
 
4133
 
 
4134
              <p><strong>Description:</strong> triggers when a user goes
 
4135
              away or comes back on the botnet. text is the reason than has
 
4136
              been specified (text is &quot;&quot; when returning). mask is
 
4137
              matched against the botnet-nick of the bot the user is
 
4138
              connected to and supports wildcards. flags are ignored.</p>
 
4139
 
 
4140
              <p><strong>Module:</strong> core</p>
 
4141
            </li>
 
4142
 
 
4143
            <li>
 
4144
              <p><strong>LOAD (stackable)</strong></p>
 
4145
 
 
4146
              <p><strong>bind load &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4147
              proc-name &lt;module&gt;</strong></p>
 
4148
 
 
4149
              <p><strong>Description:</strong> triggers when a module is
 
4150
              loaded. mask is matched against the name of the loaded module
 
4151
              and supports wildcards; flags are ignored.</p>
 
4152
 
 
4153
              <p><strong>Module:</strong> core</p>
 
4154
            </li>
 
4155
 
 
4156
            <li>
 
4157
              <p><strong>UNLD (stackable)</strong></p>
 
4158
 
 
4159
              <p><strong>bind unld &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4160
              proc-name &lt;module&gt;</strong></p>
 
4161
 
 
4162
              <p><strong>Description:</strong> triggers when a module is
 
4163
              unloaded. mask is matched against the name of the unloaded
 
4164
              module and supports wildcards; flags are ignored.</p>
 
4165
 
 
4166
              <p><strong>Module:</strong> core</p>
 
4167
            </li>
 
4168
 
 
4169
            <li>
 
4170
              <p><strong>NKCH (stackable)</strong></p>
 
4171
 
 
4172
              <p><strong>bind nkch &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4173
              proc-name &lt;oldhandle&gt; &lt;newhandle&gt;</strong></p>
 
4174
 
 
4175
              <p><strong>Description:</strong> triggered whenever a local
 
4176
              user&#39;s handle is changed (in the userfile). mask is
 
4177
              matched against the user&#39;s old handle and can contain
 
4178
              wildcards; flags are ignored.</p>
 
4179
 
 
4180
              <p><strong>Module:</strong> core</p>
 
4181
            </li>
 
4182
 
 
4183
            <li>
 
4184
              <p><strong>EVNT (stackable)</strong></p>
 
4185
 
 
4186
              <p><strong>bind evnt &lt;flags&gt; &lt;type&gt; &lt;proc&gt;<br>
 
4187
              proc-name &lt;type&gt;</strong></p>
 
4188
 
 
4189
              <p><strong>Description:</strong> Description: triggered whenever
 
4190
              one of these events happen; flags are ignored; valid events
 
4191
              are:</p>
 
4192
 
 
4193
              <blockquote>
 
4194
                <table>
 
4195
                  <tr valign="top">
 
4196
                    <td>
 
4197
                      <p><strong>sighup</strong></p>
 
4198
                    </td>
 
4199
 
 
4200
                    <td>
 
4201
                      <p>called on a kill -HUP &lt;pid&gt;</p>
 
4202
                    </td>
 
4203
                  </tr>
 
4204
 
 
4205
                  <tr valign="top">
 
4206
                    <td>
 
4207
                      <p><strong>sigterm</strong></p>
 
4208
                    </td>
 
4209
 
 
4210
                    <td>
 
4211
                      <p>called on a kill -TERM &lt;pid&gt;</p>
 
4212
                    </td>
 
4213
                  </tr>
 
4214
 
 
4215
                  <tr valign="top">
 
4216
                    <td>
 
4217
                      <p><strong>sigill</strong></p>
 
4218
                    </td>
 
4219
 
 
4220
                    <td>
 
4221
                      <p>called on a kill -ILL &lt;pid&gt;</p>
 
4222
                    </td>
 
4223
                  </tr>
 
4224
 
 
4225
                  <tr valign="top">
 
4226
                    <td>
 
4227
                      <p><strong>sigquit</strong></p>
 
4228
                    </td>
 
4229
 
 
4230
                    <td>
 
4231
                      <p>called on a kill -QUIT &lt;pid&gt;</p>
 
4232
                    </td>
 
4233
                  </tr>
 
4234
 
 
4235
                  <tr valign="top">
 
4236
                    <td>
 
4237
                      <p><strong>save</strong></p>
 
4238
                    </td>
 
4239
 
 
4240
                    <td>
 
4241
                      <p>called when the userfile is saved</p>
 
4242
                    </td>
 
4243
                  </tr>
 
4244
 
 
4245
                  <tr valign="top">
 
4246
                    <td>
 
4247
                      <p><strong>rehash</strong></p>
 
4248
                    </td>
 
4249
 
 
4250
                    <td>
 
4251
                      <p>called just after a rehash</p>
 
4252
                    </td>
 
4253
                  </tr>
 
4254
 
 
4255
                  <tr valign="top">
 
4256
                    <td>
 
4257
                      <p><strong>prerehash</strong></p>
 
4258
                    </td>
 
4259
 
 
4260
                    <td>
 
4261
                      <p>called just before a rehash</p>
 
4262
                    </td>
 
4263
                  </tr>
 
4264
 
 
4265
                  <tr valign="top">
 
4266
                    <td>
 
4267
                      <p><strong>prerestart</strong></p>
 
4268
                    </td>
 
4269
 
 
4270
                    <td>
 
4271
                      <p>called just before a restart</p>
 
4272
                    </td>
 
4273
                  </tr>
 
4274
 
 
4275
                  <tr valign="top">
 
4276
                    <td>
 
4277
                      <p><strong>logfile</strong></p>
 
4278
                    </td>
 
4279
 
 
4280
                    <td>
 
4281
                      <p>called when the logs are switched daily</p>
 
4282
                    </td>
 
4283
                  </tr>
 
4284
 
 
4285
                  <tr valign="top">
 
4286
                    <td>
 
4287
                      <p><strong>loaded</strong></p>
 
4288
                    </td>
 
4289
 
 
4290
                    <td>
 
4291
                      <p>called when the bot is done loading</p>
 
4292
                    </td>
 
4293
                  </tr>
 
4294
 
 
4295
                  <tr valign="top">
 
4296
                    <td>
 
4297
                      <p><strong>* userfile-loaded</strong></p>
 
4298
                    </td>
 
4299
 
 
4300
                    <td>
 
4301
                      <p>called after userfile has been loaded</p>
 
4302
                    </td>
 
4303
                  </tr>
 
4304
                </table>
 
4305
              </blockquote>
 
4306
 
 
4307
              <blockquote>
 
4308
                <table>
 
4309
                  <tr valign="top">
 
4310
                    <td>
 
4311
                      <p><strong>connect-server</strong></p>
 
4312
                    </td>
 
4313
 
 
4314
                    <td>
 
4315
                      <p>called just before we connect to an IRC server</p>
 
4316
                    </td>
 
4317
                  </tr>
 
4318
 
 
4319
                  <tr valign="top">
 
4320
                    <td>
 
4321
                      <p><strong>init-server</strong></p>
 
4322
                    </td>
 
4323
 
 
4324
                    <td>
 
4325
                      <p>called when we actually get on our IRC server</p>
 
4326
                    </td>
 
4327
                  </tr>
 
4328
 
 
4329
                  <tr valign="top">
 
4330
                    <td>
 
4331
                      <p><strong>disconnect-server</strong></p>
 
4332
                    </td>
 
4333
 
 
4334
                    <td>
 
4335
                      <p>called when we disconnect from our IRC server</p>
 
4336
                    </td>
 
4337
                  </tr>
 
4338
                </table>
 
4339
              </blockquote>
 
4340
 
 
4341
              <p><strong>Module:</strong> core</p>
 
4342
            </li>
 
4343
 
 
4344
            <li>
 
4345
              <p><strong>LOST (stackable)</strong></p>
 
4346
 
 
4347
              <p><strong>bind lost &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4348
              proc-name &lt;handle&gt; &lt;nick&gt; &lt;path&gt;
 
4349
              &lt;bytes-transferred&gt; &lt;length-of-file&gt;</strong></p>
 
4350
 
 
4351
              <p><strong>Description:</strong> triggered when a DCC SEND
 
4352
              transfer gets lost, such as when the connection is
 
4353
              terminated before all data was successfully sent/received.
 
4354
              This is typically caused by a user abort.</p>
 
4355
 
 
4356
              <p><strong>Module:</strong> transfer</p>
 
4357
            </li>
 
4358
 
 
4359
            <li>
 
4360
              <p><strong>TOUT (stackable)</strong></p>
 
4361
 
 
4362
              <p><strong>bind tout &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
 
4363
              proc-name &lt;handle&gt; &lt;nick&gt; &lt;path&gt;
 
4364
              &lt;bytes-transferred&gt; &lt;length-of-file&gt;</strong></p>
 
4365
 
 
4366
              <p><strong>Description:</strong> triggered when a DCC SEND
 
4367
              transfer times out. This may either happen because the dcc
 
4368
              connection was not accepted or because the data transfer
 
4369
              stalled for some reason.</p>
 
4370
 
 
4371
              <p><strong>Module:</strong> transfer</p>
 
4372
            </li>
 
4373
          </ol>
 
4374
        </li>
 
4375
 
 
4376
        <li>
 
4377
          <p><a name="bindb"></a><strong>Return Values</strong></p>
 
4378
 
 
4379
          <p>Several bindings pay attention to the value you return from
 
4380
          the proc (using &#39;return &lt;value&gt;&#39;). Usually, they
 
4381
          expect a 0 or 1, and returning an empty return is interpreted
 
4382
          as a 0. Be aware if you omit the return statement, the result
 
4383
          of the last Tcl command executed will be returned by the proc.
 
4384
          This will not likely produce the results you intended (this is
 
4385
          a &quot;feature&quot; of Tcl).</p>
 
4386
 
 
4387
          <p>Here&#39;s a list of the bindings that use the return value
 
4388
          from procs they trigger:</p>
 
4389
 
 
4390
          <ol>
 
4391
            <li>
 
4392
              <p><strong>MSG</strong>
 
4393
 
 
4394
              <p>Return 1 to make the command get logged like so:</p>
 
4395
 
 
4396
              <blockquote>
 
4397
                <p>(nick!user@host) !handle! command</p>
 
4398
              </blockquote>
 
4399
            </li>
 
4400
 
 
4401
            <li>
 
4402
              <p><strong>DCC</strong>
 
4403
 
 
4404
              <p>Return 1 to make the command get logged like so:</p>
 
4405
 
 
4406
              <blockquote>
 
4407
                <p>#handle# command</p>
 
4408
              </blockquote>
 
4409
            </li>
 
4410
 
 
4411
            <li>
 
4412
              <p><strong>FIL</strong>
 
4413
 
 
4414
              <p>Return 1 to make the command get logged like so:</p>
 
4415
 
 
4416
              <blockquote>
 
4417
                <p>#handle# files: command</p>
 
4418
              </blockquote>
 
4419
            </li>
 
4420
 
 
4421
            <li>
 
4422
              <p><strong>PUB</strong>
 
4423
 
 
4424
              <p>Return 1 to make the command get logged like so:</p>
 
4425
 
 
4426
              <blockquote>
 
4427
                <p>&lt;&lt;nick&gt;&gt; !handle! command</p>
 
4428
              </blockquote>
 
4429
            </li>
 
4430
 
 
4431
            <li>
 
4432
              <p><strong>CTCP</strong>
 
4433
 
 
4434
              <p>Return 1 to ask the bot not to process the CTCP command on
 
4435
              its own. Otherwise, it would send its own response to the CTCP
 
4436
              (possibly an error message if it doesn&#39;t know how to deal
 
4437
              with it).</p>
 
4438
            </li>
 
4439
 
 
4440
            <li>
 
4441
              <p><strong>FILT</strong>
 
4442
 
 
4443
              <p>Return "" to indicate the text has been processed, and the
 
4444
              bot should just ignore it. Otherwise, it will treat the text
 
4445
              like any other.</p>
 
4446
            </li>
 
4447
 
 
4448
            <li>
 
4449
              <p><strong>FLUD</strong>
 
4450
 
 
4451
              <p>Return 1 to ask the bot not to take action on the flood.
 
4452
              Otherwise it will do its normal punishment.</p>
 
4453
            </li>
 
4454
 
 
4455
            <li>
 
4456
              <p><strong>RAW</strong>
 
4457
 
 
4458
              <p>Return 1 to ask the bot not to process the server text.
 
4459
              This can affect the bot&#39;s performance by causing it to
 
4460
              miss things that it would normally act on -- you have been
 
4461
              warned.</p>
 
4462
            </li>
 
4463
 
 
4464
            <li>
 
4465
              <p><strong>CHON</strong>
 
4466
 
 
4467
              <p>Return 1 to ask the bot not to process the partyline join
 
4468
              event.</p>
 
4469
            </li>
 
4470
 
 
4471
            <li>
 
4472
              <p><strong>CHOF</strong>
 
4473
 
 
4474
              <p>Return 1 to ask the bot not to process the partyline part
 
4475
              event.</p>
 
4476
            </li>
 
4477
 
 
4478
            <li>
 
4479
              <p><strong>WALL</strong>
 
4480
 
 
4481
              <p>Return 1 to make the command get logged like so:</p>
 
4482
 
 
4483
              <blockquote>
 
4484
                <p>!nick! msg</p>
 
4485
              </blockquote>
 
4486
            </li>
 
4487
          </ol>
 
4488
        </li>
 
4489
      </ol>
 
4490
    </blockquote>
 
4491
 
 
4492
    <p><a name="control"></a>12. <strong>Control procedures</strong></p>
 
4493
 
 
4494
    <blockquote>
 
4495
      <p>Using the &#39;control&#39; command, you can put a DCC connection
 
4496
      (or outgoing TCP connection) in control of a script. All text received
 
4497
      from the connection is sent to the proc you specify. All outgoing text
 
4498
      should be sent with &#39;putdcc&#39;.</p>
 
4499
 
 
4500
      <p>The control procedure is called with these parameters:</p>
 
4501
 
 
4502
      <blockquote>
 
4503
        <p>procname &lt;idx&gt; &lt;input-text&gt;</p>
 
4504
      </blockquote>
 
4505
 
 
4506
      <p>This allows you to use the same proc for several connections. The
 
4507
      idx will stay the same until the connection is dropped. After that,
 
4508
      it will probably get reused for a later connection.</p>
 
4509
 
 
4510
      <p>To indicate that the connection has closed, your control procedure
 
4511
      will be called with blank text (the input-text will be &quot;&quot;).
 
4512
      This is the only time it will ever be called with &quot;&quot; as the
 
4513
      text, and it is the last time your proc will be called for that
 
4514
      connection. Don&#39;t call killdcc on the idx when text is blank, it
 
4515
      will always fail with &quot;invalid idx&quot;.</p>
 
4516
 
 
4517
      <p>If you want to hand control of your connection back to Eggdrop,
 
4518
      your  proc should return 1. Otherwise, return 0 to retain
 
4519
      control.</p>
 
4520
    </blockquote>
 
4521
 
 
4522
    <p><a name="tcp"></a>13. <strong>TCP connections</strong></p>
 
4523
 
 
4524
    <blockquote>
 
4525
      <p>Eggdrop allows you to make two types of TCP (&quot;telnet&quot;)
 
4526
      connections: outgoing and incoming. For an outgoing connection, you
 
4527
      specify the remote host and port to connect to. For an incoming
 
4528
      connection, you specify a port to listen on.</p>
 
4529
 
 
4530
      <p>All of the connections are *event driven*. This means that the bot
 
4531
      will trigger your procs when something happens on the connection, and
 
4532
      your proc is expected to return as soon as possible. Waiting in a proc
 
4533
      for more input is a no-no.</p>
 
4534
 
 
4535
      <p>To initiate an outgoing connection, use:</p>
 
4536
 
 
4537
      <blockquote>
 
4538
        <p>set idx [connect &lt;hostname&gt; &lt;port&gt;]</p>
 
4539
      </blockquote>
 
4540
 
 
4541
      <p>$idx now contains a new DCC entry for the outgoing connection.</p>
 
4542
 
 
4543
      <p>All connections use non-blocking (commonly called
 
4544
      &quot;asynchronous&quot;, which is a misnomer) I/O. Without going
 
4545
      into a big song and dance about asynchronous I/O, what this means
 
4546
      to you is:</p>
 
4547
 
 
4548
      <ul>
 
4549
        <li>
 
4550
          <p>assume the connection succeeded immediately</p>
 
4551
        </li>
 
4552
 
 
4553
        <li>
 
4554
          <p>if the connection failed, an EOF will arrive for that idx</p>
 
4555
        </li>
 
4556
      </ul>
 
4557
 
 
4558
      <p>The only time a &#39;connect&#39; will return an error is if you
 
4559
      give it a hostname that can&#39;t be resolved (this is considered a
 
4560
      &quot;DNS error&quot;). Otherwise, it will appear to have succeeded.
 
4561
      If the connection failed, you will immediately get an EOF.</p>
 
4562
 
 
4563
      <p>Right after doing a &#39;connect&#39; call, you should set up a
 
4564
      &#39;control&#39; for the new idx (see the section above). From then
 
4565
      on, the connection will act just like a normal DCC connection that
 
4566
      has been put under the control of a script. If you ever return
 
4567
      &quot;1&quot; from the control proc (indicating that you want control
 
4568
      to return to Eggdrop), the bot will just close the connection and
 
4569
      dispose of it. Other commands that work on normal DCC connections,
 
4570
      like &#39;killdcc&#39; and &#39;putdcc&#39;, will work on this idx,
 
4571
      too. The &#39;killdcc&#39; command will fail with &quot;invalid
 
4572
      idx&quot; if you attempt to use it on a closed socket.</p>
 
4573
 
 
4574
      <p>To create a listen port, use:</p>
 
4575
 
 
4576
      <blockquote>
 
4577
        <p>listen &lt;port&gt; script &lt;proc&gt;</p>
 
4578
      </blockquote>
 
4579
 
 
4580
      <p>Procs should be declared as:</p>
 
4581
 
 
4582
      <blockquote>
 
4583
        <p>procname &lt;newidx&gt;</p>
 
4584
      </blockquote>
 
4585
 
 
4586
      <p>For example:</p>
 
4587
 
 
4588
<pre>
 
4589
  listen 6687 script listen:grab
 
4590
 
 
4591
  proc listen:grab {newidx} {
 
4592
    control $newidx listen:control
 
4593
  }
 
4594
</pre>
 
4595
 
 
4596
      <p>When a new connection arrives in port 6687, Eggdrop will create a
 
4597
      new idx for the connection. That idx is sent to &#39;listen:grab&#39;.
 
4598
      The proc immediately puts this idx under control. Once
 
4599
      &#39;listen:grab&#39; has been called, the idx behaves exactly like
 
4600
      an outgoing connection would.</p>
 
4601
 
 
4602
      <p>The best way to learn how to use these commands is to find a
 
4603
      script that uses them and follow it carefully. However, hopefully
 
4604
      this has given you a good start.</p>
 
4605
    </blockquote>
 
4606
 
 
4607
    <p><a name="matchchars"></a>14. <strong>Match characters</strong></p>
 
4608
 
 
4609
    <blockquote>
 
4610
      <p>Many of the bindings allow match characters in the arguments. Here
 
4611
      are the four special characters:</p>
 
4612
 
 
4613
      <table>
 
4614
        <tr valign="top">
 
4615
          <td>
 
4616
            <p><strong>?</strong></p>
 
4617
          </td>
 
4618
 
 
4619
          <td>
 
4620
            <p>matches any single character</p>
 
4621
          </td>
 
4622
        </tr>
 
4623
 
 
4624
        <tr valign="top">
 
4625
          <td>
 
4626
            <p><strong>*</strong></p>
 
4627
          </td>
 
4628
 
 
4629
          <td>
 
4630
            <p>matches 0 or more characters of any type</p>
 
4631
          </td>
 
4632
        </tr>
 
4633
 
 
4634
        <tr valign="top">
 
4635
          <td>
 
4636
            <p><strong>%</strong></p>
 
4637
          </td>
 
4638
 
 
4639
          <td>
 
4640
            <p>matches 0 or more non-space characters (can be used to match
 
4641
            a single word)</p>
 
4642
          </td>
 
4643
        </tr>
 
4644
 
 
4645
        <tr valign="top">
 
4646
          <td>
 
4647
            <p><strong>~</strong></p>
 
4648
          </td>
 
4649
 
 
4650
          <td>
 
4651
            <p>matches 1 or more space characters (can be used for whitespace
 
4652
            between words)</p>
 
4653
          </td>
 
4654
        </tr>
 
4655
      </table>
 
4656
    </blockquote>
 
4657
    <hr>
 
4658
 
 
4659
    <p><em>Copyright &copy; 1997 Robey Pointer<br>
 
4660
    Copyright &copy; 1999, 2000, 2001, 2002, 2003, 2004
 
4661
    <a href="http://www.eggheads.org/"> Eggheads Development Team</a></em></p>
 
4662
  </body>
 
4663
</html>