162
151
<p><a name="sect1c"></a>1c. <strong>Log files</strong></p>
164
<p>Eggdrop is capable of logging various stuff, from channel chatter to
165
commands people use on the bot or file transfers.</p>
153
<p>Eggdrop is capable of logging various things, from channel chatter to
154
partyline commands and file transfers.</p>
167
<p>Logfiles are kept normally for 24 hours. Afterwards they'll be
168
renamed to "(logfilename).yesterday". After 48 hours
169
they'll get overwritten by the logfile of the next day.</p>
156
<p>Logfiles are normally kept for 24 hours. Afterwards, they will be
157
renamed to "(logfilename).yesterday". After 48 hours, they
158
will be overwritten be the logfile of the next day.</p>
173
162
<dt><strong>set max-logs 5</strong></dt>
176
<p>maximum number of logfiles to allow - this can be increased if
179
<p><strong>(don't decrease this)</strong></p>
182
<dt><strong><em>set max-logsize 0</em></strong></dt>
185
<p>maximum size of your logfiles, set this to 0 to disable. This
186
value is in KiloBytes, so '550' would mean cycle logs when
187
it reaches the size of 550 KiloBytes.</p>
189
<p>Note that this only works if you have keep-all-logs 0</p>
192
<dt><strong><em>set quick-logs 0</em></strong></dt>
195
<p>Defaultly eggdrop writes every 5 minutes its logfiles to disk.
196
You can change this behaviour by turning this setting to 1. Eggdrop
197
will write and check the logfiles for size every minute.</p>
199
<p>Note that this setting might increase the cpu usage of your bot
200
(on the other hand it will decrease your mem usage)</p>
165
<p>This is the maximum number of logfiles allowed. This setting
166
can be increased; however, don't decrease it.</p>
169
<dt><strong>set max-logsize 0</strong></dt>
172
<p>This is the maximum size of your logfiles. Set it to 0 to
173
disable. This value is in kilobytes, so '550' would mean
174
cycle logs when it reaches the size of 550 kilobytes. Note that
175
this only works if you have keep-all-logs set to 0 (OFF).</p>
178
<dt><strong>set quick-logs 0</strong></dt>
181
<p>This could be good if you have had a problem with logfiles
182
filling your quota/hard disk or if you log +p and publish it
183
to the web, and you need more up-to-date info. Note that this
184
setting might increase the CPU usage of your bot (on the other
185
hand it will decrease your RAM usage).</p>
203
188
<dt><strong>logfile <logflags> <channel>
204
189
"logs/logfile"</strong></dt>
207
<p>This setting actually tells the bot what should be logged from
208
where in which file.</p>
210
<p>The most common log file flags are:</p>
212
<p>m private msgs/ctcps to the bot<br>
213
k kicks, bans, mode changes on the channel<br>
214
j joins, parts, netsplits on the channel<br>
215
p public chatter on the channel<br>
216
s server connects/disconnects/notices<br>
217
b information about bot linking and userfile sharing<br>
218
c commands people use (via msg or dcc)<br>
219
x file transfers and file-area commands<br>
220
r (if use-console-r enabled) EVERYTHING sent to the bot by the
222
o other: misc info, errors -- IMPORTANT STUFF<br>
223
w wallops: msgs between IRCops (be sure to set the bot +w in
226
<p>There are others, but you probably shouldn't log them, it'd
227
be rather unethical ;). There are also five user-defined levels
228
('1'..'5') which are used by Tcl scripts.</p>
192
<p>This setting tells the bot what should be logged, from where,
193
and to which file.</p>
195
<p>Logfile flags:</p>
201
<p><strong>b</strong></p>
205
<p>information about bot linking and userfile sharing</p>
211
<p><strong>c</strong></p>
221
<p><strong>d</strong></p>
225
<p>misc debug information</p>
231
<p><strong>h</strong></p>
235
<p>raw share traffic</p>
241
<p><strong>j</strong></p>
245
<p>joins, parts, quits, and netsplits on the channel</p>
251
<p><strong>k</strong></p>
255
<p>kicks, bans, and mode changes on the channel</p>
261
<p><strong>m</strong></p>
265
<p>private msgs, notices and ctcps to the bot</p>
271
<p><strong>o</strong></p>
275
<p>misc info, errors, etc (IMPORTANT STUFF)</p>
281
<p><strong>p</strong></p>
285
<p>public text on the channel</p>
291
<p><strong>r</strong></p>
295
<p>raw incoming server traffic</p>
301
<p><strong>s</strong></p>
305
<p>server connects, disconnects, and notices</p>
311
<p><strong>t</strong></p>
315
<p>raw botnet traffic</p>
321
<p><strong>v</strong></p>
325
<p>raw outgoing server traffic</p>
331
<p><strong>w</strong></p>
335
<p>wallops (make sure the bot sets +w in init-server)</p>
341
<p><strong>x</strong></p>
345
<p>file transfers and file-area commands</p>
351
<p>Note that modes d, h, r, t, and v can fill disk quotas quickly.
352
There are also eight user-defined levels (1-8) which can be used by
230
355
<p>Each logfile belongs to a certain channel. Events of type
231
356
'k', 'j', and 'p' are logged to whatever
232
channel they happened on. Most other events are currently logged to
233
every channel. You can make a logfile belong to all channels by
234
assigning it to channel "*".</p>
357
channel they happened on. Most other events are currently logged
358
to every channel. You can make a logfile belong to all channels
359
by assigning it to channel "*"</p>
238
363
<p><strong>logfile mco * "logs/eggdrop.log"<br>
239
logfile jpk #lamest "logs/lamest.log"<br>
242
<p>In 'eggdrop.log' put private msgs/ctcps, commands, misc
243
info, and errors from any channel<br>
244
In 'lame.log' put joins, parts, kicks, bans, public
245
chatter and mode changes from #lamest</p>
364
logfile jpk #lamest "logs/lamest.log"<br></strong></p>
366
<p>In 'eggdrop.log', put private msgs/ctcps, commands,
367
misc info, and errors from any channel.</p>
369
<p>In 'lamest.log', log all joins, parts, kicks, bans,
370
public chatter, and mode changes from #lamest.</p>
248
<dt><strong><em>set log-time 1</em></strong></dt>
373
<dt><strong>set log-time 1</strong></dt>
251
376
<p>Use this feature to timestamp entries in the log file.</p>
253
<p>Valid settings are 0 and 1.</p>
256
379
<dt><strong>set keep-all-logs 0</strong></dt>
259
<p>If you want to keep your logfiles forever turn this setting on.
260
All logfiles will get suffix ".[day, 2 digits][month, 3
261
letters][year, 4 digits]" Note that your quota might get full
262
by this, so check your logfiles often and download them.</p>
264
<p>Valid settings are 0 and 1.</p>
382
<p>If you want to keep your logfiles forever, turn this setting
383
on. All logfiles will get the suffix ".[day, 2 digits][month, 3
384
letters][year, 4 digits]". Note that your quota/hard-disk might
385
be filled by this, so check your logfiles often and download
267
389
<dt><strong>set switch-logfiles-at 300</strong></dt>
270
<p>You can specify in this setting, when eggdrop should switch the
271
logfiles and started fresh.</p>
273
<p>You have to use military time in here. 300 is default and
276
<p>Note that a leading 0 will make Tcl think this is an octal
277
value, something you probably don't want.</p>
392
<p>You can specify when Eggdrop should switch logfiles and start
393
fresh. You must use military time for this setting. 300 is the
394
default, and describes 03:00 (AM).</p>
280
<dt><strong><em>set quiet-save 0</em></strong></dt>
397
<dt><strong>set quiet-save 0</strong></dt>
283
400
<p>Those nasty "Writing user file..." and "Writing
284
channel file ..." messages wont be logged anymore if this
401
channel file..." messages won't be logged anymore if this
285
402
option is enabled.</p>
287
<p>Valid settings are 0 and 1.</p>
292
<p><a name="sect1d"></a>1d. <strong>Files and directories</strong></p>
405
<dt><strong>set logfile-suffix ".%d%b%Y"</strong></dt>
408
<p>If keep-all-logs is 1, this setting will define the suffix of
409
the logfiles. The default will result in a suffix like
410
"04May2000". "%Y%m%d" will produce the often
411
used yyyymmdd format. Read the strftime manpages for more options.
412
NOTE: On systems which don't support strftime, the default
413
format will be used <strong>always</strong>.</p>
418
<p><a name="sect1d"></a>1d. <strong>Console</strong></p>
422
<dt><strong>set console "mkcobxs"</strong></dt>
425
<p>This is the default console mode. It uses the same event flags
426
as the log files do. The console channel is automatically set to
427
your "primary" channel, which is set in the modules
428
section of the config file. Masters can change their console
429
channel and modes with the '.console' command.</p>
434
<p><a name="sect1e"></a>1e. <strong>Files and directories</strong></p>
296
438
<dt><strong>set userfile "LamestBot.user"</strong></dt>
299
<p>Specify here how your userfile should be called</p>
302
<dt><strong>set pidfile "pid.LamestBot"</strong</dt>
305
<p>Specify here what filename eggdrop will save its pid under</p>
308
<dt><strong><em>set sort-users 0</em></strong></dt>
311
<p>If you want your userfile to be sorted on save, turn this
314
<p>Note that this takes a bit more cpu</p>
316
<p>Valid settings are 0 and 1.</p>
441
<p>Specify here the filename your userfile should be saved as.</p>
444
<dt><strong>set pidfile "pid.LamestBot"</strong></dt>
447
<p>Specify here the filename Eggdrop will save its pid to. If no
448
pidfile is specified, pid.(botnet-nick) will be used.</p>
451
<dt><strong>set sort-users 0</strong></dt>
454
<p>If you want your userfile to be sorted upon saving, enable this
455
setting. This causes the bot to use bit more CPU when saving the
319
459
<dt><strong>set help-path "help/"</strong></dt>
322
<p>Specify here where eggdrop should look for help files. Don't
323
modify this setting until you know what you're doing!</p>
462
<p>Specify here where Eggdrop should look for help files.
463
Don't modify this setting unless you know what you're
467
<dt><strong>set text-path "text/"</strong></dt>
470
<p>Specify here where Eggdrop should look for text files. This is
471
used for certain Tcl and DCC commands.</p>
326
474
<dt><strong>set temp-path "/tmp"</strong></dt>
329
<p>Set here a place to store temporarily files</p>
477
<p>Set here a place to store temporary files.</p>
332
480
<dt><strong>set motd "text/motd"</strong></dt>
335
<p>The MOTD (motto of the day) is displayed when people dcc chat or
336
telnet to the bot.</p>
338
<p>Look into doc/settings.motd or type '.help set motd' in
339
DCC CHAT or telnet connection for options.</p>
483
<p>The MOTD (Message Of The day) is displayed when people dcc chat
484
or telnet to the bot. Look at doc/TEXT-SUBSTITUTIONS for
342
488
<dt><strong>set telnet-banner "text/banner"</strong></dt>
345
<p>This banner will be displayed on telnet connections</p>
491
<p>This banner will be displayed on telnet connections. Look at
492
doc/TEXT-SUBSTITUTIONS for options.</p>
348
495
<dt><strong>set userfile-perm 0600</strong></dt>
351
<p>Specifies what permissions the user, channel and notes (if notes
352
module is loaded) files should be set to.</p>
354
<p>The octal values are the same as for the chmod system
498
<p>This specifies what permissions the user, channel, and notes
499
files should be set to. The octal values are the same as for the
500
chmod system command.</p>
357
502
<p>To remind you:</p>
508
613
it into trouble, or that the user has a broken client (like mIRC
509
614
tends to do), in which case the connect wouldn't work anyway.
510
615
It's suggested that you turn this on.</p>
512
<p>Valid settings are 0 and 1.</p>
515
<dt><strong><em>set quiet-reject 1</em></strong></dt>
518
<p>If set to 1, the bot will squelch the error message when
519
rejecting a DCC CHAT or SEND.</p>
521
<p>Normally eggdrop tells the DCC user that the CHAT or SEND has
522
been rejected because they don't have access, but sometimes IRC
523
server operators detect bots that way.</p>
526
<dt><strong>set max-dcc 50</strong></dt>
529
<p>Set here the maximum number of dcc connections you will allow -
530
you can increase this later, but never decrease it.</p>
533
<dt><strong><em>set require-p 0</em></strong></dt>
536
<p>Define here if +o user still need the +p flag to dcc the
539
<p>Valid settings are 0 and 1.</p>
618
<dt><strong>set ident-timeout 5</strong></dt>
621
<p>This settings defines a time in seconds that the bot should
622
wait before a dcc chat, telnet, or relay connection times out.</p>
625
<dt><strong>set require-p 0</strong></dt>
628
<p>Define here whether or not a +o user still needs the +p flag
632
<dt><strong>set open-telnets 0</strong></dt>
635
<p>If you want people allow to telnet in and type 'NEW'
636
to become a new user, set this to 1. This is similar to the
637
'hello' msg command. The protect-telnet setting must be
638
set to 0 to use this.</p>
641
<dt><strong>set stealth-telnets 0</strong></dt>
644
<p>If you don't want Eggdrop to identify itself as an Eggdrop
645
on a telnet connection, set this setting to 1. Eggdrop will display
646
'Nickname' instead.</p>
649
<dt><strong>set use-telnet-banner 0</strong></dt>
652
<p>If you want Eggdrop to display a banner when telneting in, set
653
this setting to 1. The telnet banner is set by 'set
654
telnet-banner'.</p>
657
<dt><strong>set connect-timeout 15</strong></dt>
660
<p>This settings defines a timeout in seconds how long the bot
661
should wait for a dcc chat, telnet, relay, etc connection.</p>
542
664
<dt><strong>set dcc-flood-thr 3</strong></dt>
545
<p>Specify here the number of lines from a user on the partyline
546
(dcc, telnet) before they are considered to be flooding (and
547
therefore get booted)</p>
667
<p>Specify here the number of lines to accept from a user on the
668
partyline within 1 second before they are considered to be
669
flooding and therefore get booted.</p>
672
<dt><strong>set telnet-flood 5:60</strong></dt>
675
<p>Define here how many telnet connection attempts in how many
676
seconds from the same host constitute a flood. The correct format
677
is Attempts:Seconds.</p>
680
<dt><strong>set paranoid-telnet-flood 1</strong></dt>
683
<p>If you want telnet-flood to apply even to +f users, set this
550
687
<dt><strong>set resolve-timeout 15</strong></dt>
553
690
<p>Set here the amount of seconds before giving up on
554
hostname/address lookup. (you might want to increase this if you
691
hostname/address lookup (you might want to increase this if you
555
692
are on a slow network).</p>
558
<dt><strong>set ident-timeout 5</strong></dt>
561
<p>Set a timeout in seconds how long to wait on ident-lookups.</p>
564
<dt><strong>set connect-timeout 15</strong></dt>
567
<p>This settings defines a timeout in seconds how long the bot
568
should wait for a dcc chat, telnet, relay, etc connection.</p>
571
<dt><strong><em>set my-hostname
572
"virtual.host.com"</em></strong></dt>
574
<dt><strong><em>set my-ip "99.99.0.0"</em></strong></dt>
577
<p>If you're using virtual hosting (your machine has more than
578
1 IP), you may want to specify the particular IP to bind to. You
579
can specify either by hostname or by IP. You may also want to set
580
the hostname here if eggdrop has trouble detecting it when it
584
<dt><strong><em>set firewall "host:port"</em></strong></dt>
587
<p>Set this to your socks host if your eggdrop sits behind a
592
<p><strong>set firewall "proxy:178"</strong></p>
594
<p>If you use a Sun "telnet passthru" firewall, use this
599
<p><strong>set firewall
600
"!sun-barr.ebay:3666"</strong></p>
603
<dt><strong><em>set nat-ip "127.0.0.1"</em></strong></dt>
697
<p><a name="sect1g"></a>1g. <strong>More advanced settings</strong></p>
701
<dt><strong>set firewall "!sun-barr.ebay:3666"</strong></dt>
704
<p>Set this to your socks host if your Eggdrop sits behind a
705
firewall. If you use a Sun "telnet passthru" firewall,
706
prefix the host with a "!".</p>
709
<dt><strong>set nat-ip "127.0.0.1"</strong></dt>
606
712
<p>If you have a NAT firewall (you box has an IP in one of the
607
713
following ranges: 192.168.0.0-192.168.255.255,
608
714
172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255 and your
609
firewall transparently changes your address to a unique address for
610
your box.) or you have IP masquerading between you and the rest of
611
the world, and /dcc chat,/ctcp chat or userfile sharing aren't
612
working. Enter your outside IP here.</p>
614
<p>Do not enter anything for my-ip or my-hostname if you use this
618
<dt><strong><em>set reserved-portrange 2010:2020</em></strong></dt>
621
<p>If you want all your dcc file transfers bound to a particular portrange,
622
either because your behind a firewall, or for other security reasons, set it
626
<dt><strong><em>set dupwait-timeout 5</em></strong></dt>
629
<p>If your eggdrop rejects bots that actually have already
630
disconnected from another hub, but the disconnect information has
631
not yet spread over the botnet due to lag, use this setting.</p>
633
<p>The bot will wait dupwait-timeout seconds before it checks again
634
and then finally reject the bot.</p>
639
<p><a name="sect1f"></a>1f. <strong>Console</strong></p>
643
<dt><strong>set console "mkcobxs"</strong></dt>
646
<p>This is the default console mode. It uses the same event flags
647
as the log files do.</p>
649
<p>Note that the console channel is automatically set to your
650
"primary" channel (the one you defined first in config
653
<p>Masters can change their console channel and modes with the
654
'.console' command</p>
659
<p><a name="sect1g"></a>1g. <strong>Common stuff</strong></p>
715
firewall transparently changes your address to a unique address
716
for your box) or you have IP masquerading between you and the rest
717
of the world, and /dcc chat,/ctcp chat or userfile sharing
718
aren't working, enter your outside IP here. Do not enter
719
anything for my-ip or my-hostname if you use this setting.</p>
722
<dt><strong>set reserved-portrange 2010:2020</strong></dt>
725
<p>If you want all dcc file transfers to use a particular
726
portrange either because you're behind a firewall, or for other
727
security reasons, set it here.</p>
663
730
<dt><strong>set ignore-time 15</strong></dt>
666
<p>Set the time in minutes how long temporary ignores should
733
<p>Set the time in minutes that temporary ignores should last.</p>
670
736
<dt><strong>set hourly-updates 00</strong></dt>
673
<p>Define here what eggdrop calls 'hourly'. All calls to
674
it, including such things as note notifying or userfile saving are
675
affected by this.</p>
739
<p>Define here what Eggdrop considers 'hourly'. All calls
740
to it, including such things as note notifying or userfile saving,
741
are affected by this.</p>
679
<p><strong>set hourly-updates 15</strong></p>
746
<p>set hourly-updates 15</p>
681
<p>Bot will save 15 minutes past every hour its userfile</p>
749
<p>The bot will save its userfile 15 minutes past every hour.</p>
684
752
<dt><strong>set owner "MrLame, MrsLame"</strong></dt>
687
<p>Put all permanent owner into this variable.</p>
755
<p>Un-comment this line and set the list of owners of the bot.
756
You NEED to change this setting.</p>
759
<dt><strong>set notify-newusers "$owner"</strong></dt>
762
<p>Who should a note be sent to when new users are learned?</p>
690
765
<dt><strong>set default-flags "hp"</strong></dt>
693
<p>Enter all flags that new users should get as a default.</p>
768
<p>Enter the flags that all new users should get by default. See
769
'.help whois' on the partyline for a list of flags and
770
their descriptions.</p>
696
<dt><strong><em>set whois-fields "url
697
birthday"</em></strong></dt>
773
<dt><strong>set whois-fields "url birthday"</strong></dt>
700
776
<p>Enter all user-defined fields that should be displayed in a
701
'.whois' This will only be shown if the user has one of
702
these xtra fields.</p>
704
<p>You might prefer to comment this out and use the userinfo1.0.tcl
705
script which provides commands for changing all of these.</p>
708
<dt><strong><em>set die-on-sighup 0</em></strong></dt>
711
<p>Enable this setting if you want your eggdrop on receiving a
712
SIGHUP. Otherwise eggdrop will just rehash.</p>
714
<p>Valid settings are 0 and 1.</p>
717
<dt><strong><em>set die-on-sigterm 0</em></strong></dt>
720
<p>Enable this setting if you want your eggdrop on receiving a
721
SIGTERM. Otherwise eggdrop will just save its userfile.</p>
723
<p>Valid settings are 0 and 1.</p>
726
<dt><strong>set must-be-owner 0</strong></dt>
777
'.whois'. This will only be shown if the user has one of
778
these extra fields. You might prefer to comment this out and use
779
the userinfo1.0.tcl script which provides commands for changing
783
<dt><strong>set die-on-sighup 0</strong></dt>
786
<p>Enable this setting if you want your Eggdrop to die upon
787
receiving a SIGHUP kill signal. Otherwise, the Eggdrop will just
788
save its userfile and rehash.</p>
791
<dt><strong>set die-on-sigterm 0</strong></dt>
794
<p>Enable this setting if you want your Eggdrop to die upon
795
receiving a SIGTERM kill signal. Otherwise, the Eggdrop will just
796
save its userfile and rehash.</p>
799
<dt><strong>unbind dcc n tcl *dcc:tcl</strong></dt>
800
<dt><strong>unbind dcc n set *dcc:set</strong></dt>
803
<p>Comment these two lines if you wish to enable the .tcl and .set
804
commands. If you select your owners wisely, you should be okay
808
<dt><strong>set must-be-owner 1</strong></dt>
729
811
<p>If you enable this setting, only permanent owners (owner
730
setting) will be able to use .tcl and .set moreover if you want
731
only let permanent owners use .dump, then set it to 2 Valid
732
settings are 0, 1 and 2</p>
735
<dt><strong><em>set enable-simul 1</em></strong></dt>
738
<p>Enable this setting, if you want to enable the
739
'dccsimul' Tcl command</p>
741
<p>Valid settings are 0 and 1.</p>
744
<dt><strong><em>set allow-dk-cmds 1</em></strong></dt>
747
<p>Enable this setting, if you want +d & +k users to use
748
commands bound as -|-</p>
750
<p>Valid settings are 0 and 1.</p>
812
setting) will be able to use .tcl and .set. Moreover, if you want
813
to only let permanent owners use .dump, then set this to 2.</p>
816
<dt><strong>unbind dcc n simul *dcc:simul</strong></dt>
819
<p>Comment out this line to add the 'simul' partyline
820
command (owners can manipulate other people on the party line).
821
Please select owners wisely and use this command ethically!</p>
824
<dt><strong>set max-dcc 50</strong></dt>
827
<p>Set here the maximum number of dcc connections you will allow.
828
You can increase this later, but never decrease it.</p>
831
<dt><strong>set allow-dk-cmds 1</strong></dt>
834
<p>Enable this setting if you want +d & +k users to use
835
commands bound as -|-.</p>
838
<dt><strong>set dupwait-timeout 5</strong></dt>
841
<p>If your Eggdrop rejects bots that actually have already
842
disconnected from another hub, but the disconnect information has
843
not yet spread over the botnet due to lag, use this setting. The
844
bot will wait dupwait-timeout seconds before it checks again and
845
then finally reject the bot.</p>
804
894
<p><a name="sect1i"></a>1i. <strong>Scripts</strong></p>
807
<p>Script section should be placed at the end of the config file. All
808
modules should be loaded and their variables should be set at this
897
<p>The scripts section should be placed at the end of the config file.
898
All modules should be loaded and their variables should be set at this
811
<p><strong><em>source scripts/script.tcl</em></strong></p>
813
<p>This line loads script.tcl in the scripts directory of your eggdrop.
814
All script should be put there, although you can place them where you
815
like as long as you can supply a fully qualified path to them.</p>
817
<p>Some commonly loaded scripts are alltools.tcl and
901
<p><strong>source scripts/script.tcl</strong></p>
903
<p>This line loads script.tcl from the scripts directory inside your
904
Eggdrop's directory. All scripts should be put there, although you
905
can place them where you like as long as you can supply a fully
906
qualified path to them.</p>
908
<p>Some commonly loaded scripts are alltools.tcl and action.fix.tcl.</p>
820
910
<p>The appropriate source lines are:</p>
822
912
<p><strong>source scripts/alltools.tcl<br>
823
source scripts/action.fix.tcl</strong></p>
826
<p><a name="sect2"></a>2. <strong>Output commands</strong></p>
830
<dt><strong>putlog <text></strong></dt>
833
<p>sends text to the log for any channel, marked as
834
'misc' (o);</p>
836
<p>returns: nothing</p>
839
<dt><strong>putcmdlog <text></strong></dt>
842
<p>sends text to the log for any channel, marked as
843
'command' (c);</p>
845
<p>returns: nothing</p>
848
<dt><strong>putxferlog <text></strong></dt>
851
<p>sends text to the log for any channel, marked as
852
'file-area' (x)</p>
854
<p>returns: nothing</p>
857
<dt><strong>putloglev <level(s)> <channel>
858
<text></strong></dt>
861
<p>sends text to the log, tagged with all of the valid levels
862
given (use "*" to indicate all log levels)</p>
864
<p>returns: nothing</p>
867
<dt><strong>dumpfile <nick> <filename></strong></dt>
870
<p>dumps out a file from the help/text directory to a user on IRC
871
via msg (one line per msg); the user has no flags, so the flag
872
bindings won't work within the file.</p>
877
<p><a name="sect3"></a>3. <strong>User record manipulation
878
commands</strong></p>
882
<dt><strong>countusers</strong></dt>
885
<p>returns: number of users in the bot's database</p>
888
<dt><strong>validuser <handle></strong></dt>
891
<p>returns: "1" if a user by that name exists;
892
'0' otherwise</p>
895
<dt><strong>finduser <nick!user@host></strong></dt>
898
<p>finds the user record which most closely matches the given
901
<p>returns: the handle found, or "*" if none</p>
904
<dt><strong>userlist [flags]</strong></dt>
907
<p>returns: a list of the handles of users on the bot. You can
908
use the new flag matching system here.</p>
912
<p>[global]{&/|}[chan]{&/|}[bot]<br>
913
matches the flags relevantly, (chan matches vs anywhere), &
914
specifies an and match, | specifies or, only the first of these
915
is relevant, the default is or.</p>
918
<dt><strong>passwdok <handle> <pass></strong></dt>
921
<p>checks the password given against the user's password --
922
if the user has not set a password, will always return
923
"1"; check against the password "" (a blank
924
string) to find out if a user has no password set</p>
926
<p>returns: "1" if password matches for that user;
927
"0" if not</p>
930
<dt><strong>getuser <handle> <entry-type> [extra
934
<p>This is a generic interface to the new generic userfile
935
support, it return info specific to each entry-type.</p>
937
<p>Valid entry types are:</p>
941
<dt><strong>BOTFL</strong></dt>
944
<p>returns the current bot-specific flags for the user (if
945
it's a bot :)</p>
948
<dt><strong>BOTADDR</strong></dt>
951
<p>(another bot-only thing :) returns a list containing the
952
bots address, the bots telnet port, and it's relay
956
<dt><strong>HOSTS</strong></dt>
959
<p>returns a list of the host for the user</p>
962
<dt><strong>LASTON</strong></dt>
965
<p>returns a list containing the unixtime last seen, and
966
the last seen place.</p>
969
<dt><strong>LASTON #channel</strong></dt>
972
<p>returns the time last seen on the channel or 0 if no
976
<dt><strong>INFO</strong></dt>
979
<p>returns the user's global info line</p>
982
<dt><strong>COMMENT</strong></dt>
985
<p>returns the master-visible only comment for the user</p>
988
<dt><strong>EMAIL</strong></dt>
991
<p>returns the users email address</p>
994
<dt><strong>URL</strong></dt>
997
<p>returns the users url address</p>
1000
<dt><strong>XTRA</strong></dt>
1003
<p>returns xtra info, use the form:<br>
1004
<strong>getuser <handle> XTRA
1005
<key></strong><br>
1006
to receive data set for a certain key</p>
1012
<dt><strong>setuser <handle> <entry-type> [extra
1016
<p>This is the counterpart of getuser, it lets you set the
1017
various values extra ones not supported about:</p>
1021
<dt><strong>PASS</strong></dt>
1024
<p>use this to set a users password (no 3rd arg will clear
1028
<dt><strong>HOSTS</strong></dt>
1031
<p>for setting hosts, no extra info = clear, otherwise
1032
<strong>*1*</strong> hostmask is added</p>
1035
<dt><strong>LASTON</strong></dt>
1038
<p>sets global laston time, will also set laston time for
1039
any channel the user has a chanrec for (if it matches) to
1040
prevent setting a channel time from <strong>ALSO</strong>
1041
setting the global time use <strong>LASTON time #channel
1045
<dt><strong>XTRA</strong></dt>
1049
<strong>setuser <handle> XTRA <key>
1050
<data></strong><br>
1051
sets up to 500 bytes of data per key (use no data to
1058
<dt><strong>chnick <old-handle>
1059
<new-handle></strong></dt>
1062
<p>changes a user's handle</p>
1064
<p>returns: "1" on success; "0" if the handle
1065
is already used, the handle is invalid, or the user can't be
1070
<strong>chattr <handle> [changes [channel]]</strong></dt>
1073
<p>changes the attributes for a user record, if you include any
1074
-- changes are of the form "+f", "-o",
1075
"+dk", "-o+d", etc; if a channel is
1076
specified, the channel-specific flags for that channel are
1077
altered you can now use the +o|-o #channel format here too.</p>
1079
<p>returns: new flags for the user (if you made no changes,
1080
returns current flags); if a channel was specified, the
1081
channel-specific flags for that channel are returned -- returns
1082
"*" if that user does not exist</p>
1085
<dt><strong>matchattr <handle> <flags>
1086
[channel]</strong></dt>
1089
<p>returns: "1" if the specified user has the matching
1090
flags. (using the new matching system)</p>
1093
<dt><strong>adduser <handle> <hostmask></strong></dt>
1096
<p>creates a new user entry with the handle and hostmask given
1097
(with no password, and the default flags)</p>
1099
<p>returns: "1" if successful, "0" if it
1103
<dt><strong>deluser <handle></strong></dt>
1106
<p>attempts to erase a user record with that handle</p>
1108
<p>returns: "1" if successful, "0" if no such
1112
<dt><strong>delhost <handle> <hostmask></strong></dt>
1115
<p>deletes a hostmask from a user's hostmask list</p>
1117
<p>returns: "1" on success, "0" if that
1118
hostmask wasn't in the list or the user does not exist</p>
1121
<dt><strong>newignore <hostmask> <creator>
1122
<comment> [lifetime]</strong></dt>
1125
<p>adds an entry to the ignore list; creator is given credit for
1126
the ignore; lifetime is how many minutes until the ignore expires
1127
and is removed; if lifetime is not specified, ignore-time
1128
(usually 60) is used; setting the lifetime to 0 makes it a
1129
permanent ignore</p>
1131
<p>returns: nothing</p>
1134
<dt><strong>killignore <hostmask></strong></dt>
1137
<p>removes an entry from the ignore list</p>
1139
<p>returns: "1" if successful, "0"
1143
<dt><strong>ignorelist</strong></dt>
1146
<p>returns: list of ignores; each entry is itself a list,
1147
containing: hostmask, comment, expiration timestamp, time added,
1148
and creator (the three timestamps are in unixtime format)</p>
1151
<dt><strong>isignore <hostmask></strong></dt>
1154
<p>returns: "1" if the ignore is in the list,
1155
"0" otherwise</p>
1158
<dt><strong>save</strong></dt>
1161
<p>writes the userfile to disk</p>
1163
<p>returns: nothing</p>
1166
<dt><strong>reload</strong></dt>
1169
<p>loads the userfile from disk (replacing whatever's in
1172
<p>returns: nothing</p>
1175
<dt><strong>backup</strong></dt>
1178
<p>makes a simple backup of the userfile that's on disk.
1179
If the channels module is loaded this also makes a backup of the
1182
<p>returns: nothing</p>
1185
<dt><strong>getting-users</strong></dt>
1188
<p>returns: "1" if the bot is currently downloading a
1189
userfile from a sharebot (and hence, user records are about to
1190
drastically change), "0" if not</p>
1196
<p><a name="sect4"></a>4. <strong>DCC commands</strong></p>
1200
<dt><strong>putdcc <idx> <text></strong></dt>
1203
<p>sends text to the dcc user indicated</p>
1205
<p>returns: nothing</p>
1208
<dt><strong>dccbroadcast <message></strong></dt>
1211
<p>sends your message to everyone on the party line on the bot
1212
net, in the form "*** <message>" for local users,
1213
and "*** [Bot] <message>" for users on other
1217
<dt><strong>dccputchan <channel>
1218
<message></strong></dt>
1221
<p>sends your message to everyone on a certain channel on the bot
1222
net, in a form exactly like dccbroadcast does -- valid channels
1223
are 0 through 99999</p>
1225
<p>returns: nothing</p>
1228
<dt><strong>restart</strong></dt>
1231
<p>restarts the bot</p>
1233
<p>returns: nothing</p>
1236
<dt><strong>rehash</strong></dt>
1239
<p>rehashes the bot</p>
1241
<p>returns: nothing</p>
1244
<dt><strong>dccsimul <idx> <text...></strong></dt>
1247
<p>simulates text typed in by the dcc user specified -- note that
1248
in v0.9, this only simulated commands; now a command must be
1249
preceded by a '.' to be simulated</p>
1251
<p>returns: nothing</p>
1254
<dt><strong>hand2idx <handle></strong></dt>
1257
<p>returns: the idx (a number greater than or equal to zero) for
1258
the user given, if she is on the party line in chat mode (even if
1259
she is currently on a channel or in chat off), the file area, or
1260
in the control of a script; "-1" otherwise -- if the
1261
user is on multiple times, the oldest idx is returned</p>
1264
<dt><strong>idx2hand <idx></strong></dt>
1267
<p>returns: handle of the user with that idx</p>
1270
<dt><strong>valididx <idx></strong></dt>
1273
<p>returns: "1" if the idx currently exists;
1274
"0" if not</p>
1277
<dt><strong>botlist</strong></dt>
1280
<p>returns: a list of bots currently on the botnet; each item in
1281
the list will be a sublist with four elements: bot, uplink,
1282
version, sharing status.</p>
1284
<p>bot : the bot's nickname<br>
1285
uplink : who the bot is connected through<br>
1286
version : its currentnumeric version<br>
1287
sharing : a "+" if the bot is sharing, "-"
1291
<dt><strong>islinked <bot></strong></dt>
1294
<p>returns: "1" if the bot is currently linked,
1295
"0" otherwise</p>
1298
<dt><strong>getchan <idx></strong></dt>
1301
<p>returns: the current party line channel for a user on the
1302
party line -- "0" indicates he's on the group party
1303
line, "-1" means he has chat off, and a value from 1 to
1304
99999 is a private channel</p>
1307
<dt><strong>setchan <idx> <channel></strong></dt>
1310
<p>sets a party line user's channel rather suddenly (the
1311
party line user is not notified that she is now on a new
1312
channel); a channel name can be used (provided it exists.</p>
1314
<p>returns: nothing</p>
1317
<dt><strong>console <idx> [channel]
1318
[console-modes]</strong></dt>
1321
<p>changes a dcc user's console mode, either to an absolute
1322
mode (like "mpj") or just adding/removing flags (like
1323
"+pj" or "-moc" or "+mp-c"); the
1324
user's console channel view can be changed also (as long as
1325
the new channel is defined in the bot)</p>
1327
<p>returns: a list containing the user's (new) channel view,
1328
and (new) console mode, or nothing if that user isn't
1329
currently in dcc chat</p>
1332
<dt><strong>echo <idx> [status]</strong></dt>
1335
<p>turns a user's echo on or off; the status has to be a 1 or
1338
<p>returns: new value of echo for that user (or the current
1339
value, if status was omitted)</p>
1342
<dt><strong>killdcc <idx></strong></dt>
1345
<p>kills a party-line or file area connection, rather
1348
<p>returns: nothing</p>
1351
<dt><strong>dccused</strong></dt>
1354
<p>returns: number of dcc connections currently in use</p>
1357
<dt><strong>dcclist</strong></dt>
1360
<p>returns: list of active dcc connections that are in the chat
1361
area, the file area, or a script; each item in the list will be a
1362
sublist with four elements: idx, nickname, hostname, and type;
1363
type will be "chat", "files",
1364
"bot", "file_receiving",
1365
"file_sending", "file_send_pending", or
1366
"script" (or "socket" for connections that
1367
haven't been put under 'control' yet) or any new dcc
1368
type that gets added.</p>
1371
<dt><strong>getdccidle <idx></strong></dt>
1374
<p>returns: number of seconds the dcc chat/file system/script
1375
user has been idle</p>
1378
<dt><strong>getdccaway <idx></strong></dt>
1381
<p>returns: away message for a dcc chat user (or "" if
1382
the user is not set away)</p>
1385
<dt><strong>setdccaway <idx> <message></strong></dt>
1388
<p>sets a party line user's away message and marks them away;
1389
if set to "", the user is marked un-away</p>
1391
<p>returns: nothing</p>
1394
<dt><strong>connect <host> <port></strong></dt>
1397
<p>makes an outgoing connection attempt and creates a dcc entry
1398
for it; a 'control' command should be used immediately
1399
after a successful 'connect' so no input is lost</p>
1401
<p>returns: idx of the new connection</p>
1404
<dt><strong>listen <port> <type> [options]
1405
[flag]</strong></dt>
1408
<p>opens a listening port to accept incoming telnets; type must
1409
be one of "bots", "all", "users",
1410
"script", or "off":</p>
1413
<dt><strong>listen <port> bots [mask]</strong></dt>
1416
<p>accepts connections from bots only; the optional mask is used
1417
to identify permitted bot names; if the mask begins with
1418
'@' it is interpreted to be a mask of permitted hosts to
1419
accept connections from</p>
1421
<p>returns: port #</p>
1424
<dt><strong>listen <port> users [mask]</strong></dt>
1427
<p>accepts connections from users only (no bots); the optional
1428
mask is used to identify permitted nicknames; if the mask begins
1429
with '@' it is interpreted to be a mask of permitted
1430
hosts to accept connections from</p>
1432
<p>returns: port #</p>
1435
<dt><strong>listen <port> all [mask]</strong></dt>
1438
<p>accepts connections from anyone; the optional mask is used to
1439
identify permitted nicknames/botnames; if the mask begins with
1440
'@' it is interpreted to be a mask of permitted hosts to
1441
accept connections from</p>
1443
<p>returns: port #</p>
1446
<dt><strong>listen <port> script <proc>
1447
[flag]</strong></dt>
1450
<p>accepts connections which are immediately routed to a proc;
1451
the proc is called with one parameter: the idx of the new
1452
connection flag may currently only be 'pub', which makes
1453
the bot allow anyone to connect.</p>
1455
<p>returns: port #</p>
1458
<dt><strong>listen <port> off</strong></dt>
1461
<p>stop listening at a port</p>
1463
<p>returns: nothing</p>
1466
<dt><strong>dccdumpfile <idx> <filename></strong></dt>
1469
<p>dumps out a file from the text directory to a dcc chat user;
1470
the flag matching that's used everywhere else works here
1474
<dt><strong>link [via-bot] <bot></strong></dt>
1477
<p>attempts to link to another bot directly (or, if you give a
1478
via-bot, it tells the via-bot to try</p>
1480
<p>returns: "1" if it looks okay and it will try;
1481
"0" if not</p>
1484
<dt><strong>unlink <bot></strong></dt>
1487
<p>attempts to remove a bot from the botnet</p>
1489
<p>returns: "1" if it will try or has passed the
1490
request on; "0" if not</p>
1493
<dt><strong>encrypt <key> <string></strong></dt>
1496
<p>returns: encrypted string (using blowfish), encoded into ascii
1497
using base-64 so it can be sent over the botnet</p>
1500
<dt><strong>decrypt <key>
1501
<encrypted-base64-string></strong></dt>
1504
<p>returns: decrypted string (using blowfish)</p>
1507
<dt><strong>encpass <password></strong></dt>
1510
<p>returns: encrypted string (using blowfish)</p>
1513
<dt><strong>md5 <string></strong></dt>
1516
<p>returns: the 128 bits MD5 "message-digest" of the
1517
specified string.</p>
1522
<p><a name="sect5"></a>5. <strong>Miscellaneous commands</strong></p>
1526
<dt><strong>bind <type> <attr(s)> <command-name>
1527
[proc-name]</strong></dt>
1530
<p>adds a new keyword command to the bot; valid types are listed
1531
below; the <attr(s)> are the flags that a user must have to
1532
trigger this command; the <command-name> for each type is
1533
listed below; <proc-name> is the name of the Tcl procedure
1534
to call for this command (see below for the format of the
1535
procedure call); if the proc-name is omitted, no binding is added
1536
-- instead, the current binding is returned (if it's
1537
stackable, a list of the current bindings is returned) yes, you
1538
can use the new flag binding method here too, and this is where
1539
it becomes truly phearful since you may never need to check
1540
attr's inside functions again...imagine:</p>
1542
<p>bind pub -o&+o command command_proc</p>
1544
<p>returns: name of the command that was added, or (if proc-name
1545
was omitted), a list of the current bindings for this command</p>
1548
<dt><strong>unbind <type> <attr(s)>
1549
<command-name> <proc-name></strong></dt>
1552
<p>removes a previously-made binding</p>
1554
<p>returns: name of the command that was removed</p>
1557
<dt><strong>logfile [<modes> <channel>
1558
<filename>]</strong></dt>
1561
<p>creates a new logfile, which will log the modes given for the
1562
channel listed -- or, if no logfile is specified, just returns a
1563
list of logfiles; "*" can be used to mean all channels;
1564
you can also change the modes and channel of an existing logfile
1565
with this command -- entering a blank mode and channel makes the
1566
bot stop logging there</p>
1568
<p>returns: filename of logfile created, or (if no logfile is
1569
specified) a list of logfiles like: "{mco * eggdrop.log} {jp
1570
#lame lame.log}"</p>
1573
<dt><strong>maskhost <nick!user@host></strong></dt>
1576
<p>returns: hostmask for the string given
1577
("n!u@1.2.3.4" -> "*!u@1.2.3.*",
1578
"n!u@lame.com" -> "*!u@lame.com",
1579
"n!u@a.b.edu" -> "*!u@*.b.edu")</p>
1582
<dt><strong>unixtime</strong></dt>
1585
<p>returns: a long integer which is the current time according to
1589
<dt><strong>strftime <formatstring> [time]</strong></dt>
1592
<p>returns: a formatted string of time using standard strftime
1593
format, uses the value of time, or now if no time specified</p>
1596
<dt><strong>ctime <unixtime></strong></dt>
1599
<p>returns: a string of the date/time represented by the unix
1600
time given (i.e. "Fri Aug 3 11:34:55 1973")</p>
1603
<dt><strong>myip</strong></dt>
1606
<p>returns: a long number representing the bot's IP address,
1607
as it might appear in (for example) a DCC request</p>
1610
<dt><strong>rand <limit></strong></dt>
1613
<p>returns: a random integer between 0 and limit-1</p>
1616
<dt><strong>die [reason]</strong></dt>
1619
<p>causes the bot to log a fatal error and exit completely; if no
1620
reason is given, "EXIT" is used</p>
1623
<dt><strong>unames</strong></dt>
1626
<p>returns: the current operating system the bot is using.</p>
1632
<p><a name="sect6"></a>6. <strong>Global variables</strong></p>
1635
<p>(All config-file variables are global too, but these variables are
1636
set by the bot.)</p>
1641
<dt><strong>version</strong></dt>
1644
<p>current bot version (ie: "1.1.2+pl1 1010201 pl1");
1645
first item is the text version, second item is a numerical
1646
version, and any following items are the names of patches that
1650
<dt><strong>numversion</strong></dt>
1653
<p>current numeric bot version (ie: "1010201")</p>
1655
<p>Numerical version is "MMNNRRPP" where:</p>
1657
<p>MM is the major release number<br>
1658
NN is the minor release number<br>
1659
RR is the sub-release number<br>
1660
PP is the patch level for that sub-release</p>
1663
<dt><strong>uptime</strong></dt>
1666
<p>unixtime value for when the bot was started</p>
1669
<dt><strong>lastbind</strong></dt>
1672
<p>The last command binding which triggered. This allows you to
1673
identify which command triggered a Tcl routine.</p>
1679
<p><a name="sect7"></a>7. <strong>Command extension</strong></p>
1682
<p>You can use the 'bind' command to attach Tcl procedures to
1683
certain events. For example, you can write a Tcl procedure that gets
1684
called every time a user says "danger" on the channel. The
1685
following is a list of the types of bindings, and how they work.
1686
Under each binding type is the format of the bind command, the list
1687
of arguments sent to the Tcl proc, and an explanation.</p>
1689
<p>Some bindings are marked as "stackable". That means that
1690
you can bind multiple commands to the same trigger. Normally, for
1691
example, a binding of "bind msg - stop msg_stop" (which
1692
makes a msg-command "stop" call the Tcl proc
1693
"msg_stop") will overwrite any previous binding you had for
1694
the msg-command "stop". With stackable bindings, like
1695
'msgm' for example, you can bind to the same command or mask
1696
again and again. When the binding is triggered, ALL the Tcl procs
1697
that are bound to it will be called, one after another.</p>
1699
<p>To remove a binding, use "unbind". For example, to
1700
remove that binding for the msg-command "stop", use
1701
"unbind msg - stop msg_stop".</p>
1703
<p>There are more bindings which are enabled from the loading of
1704
specific modules, see the specific module information pages to see
1705
which module provides which bindings.</p>
1710
<dt><strong>DCC</strong></dt>
1713
<p>bind dcc <flags> <command> <proc><br>
1714
proc-name <handle> <idx> <args></p>
1716
<p>used for commands from a dcc chat on the party line; as in
1717
MSG, the command is the first word and everything else is the
1718
argument string; the idx is valid until the user disconnects;
1719
after that it may be reused, so be careful about storing an idx
1720
for long periods of time</p>
1723
<dt><strong>BOT</strong></dt>
1726
<p>bind bot <flags> <command> <proc><br>
1727
proc-name <from-bot> <command> <args></p>
1729
<p>triggered by a message coming from another bot in the botnet;
1730
works similar to a DCC binding; the first word is the command and
1731
the rest becomes the argument string; flags are ignored</p>
1734
<dt><strong>CHON (stackable)</strong></dt>
1737
<p>bind chon <flags> <mask> <proc><br>
1738
proc-name <handle> <idx></p>
1740
<p>when someone first enters the "party-line" area of
1741
the bot via dcc chat or telnet, this is triggered before they are
1742
connected to a chat channel (so yes, you can change the channel
1743
in a 'chon' proc); mask matches against handle; this is
1744
NOT triggered when someone returns from the file area, etc</p>
1747
<dt><strong>CHOF (stackable)</strong></dt>
1750
<p>bind chof <flags> <mask> <proc><br>
1751
proc-name <handle> <idx></p>
1753
<p>triggered when someone leaves the party line to disconnect
1754
from the bot; mask matches against the handle; note that the
1755
connection may have already been dropped by the user, so
1756
don't send output to that idx</p>
1759
<dt><strong>CHAT (stackable)</strong></dt>
1762
<p>bind chat <flags> <mask> <proc><br>
1763
proc-name <nick> <channel#> <text></p>
1765
<p>when someone says something on the botnet, it invokes this
1766
binding; flags is ignored; nick could be a user on this bot (i.e.
1767
"DronePup") or on another bot (i.e.
1768
"Eden@Wilde"); the mask is checked against the text</p>
1771
<dt><strong>LINK (stackable)</strong></dt>
1774
<p>bind link <flags> <mask> <proc><br>
1775
proc-name <botname> <via></p>
1777
<p>triggered when a bot links into the botnet; botname is the
1778
name of the bot that just linked in; via is the bot it linked
1779
through; the mask is checked against the bot that linked; flags
1783
<dt><strong>DISC (stackable)</strong></dt>
1786
<p>bind disc <flags> <mask> <proc><br>
1787
proc-name <botname></p>
1789
<p>triggered when a bot disconnects from the botnet for whatever
1790
reason; just like the link bind, flags are ignored; mask is
1791
checked against the nickname of the bot that left</p>
1794
<dt><strong>FILT (stackable)</strong></dt>
1797
<p>bind filt <flags> <mask> <proc><br>
1798
proc-name <idx> <text></p>
1800
<p>DCC party line and file system users have their text sent
1801
through filt before being processed; if the proc a blank string,
1802
the text is considered parsed; otherwise the bot will use the
1803
text returned from the proc and continue parsing that</p>
1806
<dt><strong>ACT (stackable)</strong></dt>
1809
<p>bind act <flags> <mask> <proc><br>
1810
proc-name <nick> <channel#> <action></p>
1812
<p>when someone does an action on the botnet, it invokes this
1813
binding; flags is ignored; the mask is checked against the text
1814
of the action (this is very similar to the CHAT binding)</p>
1817
<dt><strong>BCST (stackable)</strong></dt>
1820
<p>bind chat <flags> <mask> <proc><br>
1821
proc-name <bot> <channel#> <text></p>
1823
<p>when a bot says something on the botnet, it invokes this
1824
binding; flags is ignored; the mask is checked against the
1828
<dt><strong>CHJN (stackable)</strong></dt>
1831
<p>bind chat <flags> <mask> <proc><br>
1832
proc-name <bot> <nick> <channel#>
1833
<flag><sock> <from></p>
1835
<p>when someone joins a botnet channel, it invokes this binding;
1836
flags is ignored; the mask is checked against the text</p>
1839
<dt><strong>CHPT (stackable)</strong></dt>
1842
<p>bind chat <flags> <mask> <proc><br>
1843
proc-name <bot> <nick> <sock> <chan></p>
1845
<p>when someone parts a botnet channel, it invokes this binding;
1846
flags is ignored; the mask is checked against the channel</p>
1849
<dt><strong>TIME (stackable)</strong></dt>
1852
<p>bind time - <mask> <proc><br>
1853
proc-name <min> <hour> <day> <month>
1856
<p>allows you to schedule procedure calls at certain times, mask
1857
matches 5 space separated integers of the form: "min hour
1858
day month year"</p>
1861
<dt><strong>AWAY (stackable)</strong></dt>
1864
<p>bind away - <mask> <proc><br>
1865
proc-name <bot> <idx> <msg></p>
1867
<p>triggers when a user goes away or comes back on the botnet
1868
(msg == "" when returning)</p>
1871
<dt><strong>LOAD (stackable)</strong></dt>
1874
<p>bind load - <mask> <proc><br>
1875
proc-name <module></p>
1877
<p>triggers when a module is loaded.</p>
1880
<dt><strong>UNLD (stackable)</strong></dt>
1883
<p>bind unld - <mask> <proc><br>
1884
proc-name <module></p>
1886
<p>triggers when a module is unloaded.</p>
1889
<dt><strong>NKCH (stackable)</strong></dt>
1892
<p>bind nkch - <mask> <proc><br>
1893
proc-name <oldnick> <newnick></p>
1895
<p>triggered whenever a local users nick is changed (in the
1899
<dt><strong>EVNT (stackable)</strong></dt>
1902
<p>bind evnt - <type> <proc><br>
1903
proc-name <type></p>
1905
<p>triggered whenever one of these events happens. valid events
1910
<dt><strong>sighup</strong></dt>
1913
<p>called on a kill -HUP <pid></p>
1916
<dt><strong>sigterm</strong></dt>
1919
<p>called on a kill -TERM <pid></p>
1922
<dt><strong>sigill</strong></dt>
1925
<p>called on a kill -ILL <pid></p>
1928
<dt><strong>sigquit</strong></dt>
1931
<p>called on a kill -QUIT <pid></p>
1934
<dt><strong>save</strong></dt>
1937
<p>called when the userfile is saved</p>
1940
<dt><strong>rehash</strong></dt>
1943
<p>called just after a rehash</p>
1946
<dt><strong>prerehash</strong></dt>
1949
<p>called just before a rehash</p>
1952
<dt><strong>logfile</strong></dt>
1955
<p>called when the logs are switched daily</p>
1964
<p><a name="sect8"></a>8. <strong>Return values</strong></p>
1967
<p>Several bindings pay attention to the value you return from the
1968
proc (using "return $value"). Usually they expect a 0 or 1,
1969
and failing to return any value is interpreted as a 0.</p>
1971
<p>Here's a list of the bindings that use the return value from
1972
procs they trigger, these bindings are mostly enabled from the
1973
loading of specific modules, see the specific module information
1974
pages to see which module provides which bindings.</p>
1979
<dt><strong>MSG</strong></dt>
1982
<p>Return 1 to make the command get logged like so:<br>
1983
(nick!user@host) !handle! command</p>
1986
<dt><strong>DCC</strong></dt>
1989
<p>Return 1 to make the command get logged like so:<br>
1990
#handle# command</p>
1993
<dt><strong>FIL</strong></dt>
1996
<p>Return 1 to make the command get logged like so:<br>
1997
#handle# files: command</p>
2000
<dt><strong>PUB</strong></dt>
2003
<p>Return 1 to make the command get logged like so:<br>
2004
<<nick>> !handle! command</p>
2007
<dt><strong>CTCP</strong></dt>
2010
<p>Return 1 to ask the bot not to process the CTCP command on its
2011
own. Otherwise it would send its own response to the CTCP
2012
(possibly an error message if it doesn't know how to deal
2016
<dt><strong>FILT</strong></dt>
2019
<p>Return 1 to indicate the text has been processed, and the bot
2020
should just ignore it. Otherwise it will treat the text like any
2024
<dt><strong>FLUD</strong></dt>
2027
<p>Return 1 to ask the bot not to take action on the flood.
2028
Otherwise it will do its normal punishment.</p>
2031
<dt><strong>RAW</strong></dt>
2034
<p>Return 1 to ask the bot not to process the server text. This
2035
can affect the bot's performance (by causing it to miss
2036
things that it would normally act on) -- you have been
2040
<dt><strong>WALL</strong></dt>
2043
<p>Return 1 to make the command get logged liked so:<br>
2050
<p><a name="sect9"></a>9. <strong>Matching characters</strong></p>
2053
<p>Many of the bindings allow match characters in the arguments. Here
2054
are the four special characters:</p>
2056
<p>? matches any single character<br>
2057
* matches 0 or more characters of any type<br>
2058
% matches 0 or more non-space characters (can be used to match a
2060
~ matches 1 or more space characters (can be used for whitespace
913
source scripts/action.fix.tcl</strong></p>
2066
916
<p><em>Copyright © 1997 Robey Pointer<br>
2067
Copyright © 1999, 2000, 2001, 2002 <a href="http://www.eggheads.org/">
2068
Eggheads Development Team</a></em></p>
917
Copyright © 1999, 2000, 2001, 2002, 2003, 2004
918
<a href="http://www.eggheads.org/"> Eggheads Development Team</a></em></p>