1.. highlight:: text
2
3Eggdrop Tcl Commands
4Last revised: January 24, 2021
5
6====================
7Eggdrop Tcl Commands
8====================
9
10
11This is an exhaustive list of all the Tcl commands added to Eggdrop. All
12of the normal Tcl built-in commands are still there, of course, but you
13can also use these to manipulate features of the bot. They are listed
14according to category.
15
16This list is accurate for Eggdrop v1.9.1. Scripts written for v1.3, v1.4,
171.6 and 1.8 series of Eggdrop should probably work with a few minor modifications
18depending on the script. Scripts which were written for v0.9, v1.0, v1.1
19or v1.2 will probably not work without modification. Commands which have
20been changed in this version of Eggdrop (or are just new commands) are
21marked with vertical bars (|) on the left.
22
23Output Commands
24---------------
25
26^^^^^^^^^^^^^^^^^^^^^^^^
27putserv <text> [options]
28^^^^^^^^^^^^^^^^^^^^^^^^
29
30  Description: sends text to the server, like '.dump' (intended for direct server commands); output is queued so that the bot won't flood itself off the server.
31
32  Options:
33  -next    push messages to the front of the queue
34  -normal  no effect
35
36  Returns: nothing
37
38  Module: server
39
40^^^^^^^^^^^^^^^^^^^^^^^^
41puthelp <text> [options]
42^^^^^^^^^^^^^^^^^^^^^^^^
43
44  Description: sends text to the server, like 'putserv', but it uses a different queue intended for sending messages to channels or people.
45
46  Options:
47  -next    push messages to the front of the queue
48  -normal  no effect
49
50  Returns: nothing
51
52  Module: server
53
54^^^^^^^^^^^^^^^^^^^^^^^^^
55putquick <text> [options]
56^^^^^^^^^^^^^^^^^^^^^^^^^
57
58  Description: sends text to the server, like 'putserv', but it uses a different (and faster) queue.
59
60  Options:
61  -next    push messages to the front of the queue
62  -normal  no effect
63
64  Returns: nothing
65
66  Module: server
67
68^^^^^^^^^^^^^^^^^^^^^^^^
69putnow <text> [-oneline]
70^^^^^^^^^^^^^^^^^^^^^^^^
71
72  Description: sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server.
73
74  Options:
75  -oneline  send text up to the first \r or \n, discarding the rest
76
77  Returns: nothing
78
79  Module: server
80
81^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82putkick <channel> <nick,nick,...> [reason]
83^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
85  Description: sends kicks to the server and tries to put as many nicks into one kick command as possible.
86
87  Returns: nothing
88
89  Module: irc
90
91^^^^^^^^^^^^^
92putlog <text>
93^^^^^^^^^^^^^
94
95  Description: logs <text> to the logfile and partyline if the 'misc' flag (o) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively.
96
97  Returns: nothing
98
99  Module: core
100
101^^^^^^^^^^^^^^^^
102putcmdlog <text>
103^^^^^^^^^^^^^^^^
104
105  Description: logs <text> to the logfile and partyline if the 'cmds' flag (c) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively.
106
107  Returns: nothing
108
109  Module: core
110
111^^^^^^^^^^^^^^^^^
112putxferlog <text>
113^^^^^^^^^^^^^^^^^
114
115  Description: logs <text> to the logfile and partyline if the 'files' flag (x) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively.
116
117  Returns: nothing
118
119  Module: core
120
121^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122putloglev <flag(s)> <channel> <text>
123^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
125  Description: logs <text> to the logfile and partyline at the log level of the specified flag. Use "*" in lieu of a flag to indicate all log levels.
126
127  Returns: nothing
128
129  Module: core
130
131^^^^^^^^^^^^^^^^^^^^^^^^^^
132dumpfile <nick> <filename>
133^^^^^^^^^^^^^^^^^^^^^^^^^^
134
135  Description: dumps file from the help/text directory to a user on IRC via msg (one line per msg). The user has no flags, so the flag bindings won't work within the file.
136
137  Returns: nothing
138
139  Module: core
140
141^^^^^^^^^^^^^^^^^
142queuesize [queue]
143^^^^^^^^^^^^^^^^^
144
145  Returns: the number of messages in all queues. If a queue is specified, only the size of this queue is returned. Valid queues are: mode, server, help.
146
147  Module: server
148
149^^^^^^^^^^^^^^^^^^
150clearqueue <queue>
151^^^^^^^^^^^^^^^^^^
152
153  Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all.
154
155  Returns: the number of deleted lines from the specified queue.
156
157  Module: server
158
159^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160cap <ls/req/enabled/raw> [arg]
161^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162
163  Description: displays CAP status or sends a raw CAP command to the server. "ls" will list the capabilities Eggdrop is internally tracking as supported by the server, "enabled" will list the capabilities Eggdrop is internally tracking as negotiated with the server, "req" will request the capabilities listed in "arg" from the server, and raw will send a raw CAP command to the server. The arg field is a single argument, and should be submitted as a single string. For example, to request capabilities foo and bar, you would use [cap req "foo bar"], and for example purposes, sending the same request as a raw command would be [cap raw "REQ :foo bar"].
164
165  Returns: nothing
166
167  Module: server
168
169^^^^^^^^^^^^^^^^^^^^^^
170tagmsg <tags> <target>
171^^^^^^^^^^^^^^^^^^^^^^
172
173  Description: sends an IRCv3 TAGMSG command to the target. Only works if message-tags has been negotiated with the server via the cap command. tags is a Tcl dict (or space-separated string) of the tags you wish to send separated by commas (do not include the @prefix), and target is the nickname or channel you wish to send the tags to. To send a tag only (not a key/value pair), use a "" as the value for a key in a dict, or a "{}" if you are sending as a space-separated string.
174
175  Examples:
176    set mytags [dict create +foo bar moo baa +last ""]; tagmsg $mytags #channel
177    tagmsg "+foo bar moo baa +last {}" #channel
178
179  Returns: nothing
180
181  Module: server
182
183^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
184server add <ip/host> [[+]port [password]]
185^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186
187  Description: adds a server to the list of servers Eggdrop will connect to. Prefix the port with '+' to indicate an SSL-protected port. A port value is required if password is to be specified. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).
188
189  Returns: nothing
190
191  Module: server
192
193^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194server remove <ip/host> [[+]port]
195^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196
197  Description: removes a server from the list of servers Eggdrop will connect to. If no port is provided, all servers matching the ip or hostname provided will be removed, otherwise only the ip/host with the corresponding port will be removed. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).
198
199  Returns: nothing
200
201  Module: server
202
203
204User Record Manipulation Commands
205---------------------------------
206
207^^^^^^^^^^
208countusers
209^^^^^^^^^^
210
211  Returns: number of users in the bot's database
212
213  Module: core
214
215^^^^^^^^^^^^^^^^^^
216validuser <handle>
217^^^^^^^^^^^^^^^^^^
218
219  Returns: 1 if a user by that name exists; 0 otherwise
220
221  Module: core
222
223^^^^^^^^^^^^^^^^^^^^^^^^^
224finduser <nick!user@host>
225^^^^^^^^^^^^^^^^^^^^^^^^^
226
227  Description: finds the user record which most closely matches the given nick!user\@host
228
229  Returns: the handle found, or "*" if none
230
231  Module: core
232
233^^^^^^^^^^^^^^^^
234userlist [flags]
235^^^^^^^^^^^^^^^^
236
237  Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/\|}[chan]{&/\|}[bot]). '&' specifies "and"; '|' specifies "or".
238
239  Module: core
240
241^^^^^^^^^^^^^^^^^^^^^^^^
242passwdok <handle> <pass>
243^^^^^^^^^^^^^^^^^^^^^^^^
244
245  Description: checks the password given against the user's password. Check against the password "-" to find out if a user has no password set.
246
247  Returns: 1 if the password matches for that user; 0 otherwise. Or if we are checking against the password "-": 1 if the user has no password set; 0 otherwise.
248
249  Module: core
250
251^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252getuser <handle> [entry-type] [extra info]
253^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254
255  Description: an interface to the new generic userfile support. Without an entry-type, it returns a flat key/value list (dict) of all set entries. Valid entry types are:
256
257  +----------+-------------------------------------------------------------------------------------+
258  | BOTFL    | returns the current bot-specific flags for the user (bot-only)                      |
259  +----------+-------------------------------------------------------------------------------------+
260  | BOTADDR  | returns a list containing the bot's address, bot listen port, and user listen port  |
261  +----------+-------------------------------------------------------------------------------------+
262  | HOSTS    | returns a list of hosts for the user                                                |
263  +----------+-------------------------------------------------------------------------------------+
264  | LASTON   | returns a list containing the unixtime last seen and the last seen place.           |
265  |          | LASTON #channel returns the time last seen time for the channel or 0 if no info     |
266  |          | exists.                                                                             |
267  +----------+-------------------------------------------------------------------------------------+
268  | INFO     | returns the user's global info line                                                 |
269  +----------+-------------------------------------------------------------------------------------+
270  | XTRA     | returns the user's XTRA info                                                        |
271  +----------+-------------------------------------------------------------------------------------+
272  | COMMENT  | returns the master-visible only comment for the user                                |
273  +----------+-------------------------------------------------------------------------------------+
274  | HANDLE   | returns the user's handle as it is saved in the userfile                            |
275  +----------+-------------------------------------------------------------------------------------+
276  | PASS     | returns the user's encrypted password                                               |
277  +----------+-------------------------------------------------------------------------------------+
278
279  For additional custom user fields, to include the deprecated "EMAIL" and "URL" fields, reference scripts/userinfo.tcl.
280
281  Returns: info specific to each entry-type
282
283  Module: core
284
285^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286setuser <handle> <entry-type> [extra info]
287^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
288
289  Description: this is the counterpart of getuser. It lets you set the various values. Other then the ones listed below, the entry-types are the same as getuser's.
290
291  +---------+---------------------------------------------------------------------------------------+
292  | Type    | Extra Info                                                                            |
293  +=========+=======================================================================================+
294  | PASS    | <password>                                                                            |
295  |         |   Password string (Empty value will clear the password)                               |
296  +---------+---------------------------------------------------------------------------------------+
297  | BOTADDR | <address> [bot listen port] [user listen port]                                        |
298  |         |   Sets address, bot listen port and user listen port. If no listen ports are          |
299  |         |   specified, only the bot address is updated. If only the bot listen port is          |
300  |         |   specified, both the bot and user listen ports are set to the bot listen port.       |
301  +---------+---------------------------------------------------------------------------------------+
302  | HOSTS   | [hostmask]                                                                            |
303  |         |   If no value is specified, all hosts for the user will be cleared. Otherwise, only   |
304  |         |   *1* hostmask is added :P                                                            |
305  +---------+---------------------------------------------------------------------------------------+
306  | LASTON  | This setting has 3 forms.                                                             |
307  |         |                                                                                       |
308  |         | <unixtime> <place>                                                                    |
309  |         |   sets global LASTON time. Standard values used by Eggdrop for <place> are partyline, |
310  |         |   linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to     |
311  |         |   anything.                                                                           |
312  |         |                                                                                       |
313  |         | <unixtime>                                                                            |
314  |         |   sets global LASTON time (leaving the place field empty)                             |
315  |         |                                                                                       |
316  |         | <unixtime> <channel>                                                                  |
317  |         |   sets a user's LASTON time for a channel (if it is a valid channel)                  |
318  +---------+---------------------------------------------------------------------------------------+
319
320  Returns: nothing
321
322  Module: core
323
324^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
325chhandle <old-handle> <new-handle>
326^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
327
328  Description: changes a user's handle
329
330  Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can't be found
331
332  Module: core
333
334^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
335chattr <handle> [changes [channel]]
336^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
337
338  Description: changes the attributes for a user record, if you include any.
339  Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are specified in the format of \|<changes> <channel>, the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too.
340
341  Returns: new flags for the user (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. "*" is returned if the specified user does not exist.
342
343  Module: core
344
345^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
346botattr <handle> [changes [channel]]
347^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
348
349  Description: similar to chattr except this modifies bot flags rather than normal user attributes.
350
351  Returns: new flags for the bot (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. "*" is returned if the specified bot does not exist.
352
353  Module: core
354
355^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
356matchattr <handle> <flags> [channel]
357^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
358
359  Description: checks if the flags of the specified user match the flags provided. "flags" is of the form::
360
361      [+/-]<global flags>[&/|<channel flags>[&/|<bot flags>]]
362
363  Either | or & can be used as a separator between global, channel, and bot flags, but only one separator can be used per flag section. A '+' is used to check if a user has the subsequent flags, and a '-' is used to check if a user does NOT have the subsequent flags.
364
365+------------+-----------------------------------------------------------------+
366| Flag Mask  | Action                                                          |
367+============+=================================================================+
368| +m         + Checks if the user has the m global flag                        |
369+------------+-----------------------------------------------------------------+
370| +mn        | Checks if the user has the m OR n global flag                   |
371+------------+-----------------------------------------------------------------+
372| \|+mn      | Checks if the user has the m OR n global flag                   |
373+------------+-----------------------------------------------------------------+
374| \|+mn #foo | Checks if the user has the m OR n channel flag for #foo         |
375+------------+-----------------------------------------------------------------+
376| &+mn       | Checks if the user has the m AND n global flag                  |
377+------------+-----------------------------------------------------------------+
378| &mn #foo   | Checks if the user has the m AND n channel flag for #foo        |
379+------------+-----------------------------------------------------------------+
380| \|+o #foo  | Checks if the user has the o channel flag for #foo              |
381+------------+-----------------------------------------------------------------+
382| +o|+n #foo | Checks if the user has the o global flag OR the n channel flag  |
383|            | for #foo                                                        |
384+------------+-----------------------------------------------------------------+
385| +m&+v #foo | Checks if the user has the m global flag AND the v channel flag |
386|            | for #foo                                                        |
387+------------+-----------------------------------------------------------------+
388| -m         | Checks if the user does not have the m global flag              |
389+------------+-----------------------------------------------------------------+
390| \|-n #foo  | Checks if the user does not have the n channel flag for #foo    |
391+------------+-----------------------------------------------------------------+
392| +m|-n #foo | Checks if the user has the global m flag OR does not have a     |
393|            | channel n flag for #foo                                         |
394+------------+-----------------------------------------------------------------+
395| -n&-m #foo | Checks if the user does not have the global n flag AND does     |
396|            | not have the channel m flag for #foo                            |
397+------------+-----------------------------------------------------------------+
398| ||+b       | Checks if the user has the bot flag b                           |
399+------------+-----------------------------------------------------------------+
400
401  Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise
402
403  Module: core
404
405^^^^^^^^^^^^^^^^^^^^^^^^^^^
406adduser <handle> [hostmask]
407^^^^^^^^^^^^^^^^^^^^^^^^^^^
408
409  Description: creates a new user entry with the handle and hostmask given (with no password and the default flags)
410
411  Returns: 1 if successful; 0 if the handle already exists
412
413  Module: core
414
415^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
416addbot <handle> <address> [botport [userport]]
417^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
418  Description: adds a new bot to the userlist with the handle and botaddress given (with no password and no flags). <address> format is one of:
419
420  - ipaddress
421  - ipv4address:botport/userport    [DEPRECATED]
422  - [ipv6address]:botport/userport  [DEPRECATED]
423
424NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments.
425NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored.
426
427  Returns: 1 if successful; 0 if the bot already exists or a port is invalid
428
429  Module: core
430
431^^^^^^^^^^^^^^^^
432deluser <handle>
433^^^^^^^^^^^^^^^^
434
435  Description: attempts to erase the user record for a handle
436
437  Returns: 1 if successful, 0 if no such user exists
438
439  Module: core
440
441^^^^^^^^^^^^^^^^^^^^^^^^^^^
442delhost <handle> <hostmask>
443^^^^^^^^^^^^^^^^^^^^^^^^^^^
444
445  Description: deletes a hostmask from a user's host list
446
447  Returns: 1 on success; 0 if the hostmask (or user) doesn't exist
448
449  Module: core
450
451^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452addchanrec <handle> <channel>
453^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
454
455  Description: adds a channel record for a user
456
457  Returns: 1 on success; 0 if the user or channel does not exist
458
459  Module: channels
460
461^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
462delchanrec <handle> <channel>
463^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
464
465  Description: removes a channel record for a user. This includes all associated channel flags.
466
467  Returns: 1 on success; 0 if the user or channel does not exist
468
469  Module: channels
470
471^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
472haschanrec <handle> <channel>
473^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
474
475  Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise
476
477  Module: channels
478
479^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
480getchaninfo <handle> <channel>
481^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
482
483  Returns: info line for a specific channel (behaves just like 'getinfo')
484
485  Module: channels
486
487^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
488setchaninfo <handle> <channel> <info>
489^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
490
491  Description: sets the info line on a specific channel for a user. If info is "none", it will be removed.
492
493  Returns: nothing
494
495  Module: channels
496
497^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
498newchanban <channel> <ban> <creator> <comment> [lifetime] [options]
499^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
500
501  Description: adds a ban to the ban list of a channel; creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.
502
503  Options:
504
505  +-----------+-------------------------------------------------------------------------------------+
506  | sticky    | forces the ban to be always active on a channel, even with dynamicbans on           |
507  +-----------+-------------------------------------------------------------------------------------+
508
509
510  Returns: nothing
511
512  Module: channels
513
514^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
515newban <ban> <creator> <comment> [lifetime] [options]
516^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
517
518  Description: adds a ban to the global ban list (which takes effect on all channels); creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, default-ban-time (usually 120) is used. Setting the lifetime to 0 makes it a permanent ban.
519
520  Options:
521
522  +-----------+-------------------------------------------------------------------------------------+
523  | sticky    | forces the ban to be always active on a channel, even with dynamicbans on           |
524  +-----------+-------------------------------------------------------------------------------------+
525
526  Returns: nothing
527
528  Module: channels
529
530^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
531newchanexempt <channel> <exempt> <creator> <comment> [lifetime] [options]
532^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
533
534  Description: adds a exempt to the exempt list of a channel; creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed. For timed bans, once the time period has expired, the exempt will not be removed until the corresponding ban has either expired or been removed.
535
536  Options:
537
538  +-----------+-------------------------------------------------------------------------------------+
539  | sticky    | forces the exempt to be always active on a channel, even with dynamicexempts on     |
540  +-----------+-------------------------------------------------------------------------------------+
541
542  Returns: nothing
543
544  Module: channels
545
546^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
547newexempt <exempt> <creator> <comment> [lifetime] [options]
548^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
549
550  Description: adds a exempt to the global exempt list (which takes effect on all channels); creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed.
551
552  Options:
553
554  +-----------+-------------------------------------------------------------------------------------+
555  | sticky    | forces the exempt to be always active on a channel, even with dynamicexempts on     |
556  +-----------+-------------------------------------------------------------------------------------+
557
558  Returns: nothing
559
560  Module: channels
561
562^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
563newchaninvite <channel> <invite> <creator> <comment> [lifetime] [options]
564^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
565
566  Description: adds a invite to the invite list of a channel; creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.
567
568  Options:
569
570  +-----------+-------------------------------------------------------------------------------------+
571  | sticky    | forces the invite to be always active on a channel, even with dynamicinvites on     |
572  +-----------+-------------------------------------------------------------------------------------+
573
574  Returns: nothing
575
576  Module: channels
577
578^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
579newinvite <invite> <creator> <comment> [lifetime] [options]
580^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
581
582  Description: adds a invite to the global invite list (which takes effect on all channels); creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.
583
584  Options:
585
586  +-----------+-------------------------------------------------------------------------------------+
587  | sticky    | forces the invite to be always active on a channel, even with dynamicinvites on     |
588  +-----------+-------------------------------------------------------------------------------------+
589
590  Returns: nothing
591
592  Module: channels
593
594^^^^^^^^^^^^^^^^^^^^^^^^^^^^
595stickban <banmask> [channel]
596^^^^^^^^^^^^^^^^^^^^^^^^^^^^
597
598  Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.
599
600  Returns: 1 on success; 0 otherwise
601
602  Module: channels
603
604^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
605unstickban <banmask> [channel]
606^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
607
608  Description: makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
609
610  Returns: 1 on success; 0 otherwise
611
612  Module: channels
613
614^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
615stickexempt <exemptmask> [channel]
616^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
617
618  Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.
619
620  Returns: 1 on success; 0 otherwise
621
622  Module: channels
623
624^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
625unstickexempt <exemptmask> [channel]
626^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
627
628  Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
629
630  Returns: 1 on success; 0 otherwise
631
632  Module: channels
633
634^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
635stickinvite <invitemask> [channel]
636^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
637  Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.
638
639  Returns: 1 on success; 0 otherwise
640
641  Module: channels
642
643^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
644unstickinvite <invitemask> [channel]
645^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
646
647  Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
648
649  Returns: 1 on success; 0 otherwise
650
651  Module: channels
652
653^^^^^^^^^^^^^^^^^^^^^^^^^^^
654killchanban <channel> <ban>
655^^^^^^^^^^^^^^^^^^^^^^^^^^^
656
657  Description: removes a ban from the ban list for a channel
658
659  Returns: 1 on success; 0 otherwise
660
661  Module: channels
662
663^^^^^^^^^^^^^
664killban <ban>
665^^^^^^^^^^^^^
666
667  Description: removes a ban from the global ban list
668
669  Returns: 1 on success; 0 otherwise
670
671  Module: channels
672
673^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
674killchanexempt <channel> <exempt>
675^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
676
677  Description: removes an exempt from the exempt list for a channel
678
679  Returns: 1 on success; 0 otherwise
680
681  Module: channels
682
683^^^^^^^^^^^^^^^^^^^
684killexempt <exempt>
685^^^^^^^^^^^^^^^^^^^
686
687  Description: removes an exempt from the global exempt list
688
689  Returns: 1 on success; 0 otherwise
690
691  Module: channels
692
693^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
694killchaninvite <channel> <invite>
695^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
696
697  Description: removes an invite from the invite list for a channel
698
699  Returns: 1 on success; 0 otherwise
700
701  Module: channels
702
703^^^^^^^^^^^^^^^^^^^
704killinvite <invite>
705^^^^^^^^^^^^^^^^^^^
706
707  Description: removes an invite from the global invite list
708
709  Returns: 1 on success; 0 otherwise
710
711  Module: channels
712
713^^^^^^^^^^^^^^^^^^^^^
714ischanjuped <channel>
715^^^^^^^^^^^^^^^^^^^^^
716
717  Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise
718
719  Module: channels
720
721^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
722isban <ban> [channel [-channel]]
723^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
724
725  Returns: 1 if the specified ban is in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked.
726
727  Module: channels
728
729^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
730ispermban <ban> [channel [-channel]]
731^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
732
733  Returns: 1 if the specified ban is in the global ban list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked.
734
735  Module: channels
736
737^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
738isexempt <exempt> [channel [-channel]]
739^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
740
741  Returns: 1 if the specified exempt is in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked.
742
743  Module: channels
744
745^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
746ispermexempt <exempt> [channel [-channel]]
747^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
748
749  Returns: 1 if the specified exempt is in the global exempt list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked.
750
751  Module: channels
752
753^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
754isinvite <invite> [channel [-channel]]
755^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
756
757  Returns: 1 if the specified invite is in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked.
758
759  Module: channels
760
761^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
762isperminvite <invite> [channel [-channel]]
763^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
764
765  Returns: 1 if the specified invite is in the global invite list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked.
766
767  Module: channels
768
769^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
770isbansticky <ban> [channel [-channel]]
771^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
772
773  Returns: 1 if the specified ban is marked as sticky in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked.
774
775  Module: channels
776
777^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
778isexemptsticky <exempt> [channel [-channel]]
779^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
780
781  Returns: 1 if the specified exempt is marked as sticky in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked.
782
783  Module: channels
784
785^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
786isinvitesticky <invite> [channel [-channel]]
787^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
788
789  Returns: 1 if the specified invite is marked as sticky in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked.
790
791  Module: channels
792
793^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
794matchban <nick!user@host> [channel]
795^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
796
797  Returns: 1 if the specified nick!user\@host matches a ban in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well.
798
799  Module: channels
800
801^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
802matchexempt <nick!user@host> [channel]
803^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
804
805  Returns: 1 if the specified nick!user\@host matches an exempt in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well.
806
807  Module: channels
808
809^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
810matchinvite <nick!user@host> [channel]
811^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
812
813  Returns: 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that
814  channel's invite list is checked as well.
815
816  Module: channels
817
818^^^^^^^^^^^^^^^^^
819banlist [channel]
820^^^^^^^^^^^^^^^^^
821
822  Returns: a list of global bans, or, if a channel is specified, a list of channel-specific bans. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.
823
824  Module: channels
825
826^^^^^^^^^^^^^^^^^^^^
827exemptlist [channel]
828^^^^^^^^^^^^^^^^^^^^
829
830  Returns: a list of global exempts, or, if a channel is specified, a list of channel-specific exempts. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.
831
832  Module: channels
833
834^^^^^^^^^^^^^^^^^^^^
835invitelist [channel]
836^^^^^^^^^^^^^^^^^^^^
837
838  Returns: a list of global invites, or, if a channel is specified, a list of channel-specific invites. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.
839
840  Module: channels
841
842^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
843newignore <hostmask> <creator> <comment> [lifetime]
844^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
845
846  Description: adds an entry to the ignore list; creator is given credit for the ignore. lifetime is how many minutes until the ignore expires and is removed. If lifetime is not specified, ignore-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ignore.
847
848  Returns: nothing
849
850  Module: core
851
852^^^^^^^^^^^^^^^^^^^^^
853killignore <hostmask>
854^^^^^^^^^^^^^^^^^^^^^
855  Description: removes an entry from the ignore list
856
857  Returns: 1 if successful; 0 otherwise
858
859  Module: core
860
861^^^^^^^^^^
862ignorelist
863^^^^^^^^^^
864
865  Returns: a list of ignores. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, and creator. The timestamps are in unixtime format.
866
867  Module: core
868
869^^^^^^^^^^^^^^^^^^^
870isignore <hostmask>
871^^^^^^^^^^^^^^^^^^^
872
873  Returns: 1 if the ignore is in the list; 0 otherwise
874
875  Module: core
876
877^^^^
878save
879^^^^
880
881  Description: writes the user and channel files to disk
882
883  Returns: nothing
884
885  Module: core
886
887^^^^^^
888reload
889^^^^^^
890
891  Description: loads the userfile from disk, replacing whatever is in memory
892
893  Returns: nothing
894
895  Module: core
896
897^^^^^^
898backup
899^^^^^^
900  Description: makes a simple backup of the userfile that's on disk. If the channels module is loaded, this also makes a simple backup of the channel file.
901
902  Returns: nothing
903
904  Module: core
905
906^^^^^^^^^^^^^
907getting-users
908^^^^^^^^^^^^^
909
910  Returns: 1 if the bot is currently downloading a userfile from a sharebot (and hence, user records are about to drastically change); 0 if not
911
912  Module: core
913
914Channel Commands
915----------------
916
917^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
918channel add <name> [option-list]
919^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
920
921  Description: adds a channel record for the bot to monitor. The full list of possible options are given in doc/settings/mod.channels. Note that the channel options must be in a list (enclosed in {}).
922
923  Returns: nothing
924
925  Module: channels
926
927^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
928channel set <name> <options...>
929^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
930
931  Description: sets options for the channel specified. The full list of possible options are given in doc/settings/mod.channels.
932
933  Returns: nothing
934
935  Module: channels
936
937^^^^^^^^^^^^^^^^^^^
938channel info <name>
939^^^^^^^^^^^^^^^^^^^
940
941  Returns: a list of info about the specified channel's settings.
942
943  Module: channels
944
945^^^^^^^^^^^^^^^^^^^^^^^^^^^^
946channel get <name> [setting]
947^^^^^^^^^^^^^^^^^^^^^^^^^^^^
948
949  Returns: The value of the setting you specify. For flags, a value of 0 means it is disabled (-), and non-zero means enabled (+). If no setting is specified, a flat list of all available settings and their values will be returned.
950
951  Module: channels
952
953^^^^^^^^^^^^^^^^^^^^^
954channel remove <name>
955^^^^^^^^^^^^^^^^^^^^^
956
957  Description: removes a channel record from the bot and makes the bot no longer monitor the channel
958
959  Returns: nothing
960
961  Module: channels
962
963^^^^^^^^^^^^
964savechannels
965^^^^^^^^^^^^
966
967  Description: saves the channel settings to the channel-file if one is defined.
968
969  Returns: nothing
970
971  Module: channels
972
973^^^^^^^^^^^^
974loadchannels
975^^^^^^^^^^^^
976  Description: reloads the channel settings from the channel-file if one is defined.
977
978  Returns: nothing
979
980  Module: channels
981
982^^^^^^^^
983channels
984^^^^^^^^
985
986  Returns: a list of the channels the bot has a channel record for
987
988  Module: channels
989
990^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
991channame2dname <channel-name>
992^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
993^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
994chandname2name <channel-dname>
995^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
996
997  Description: these two functions are important to correctly support !channels. The bot differentiates between channel description names (chan dnames) and real channel names (chan names). The chan dnames are what you would normally call the channel, such as "!channel". The chan names are what the IRC server uses to identify the channel. They consist of the chan dname prefixed with an ID; such as "!ABCDEchannel".
998
999  For bot functions like isop, isvoice, etc. you need to know the chan dnames. If you communicate with the server, you usually get the chan name, though. That's what you need the channame2dname function for.
1000
1001  If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.
1002
1003  NOTE: For non-!channels, chan dname and chan name are the same.
1004
1005  Module: irc
1006
1007^^^^^^^^^^^^^^^^
1008isbotnick <nick>
1009^^^^^^^^^^^^^^^^
1010
1011  Returns: 1 if the nick matches the botnick; 0 otherwise
1012
1013  Module: server
1014
1015^^^^^^^^^^^^^^^^^
1016botisop [channel]
1017^^^^^^^^^^^^^^^^^
1018
1019  Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise
1020
1021  Module: irc
1022
1023^^^^^^^^^^^^^^^^^^^^^
1024botishalfop [channel]
1025^^^^^^^^^^^^^^^^^^^^^
1026
1027  Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise
1028
1029  Module: irc
1030
1031^^^^^^^^^^^^^^^^^^^^
1032botisvoice [channel]
1033^^^^^^^^^^^^^^^^^^^^
1034
1035  Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise
1036
1037  Module: irc
1038
1039^^^^^^^^^^^^^^^^^^^
1040botonchan [channel]
1041^^^^^^^^^^^^^^^^^^^
1042
1043  Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise
1044
1045  Module: irc
1046
1047^^^^^^^^^^^^^^^^^^^^^^^^^
1048isop <nickname> [channel]
1049^^^^^^^^^^^^^^^^^^^^^^^^^
1050
1051  Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has ops; 0 otherwise
1052
1053  Module: irc
1054
1055^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1056ishalfop <nickname> [channel]
1057^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1058
1059  Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has halfops; 0 otherwise
1060
1061  Module: irc
1062
1063^^^^^^^^^^^^^^^^^^^^^^^^^^
1064wasop <nickname> <channel>
1065^^^^^^^^^^^^^^^^^^^^^^^^^^
1066
1067  Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise
1068
1069  Module: irc
1070
1071^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1072washalfop <nickname> <channel>
1073^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1074
1075  Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise
1076
1077  Module: irc
1078
1079^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1080isvoice <nickname> [channel]
1081^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1082
1083  Returns: 1 if someone by that nickname is on the channel (or any channel if no channel is specified) and has voice (+v); 0 otherwise
1084
1085  Module: irc
1086
1087^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1088isidentified <nickname> [channel]
1089^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1090
1091  Returns: 1 if someone by the specified nickname is on the channel (or
1092  any channel if no channel name is specified) and is logged in); 0 otherwise
1093
1094  Module: irc
1095
1096^^^^^^^^^^^^^^^^^^^^^^^^^^^
1097isaway <nickname> [channel]
1098^^^^^^^^^^^^^^^^^^^^^^^^^^^
1099
1100  Description: determine if a user is marked as 'away' on a server. IMPORTANT: this command is only "mostly" reliable on its own when the IRCv3 away-notify capability is available and negotiated with the IRC server (if you didn't add this to your config file, it likely isn't enabled- you can confirm using the ``cap`` Tcl command).  Additionally, there is no way for Eggdrop (or any client) to capture a user's away status when the user first joins a channel (they are assumed present by Eggdrop on join). To use this command without the away-notify capability negotiated, or to get a user's away status on join (via a JOIN bind), use ``refreshchan <channel> w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel.
1101
1102  Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; 0 otherwise.
1103
1104  Module: irc
1105
1106^^^^^^^^^^^^^^^^^^^^^^^^^^^
1107onchan <nickname> [channel]
1108^^^^^^^^^^^^^^^^^^^^^^^^^^^
1109  Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise
1110
1111  Module: irc
1112
1113^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1114getaccount <nickname> [channel]
1115^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1116
1117  Returns: the services account name of the nickname if they are logged in, "" otherwise, and an error if the account-notify or extended-join capabilities are not enabled. WARNING: this account list may not be accurate depending on the server and configuration. This command will only work if a server supports (and Eggdrop has enabled) the account-notify and extended-join capabilities, and the server understands WHOX requests (also known as raw 354 responses).
1118
1119^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1120nick2hand <nickname> [channel]
1121^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1122
1123  Returns: the handle of a nickname on a channel. If a channel is not specified, the bot will check all of its channels. If the nick is not found, "" is returned. If the nick is found but does not have a handle, "*" is returned. If no channel is specified, all channels are checked.
1124
1125  Module: irc
1126
1127^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1128account2nicks <handle> [channel]
1129^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1130
1131  Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nickname matches the given account; "" is returned if no match is found. This command will only work if a server supports (and Eggdrop has enabled) the account-notify and extended-join capabilities, and the server understands WHOX requests (also known as raw 354 responses). If no channel is specified, all channels are checked.
1132
1133  Module: irc
1134
1135^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1136hand2nick <handle> [channel]
1137^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1138
1139  Returns: nickname of the first person on the specified channel (if one is specified) whose nick!user\@host matches the given handle; "" is returned if no match is found. If no channel is specified, all channels are checked.
1140
1141  Module: irc
1142
1143^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1144hand2nicks <handle> [channel]
1145^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1146
1147  Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nick!user\@host matches the given handle; "" is returned if no match is found. If no channel is specified, all channels are checked.
1148
1149  Module: irc
1150
1151^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1152handonchan <handle> [channel]
1153^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1154
1155  Returns: 1 if the the nick!user\@host for someone on the channel (or any channel if no channel name is specified) matches for the handle given; 0 otherwise
1156
1157  Module: irc
1158
1159^^^^^^^^^^^^^^^^^^^^^^^^^
1160ischanban <ban> <channel>
1161^^^^^^^^^^^^^^^^^^^^^^^^^
1162
1163  Returns: 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel)
1164
1165  Module: irc
1166
1167^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1168ischanexempt <exempt> <channel>
1169^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1170
1171  Returns: 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel)
1172
1173  Module: irc
1174
1175^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1176ischaninvite <invite> <channel>
1177^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1178
1179  Returns: 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel)
1180
1181  Module: irc
1182
1183^^^^^^^^^^^^^^^^^^
1184chanbans <channel>
1185^^^^^^^^^^^^^^^^^^
1186
1187  Returns: a list of the current bans on the channel. Each element is a sublist of the form {<ban> <bywho> <age>}. age is seconds from the bot's point of view
1188
1189  Module: irc
1190
1191^^^^^^^^^^^^^^^^^^^^^
1192chanexempts <channel>
1193^^^^^^^^^^^^^^^^^^^^^
1194
1195  Returns: a list of the current exempts on the channel. Each element is a sublist of the form {<exempts> <bywho> <age>}. age is seconds from the bot's point of view
1196
1197  Module: irc
1198
1199^^^^^^^^^^^^^^^^^^^^^
1200chaninvites <channel>
1201^^^^^^^^^^^^^^^^^^^^^
1202
1203  Returns: a list of the current invites on the channel. Each element is a sublist of the form {<invites> <bywho> <age>}. age is seconds from the bot's point of view
1204
1205  Module: irc
1206
1207^^^^^^^^^^^^^^^^^^^
1208resetbans <channel>
1209^^^^^^^^^^^^^^^^^^^
1210
1211  Description: removes all bans on the channel that aren't in the bot's ban list and refreshes any bans that should be on the channel but aren't
1212
1213  Returns: nothing
1214
1215  Module: irc
1216
1217^^^^^^^^^^^^^^^^^^^^^^
1218resetexempts <channel>
1219^^^^^^^^^^^^^^^^^^^^^^
1220
1221  Description: removes all exempt on the channel that aren't in the bot's exempt list and refreshes any exempts that should be on the channel but aren't
1222
1223  Returns: nothing
1224
1225  Module: irc
1226
1227^^^^^^^^^^^^^^^^^^^^^^
1228resetinvites <channel>
1229^^^^^^^^^^^^^^^^^^^^^^
1230
1231  Description: removes all invites on the channel that aren't in the bot's invite list and refreshes any invites that should be on the channel but aren't
1232
1233  Returns: nothing
1234
1235  Module: irc
1236
1237^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1238resetchanidle [nick] <channel>
1239^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1240
1241  Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified.
1242
1243  Returns: nothing
1244
1245  Module: irc
1246
1247^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1248resetchanjoin [nick] <channel>
1249^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1250  Description: resets the channel join time for the given nick or for all nicks on the channel if no nick is specified.
1251
1252  Returns: nothing
1253
1254  Module: irc
1255
1256^^^^^^^^^^^^^^^^^^^^^^^^^^^
1257resetchan <channel> [flags]
1258^^^^^^^^^^^^^^^^^^^^^^^^^^^
1259
1260  Description: clears the channel info Eggdrop is currently storing for a channel, then rereads the channel info from the server. Useful if Eggdrop gets into a bad state on a server with respect to a channel userlist, for example. If flags are specified, only the required information will be reset, according to the given flags. Available flags:
1261
1262  +-----+------------------------------+
1263  | b   | channel bans                 |
1264  +-----+------------------------------+
1265  | e   | channel exempts              |
1266  +-----+------------------------------+
1267  | I   | channel invites              |
1268  +-----+------------------------------+
1269  | m   | channel modes                |
1270  +-----+------------------------------+
1271  | w   | memberlist (who & away info) |
1272  +-----+------------------------------+
1273
1274  Returns: nothing
1275
1276  Module: irc
1277
1278^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1279refreshchan <channel> [flags]
1280^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1281
1282  Description: An alternative to resetchan, refresh rereads the channel info from the server without first clearing out the previously stored information. Useful for updating a user's away status without resetting their idle time, for example. If flags are specified, only the required information will be refreshed, according to the given flags. Available flags:
1283
1284  +-----+------------------------------+
1285  | b   | channel bans                 |
1286  +-----+------------------------------+
1287  | e   | channel exempts              |
1288  +-----+------------------------------+
1289  | I   | channel invites              |
1290  +-----+------------------------------+
1291  | m   | channel modes                |
1292  +-----+------------------------------+
1293  | t   | channel topic                |
1294  +-----+------------------------------+
1295  | w   | memberlist (who & away info) |
1296  +-----+------------------------------+
1297
1298  Returns: nothing
1299
1300  Module: irc
1301
1302^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1303getchanhost <nickname> [channel]
1304^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1305
1306  Returns: user\@host of the specified nickname (the nickname is not included in the returned host). If a channel is not specified, bot will check all of its channels. If the nickname is not on the channel(s), "" is returned.
1307
1308  Module: irc
1309
1310^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1311getchanjoin <nickname> <channel>
1312^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
1314  Returns: timestamp (unixtime format) of when the specified nickname joined the channel if available, 0 otherwise. Note that after a channel reset this information will be lost, even if previously available.
1315
1316  Module: irc
1317
1318^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1319onchansplit <nick> [channel]
1320^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1321
1322  Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise
1323
1324  Module: irc
1325
1326^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1327chanlist <channel> [flags][<&|>chanflags]
1328^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1329
1330  Description: flags are any global flags; the '&' or '\|' denotes to look for channel specific flags, where '&' will return users having ALL chanflags and '|' returns users having ANY of the chanflags (See matchattr above for additional examples).
1331
1332  Returns: Searching for flags optionally preceded with a '+' will return a list of nicknames that have all the flags listed. Searching for flags preceded with a '-' will return a list of nicknames that do not have have any of the flags (differently said, '-' will hide users that have all flags listed). If no flags are given, all of the nicknames on the channel are returned.
1333
1334  Please note that if you're executing chanlist after a part or sign bind, the gone user will still be listed, so you can check for wasop, isop, etc.
1335
1336  Module: irc
1337
1338^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1339getchanidle <nickname> <channel>
1340^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1341
1342  Returns: number of minutes that person has been idle; -1 if the specified user isn't on the channel
1343
1344  Module: irc
1345
1346^^^^^^^^^^^^^^^^^^^^^
1347getchanmode <channel>
1348^^^^^^^^^^^^^^^^^^^^^
1349
1350  Returns: string of the type "+ntik key" for the channel specified
1351
1352  Module: irc
1353
1354^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1355jump [server [[+]port [password]]]
1356^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1357
1358  Description: jumps to the server specified, or (if none is specified) the next server in the bot's serverlist. If you prefix the port with a plus sign (e.g. +6697), SSL connection will be attempted.
1359
1360  Returns: nothing
1361
1362  Module: server
1363
1364^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1365pushmode <channel> <mode> [arg]
1366^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1367
1368  Description: sends out a channel mode change (ex: pushmode #lame +o goober) through the bot's queuing system. All the mode changes will be sent out at once (combined into one line as much as possible) after the script finishes, or when 'flushmode' is called.
1369
1370  Returns: nothing
1371
1372  Module: irc
1373
1374^^^^^^^^^^^^^^^^^^^
1375flushmode <channel>
1376^^^^^^^^^^^^^^^^^^^
1377
1378  Description: forces all previously pushed channel mode changes to be sent to the server, instead of when the script is finished (just for the channel specified)
1379
1380  Returns: nothing
1381
1382  Module: irc
1383
1384^^^^^^^^^^^^^^^
1385topic <channel>
1386^^^^^^^^^^^^^^^
1387
1388  Returns: string containing the current topic of the specified channel
1389
1390  Module: irc
1391
1392^^^^^^^^^^^^^^^^^^^
1393validchan <channel>
1394^^^^^^^^^^^^^^^^^^^
1395
1396  Description: checks if the bot has a channel record for the specified channel. Note that this does not necessarily mean that the bot is ON the channel.
1397
1398  Returns: 1 if the channel exists, 0 if not
1399
1400  Module: channels
1401
1402^^^^^^^^^^^^^^^^^^^
1403isdynamic <channel>
1404^^^^^^^^^^^^^^^^^^^
1405
1406  Returns: 1 if the channel is a dynamic channel; 0 otherwise
1407
1408  Module: channels
1409
1410^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1411setudef <flag/int/str> <name>
1412^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1413
1414  Description: initializes a user defined channel flag, string or integer setting. You can use it like any other flag/setting. IMPORTANT: Don't forget to reinitialize your flags/settings after a restart, or it'll be lost.
1415
1416  Returns: nothing
1417
1418  Module: channels
1419
1420^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1421renudef <flag/int/str> <oldname> <newname>
1422^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1423
1424  Description: renames a user defined channel flag, string, or integer setting.
1425
1426  Returns: nothing
1427
1428  Module: channels
1429
1430^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1431deludef <flag/int/str> <name>
1432^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1433
1434  Description: deletes a user defined channel flag, string, or integer setting.
1435
1436  Returns: nothing
1437
1438  Module: channels
1439
1440^^^^^^^^^^^^^^^^^^^^^^^
1441getudefs [flag/int/str]
1442^^^^^^^^^^^^^^^^^^^^^^^
1443
1444  Returns: a list of user defined channel settings of the given type, or all of them if no type is given.
1445
1446  Module: channels
1447
1448^^^^^^^^^^^^^^^^^^^^^
1449chansettype <setting>
1450^^^^^^^^^^^^^^^^^^^^^
1451
1452  Returns: The type of the setting you specify. The possible types are flag, int, str, pair. A flag type references a channel flag setting that can be set to either + or -. An int type is a channel  setting that is set to a number, such as ban-time. A str type is a  channel setting that stores a string, such as need-op. A pair type is a setting that holds a value couple, such as the flood settings.
1453
1454  Module: channels
1455
1456^^^^^^^^^^^^^^^^^^^^^^^^^
1457isupport get [key]
1458^^^^^^^^^^^^^^^^^^^^^^^^^
1459
1460  Description:
1461  - isupport get: Returns a flat key/value list (dict) of settings.
1462  - isupport get <key>: Returns the setting's value as a string. Throws an error if the key is not set.
1463
1464  Returns: string or dict, see description above
1465
1466  Module: server
1467
1468^^^^^^^^^^^^^^^^^^^^^^^^^^^
1469isupport isset <key>
1470^^^^^^^^^^^^^^^^^^^^^^^^^^^
1471
1472  Description: Returns 0/1 depending on whether the key has a value.
1473
1474  Returns: 0 or 1
1475
1476  Module: server
1477
1478
1479DCC Commands
1480------------
1481
1482^^^^^^^^^^^^^^^^^^^^^^^^^^
1483putdcc <idx> <text> [-raw]
1484^^^^^^^^^^^^^^^^^^^^^^^^^^
1485
1486  Description: sends text to the idx specified. If -raw is specified, the text will be sent as is, without forced new lines or limits to line length.
1487
1488  Returns: nothing
1489
1490  Module: core
1491
1492^^^^^^^^^^^^^^^^^^^^^^
1493dccbroadcast <message>
1494^^^^^^^^^^^^^^^^^^^^^^
1495
1496  Description: sends a message to everyone on the party line across the botnet, in the form of "\*\*\* <message>" for local users, "\*\*\* (Bot) <message>" for users on other bots with version below 1.8.4, and "(Bot) <message>" for users on other bots with version 1.8.4+ and console log mode 'l' enabled
1497
1498  Returns: nothing
1499
1500  Module: core
1501
1502^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1503dccputchan <channel> <message>
1504^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1505
1506  Description: sends your message to everyone on a certain channel on the botnet, in a form exactly like dccbroadcast does. Valid channels are 0 through 99999.
1507
1508  Returns: nothing
1509
1510  Module: core
1511
1512^^^^^^^^^^^^^^^^^^^^^^^^
1513boot <user@bot> [reason]
1514^^^^^^^^^^^^^^^^^^^^^^^^
1515  Description: boots a user from the partyline
1516
1517  Returns: nothing
1518
1519  Module: core
1520
1521^^^^^^^^^^^^^^^^^^^^^
1522dccsimul <idx> <text>
1523^^^^^^^^^^^^^^^^^^^^^
1524
1525  Description: simulates text typed in by the dcc user specified. Note that in v0.9, this only simulated commands; now a command must be preceded by a '.' to be simulated.
1526
1527  Returns: nothing
1528
1529  Module: core
1530
1531^^^^^^^^^^^^^^^^^
1532hand2idx <handle>
1533^^^^^^^^^^^^^^^^^
1534
1535  Returns: the idx (a number greater than or equal to zero) for the user given if the user is on the party line in chat mode (even if she is currently on a channel or in chat off), the file area, or in the control of a script. -1 is returned if no idx is found. If the user is on multiple times, the oldest idx is returned.
1536
1537  Module: core
1538
1539^^^^^^^^^^^^^^
1540idx2hand <idx>
1541^^^^^^^^^^^^^^
1542
1543  Returns: handle of the user with the given idx
1544
1545  Module: core
1546
1547^^^^^^^^^^^^^^
1548valididx <idx>
1549^^^^^^^^^^^^^^
1550
1551  Returns: 1 if the idx currently exists; 0 otherwise
1552
1553  Module: core
1554
1555^^^^^^^^^^^^^
1556getchan <idx>
1557^^^^^^^^^^^^^
1558
1559  Returns: the current party line channel for a user on the party line; "0" indicates he's on the group party line, "-1" means he has chat off, and a value from 1 to 99999 is a private channel
1560
1561  Module: core
1562
1563^^^^^^^^^^^^^^^^^^^^^^^
1564setchan <idx> <channel>
1565^^^^^^^^^^^^^^^^^^^^^^^
1566
1567  Description: sets a party line user's channel. The party line user is not notified that she is now on a new channel. A channel name can be used (provided it exists).
1568
1569  Returns: nothing
1570
1571  Module: core
1572
1573^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1574console <idx> [channel] [console-modes]
1575^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1576
1577  Description: changes a dcc user's console mode, either to an absolute mode (like "mpj") or just adding/removing flags (like "+pj" or "-moc" or "+mp-c"). The user's console channel view can be changed also (as long as the new channel is a valid channel).
1578
1579  Returns: a list containing the user's (new) channel view and (new) console modes, or nothing if that user isn't currently on the partyline
1580
1581  Module: core
1582
1583^^^^^^^^^^^^^^^^^^
1584resetconsole <idx>
1585^^^^^^^^^^^^^^^^^^
1586
1587  Description: changes a dcc user's console mode to the default setting in the configfile.
1588
1589  Returns: a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline
1590
1591  Module: core
1592
1593^^^^^^^^^^^^^^^^^^^
1594echo <idx> [status]
1595^^^^^^^^^^^^^^^^^^^
1596
1597  Description: turns a user's echo on or off; the status has to be a 1 or 0
1598
1599  Returns: new value of echo for that user (or the current value, if status was omitted)
1600
1601  Module: core
1602
1603^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1604strip <idx> [+/-strip-flags]
1605^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1606
1607  Description: modifies the strip-flags for a user. The supported strip-flags are:
1608
1609  +------+-------------------------------------------------------------+
1610  | c    | remove all color codes                                      |
1611  +------+-------------------------------------------------------------+
1612  | b    | remove all boldface codes                                   |
1613  +------+-------------------------------------------------------------+
1614  | r    | remove all reverse video codes                              |
1615  +------+-------------------------------------------------------------+
1616  | u    | remove all underline codes                                  |
1617  +------+-------------------------------------------------------------+
1618  | a    | remove all ANSI codes                                       |
1619  +------+-------------------------------------------------------------+
1620  | g    | remove all ctrl-g (bell) codes                              |
1621  +------+-------------------------------------------------------------+
1622  | o    | remove all ordinary codes (ctrl+o, terminates bold/color/..)|
1623  +------+-------------------------------------------------------------+
1624  | i    | remove all italics codes                                    |
1625  +------+-------------------------------------------------------------+
1626  | \*   | remove all of the above                                     |
1627  +------+-------------------------------------------------------------+
1628
1629  Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted)
1630
1631  Module: core
1632
1633^^^^^^^^^^^^^^^^^^^^^^^^^^^
1634putbot <bot-nick> <message>
1635^^^^^^^^^^^^^^^^^^^^^^^^^^^
1636
1637  Description: sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored.
1638
1639  Returns: nothing
1640
1641  Module: core
1642
1643^^^^^^^^^^^^^^^^^^^^
1644putallbots <message>
1645^^^^^^^^^^^^^^^^^^^^
1646
1647  Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored.
1648
1649  Returns: nothing
1650
1651  Module: core
1652
1653^^^^^^^^^^^^^
1654killdcc <idx>
1655^^^^^^^^^^^^^
1656
1657  Description: kills a partyline or file area connection
1658
1659  Returns: nothing
1660
1661  Module: core
1662
1663^^^^
1664bots
1665^^^^
1666
1667  Returns: list of the bots currently connected to the botnet
1668
1669  Module: core
1670
1671^^^^^^^
1672botlist
1673^^^^^^^
1674
1675  Returns: a list of bots currently on the botnet. Each item in the list is a sublist with four elements: bot, uplink, version, and sharing status:
1676
1677  +----------+-----------------------------------------------+
1678  | bot      | the bot's botnetnick                          |
1679  +----------+-----------------------------------------------+
1680  | uplink   | the bot the bot is connected to               |
1681  +----------+-----------------------------------------------+
1682  | version  | it's current numeric version                  |
1683  +----------+-----------------------------------------------+
1684  | sharing  | a "+" if the bot is a sharebot; "-" otherwise |
1685  +----------+-----------------------------------------------+
1686
1687  Module: core
1688
1689^^^^^^^^^^^^^^
1690islinked <bot>
1691^^^^^^^^^^^^^^
1692
1693  Returns: 1 if the bot is currently linked; 0 otherwise
1694
1695  Module: core
1696
1697^^^^^^^
1698dccused
1699^^^^^^^
1700
1701  Returns: number of dcc connections currently in use
1702
1703  Module: core
1704
1705^^^^^^^^^^^^^^
1706dcclist [type]
1707^^^^^^^^^^^^^^
1708
1709  Returns: a list of active connections, each item in the list is a sublist containing seven elements:
1710  {<idx> <handle> <hostname> <[+]port> <type> {<other>} <timestamp>}.
1711
1712  The types are: chat, bot, files, file_receiving, file_sending, file_send_pending, script, socket (these are connections that have not yet been put under 'control'), telnet, and server. The timestamp is in unixtime format.
1713
1714  Module: core
1715
1716^^^^^^^^^^^^^^^
1717socklist [type]
1718^^^^^^^^^^^^^^^
1719
1720  Returns: a list of active connections, each item in the list is a sublist containing eight elements (in dict-readable format). The order of items returned should not be considered static or permanent, so it is recommended to access the items as key/value pairs with the dict command, as opposed to something like lindex, to extract values. The possible keys returned are:
1721
1722  +----------+--------------------------------------------------------+
1723  | idx      | integer value assigned to Eggdrop connections          |
1724  +----------+--------------------------------------------------------+
1725  | handle   | possible values are (telnet), (bots), (users),         |
1726  |          | (script) for a listening socket, or the handle of the  |
1727  |          | connected user for an established connection           |
1728  +----------+--------------------------------------------------------+
1729  | host     | the hostname of the connection, if it is known;        |
1730  |          | otherwise a *                                          |
1731  +----------+--------------------------------------------------------+
1732  | ip       | the ip of the connection                               |
1733  +----------+--------------------------------------------------------+
1734  | port     | the port number associated with the connection (local  |
1735  |          | port for listening connections, remote port for server |
1736  |          | connections.                                           |
1737  +----------+--------------------------------------------------------+
1738  | secure   | 1 if SSL/TLS is used for the connect; 0 otherwise      |
1739  +----------+--------------------------------------------------------+
1740  | type     | the type of connection (TELNET, CHAT, SERVER, etc)     |
1741  +----------+--------------------------------------------------------+
1742  | info     | extra information associated with the connection       |
1743  +----------+--------------------------------------------------------+
1744  | time     | timestamp of when the socket was established           |
1745  +----------+--------------------------------------------------------+
1746
1747 Module: core
1748
1749^^^^^^^^^^^
1750whom <chan>
1751^^^^^^^^^^^
1752
1753  Returns: list of people on the botnet who are on that channel. 0 is the default party line. Each item in the list is a sublist with six elements: nickname, bot, hostname, access flag ('-', '@', '+', or '*'), minutes idle, and away message (blank if the user is not away). If you specify * for channel, every user on the botnet is returned with an extra argument indicating the channel the user is on.
1754
1755  Module: core
1756
1757^^^^^^^^^^^^^^^^
1758getdccidle <idx>
1759^^^^^^^^^^^^^^^^
1760
1761  Returns: number of seconds the dcc chat/file system/script user has been idle
1762
1763  Module: core
1764
1765^^^^^^^^^^^^^^^^
1766getdccaway <idx>
1767^^^^^^^^^^^^^^^^
1768
1769  Returns: away message for a dcc chat user (or "" if the user is not set away)
1770
1771  Module: core
1772
1773^^^^^^^^^^^^^^^^^^^^^^^^^^
1774setdccaway <idx> <message>
1775^^^^^^^^^^^^^^^^^^^^^^^^^^
1776
1777  Description: sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away.
1778
1779  Returns: nothing
1780
1781  Module: core
1782
1783^^^^^^^^^^^^^^^^^^^^^^^^
1784connect <host> <[+]port>
1785^^^^^^^^^^^^^^^^^^^^^^^^
1786
1787  Description: makes an outgoing connection attempt and creates a dcc entry for it. A 'control' command should be used immediately after a successful 'connect' so no input is lost. If the port is prefixed with a plus sign, SSL encrypted connection will be attempted.
1788
1789  Returns: idx of the new connection
1790
1791  Module: core
1792
1793^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1794listen [ip] <port> <type> [options [flag]]
1795^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1796
1797  Description: opens a listening port to accept incoming telnets; type must be one of "bots", "all", "users", "script", or "off". Prefixing the port with a plus sign will make eggdrop accept SSL connections on it. An IP may optionally be listed before the mandatory port argument. If no IP is specified, all available interfaces are used.
1798
1799    listen [ip] <port> bots [mask]
1800
1801      Description: accepts connections from bots only; the optional mask is used to identify permitted bot names. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from.
1802
1803      Returns: port number or error message
1804
1805    listen [ip] <port> users [mask]
1806
1807      Description: accepts connections from users only (no bots); the optional mask is used to identify permitted nicknames. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from.
1808
1809      Returns: port number or error message
1810
1811    listen [ip] <port> all [mask]
1812
1813      Description: accepts connections from anyone; the optional mask is used to identify permitted nicknames/botnames. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from.
1814
1815      Returns: port number or error message
1816
1817    listen [ip] <port> script <proc> <flag>
1818
1819      Description: accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. If the script type is used, flag must also be set. Flag may currently only be 'pub', which makes the bot allow anyone to connect and not perform an ident lookup.
1820
1821      Returns: port number or error message
1822
1823    listen [ip] <port> off
1824
1825      Description: stop listening on a port
1826
1827      Returns: nothing
1828
1829  Module: core
1830
1831^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1832dccdumpfile <idx> <filename>
1833^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1834
1835  Description: dumps out a file from the text directory to a dcc chat user. The flag matching that's used everywhere else works here, too.
1836
1837  Returns: nothing
1838
1839  Module: core
1840
1841Notes Module
1842------------
1843
1844^^^^^^^^^^^^^^^^^^^^^^^^^
1845notes <user> [numberlist]
1846^^^^^^^^^^^^^^^^^^^^^^^^^
1847
1848  Returns: -1 if no such user, -2 if notefile failure. If a numberlist is not specified, the number of notes stored for the user is returned. Otherwise, a list of sublists containing information about notes stored for the user is returned. Each sublist is in the format of::
1849
1850        {<from> <timestamp> <note text>}
1851
1852  Module: notes
1853
1854^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1855erasenotes <user> <numberlist>
1856^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1857
1858  Description: erases some or all stored notes for a user. Use '-' to erase all notes.
1859
1860  Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes.
1861
1862  Module: notes
1863
1864^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1865listnotes <user> <numberlist>
1866^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1867
1868  Description: lists existing notes according to the numberlist (ex: "2-4;8;16-")
1869
1870  Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes.
1871
1872  Module: notes
1873
1874^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1875storenote <from> <to> <msg> <idx>
1876^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1877
1878  Description: stores a note for later reading, notifies idx of any results (use idx -1 for no notify).
1879
1880  Returns: 0 on success; non-0 on failure
1881
1882  Module: notes
1883
1884Assoc Module
1885------------
1886
1887^^^^^^^^^^^^^^^^^^^
1888assoc <chan> [name]
1889^^^^^^^^^^^^^^^^^^^
1890
1891  Description: sets the name associated with a botnet channel, if you specify one
1892
1893  Returns: current name for that channel, if any
1894
1895  Module: assoc
1896
1897^^^^^^^^^^^^^^^^
1898killassoc <chan>
1899^^^^^^^^^^^^^^^^
1900
1901  Description: removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs.
1902
1903  Returns: nothing
1904
1905  Module: assoc
1906
1907Compress Module
1908---------------
1909
1910^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1911compressfile [-level <level>] <src-file> [target-file]
1912^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1913and
1914^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1915uncompressfile <src-file> [target-file]
1916^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1917
1918  Description: compresses or un-compresses files. The level option specifies the compression mode to use when compressing. Available modes are from 0 (minimum CPU usage, minimum compression) all the way up to 9 (maximum CPU usage, maximum compression). If you don't specify the target-file, the src-file will be overwritten.
1919
1920  Returns: nothing
1921
1922  Module: compress
1923
1924^^^^^^^^^^^^^^^^^^^^^^^
1925iscompressed <filename>
1926^^^^^^^^^^^^^^^^^^^^^^^
1927
1928  Description: determines whether <filename> is gzip compressed.
1929
1930  Returns: 1 if it is, 0 if it isn't, and 2 if some kind of error prevented the checks from succeeding.
1931
1932  Module: compress
1933
1934Filesys Module
1935--------------
1936
1937^^^^^^^^^^^^^^^^^^
1938setpwd <idx> <dir>
1939^^^^^^^^^^^^^^^^^^
1940
1941  Description: changes the directory of a file system user, in exactly the same way as a 'cd' command would. The directory can be specified relative or absolute.
1942
1943  Returns: nothing
1944
1945  Module: filesys
1946
1947^^^^^^^^^^^^
1948getpwd <idx>
1949^^^^^^^^^^^^
1950
1951  Returns: the current directory of a file system user
1952
1953  Module: filesys
1954
1955^^^^^^^^^^^^^^
1956getfiles <dir>
1957^^^^^^^^^^^^^^
1958
1959  Returns: a list of files in the directory given; the directory is relative to dcc-path
1960
1961  Module: filesys
1962
1963^^^^^^^^^^^^^
1964getdirs <dir>
1965^^^^^^^^^^^^^
1966
1967  Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path
1968
1969  Module: filesys
1970
1971^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1972dccsend <filename> <ircnick>
1973^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1974
1975  Description: attempts to start a dcc file transfer to the given nick; the filename must be specified either by full pathname or in relation to the bot's startup directory
1976
1977  Returns:
1978
1979  +-------+---------------------------------------------------------------------+
1980  | 0     | success                                                             |
1981  +-------+---------------------------------------------------------------------+
1982  | 1     | the dcc table is full (too many connections)                        |
1983  +-------+---------------------------------------------------------------------+
1984  | 2     | can't open a socket for the transfer                                |
1985  +-------+---------------------------------------------------------------------+
1986  | 3     | the file doesn't exist                                              |
1987  +-------+---------------------------------------------------------------------+
1988  | 4     | the file was queued for later transfer, which means that person has |
1989  |       | too many file transfers going right now                             |
1990  +-------+---------------------------------------------------------------------+
1991  | 5     | copy-to-tmp is enabled and the file already exists in the temp      |
1992  |       | directory                                                           |
1993  +-------+---------------------------------------------------------------------+
1994
1995  Module: transfer
1996
1997^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1998filesend <idx> <filename> [ircnick]
1999^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2000
2001  Description: like dccsend, except it operates for a current filesystem user, and the filename is assumed to be a relative path from that user's current directory
2002
2003  Returns: 0 on failure; 1 on success (either an immediate send or a queued send)
2004
2005  Module: filesys
2006
2007^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2008fileresend <idx> <filename> [ircnick]
2009^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2010
2011  Description: functions like filesend, only that it sends a DCC RESEND instead of a DCC SEND, which allows people to resume aborted file transfers if their client supports that protocol. ircII/BitchX/etc. support it; mIRC does not.
2012
2013  Returns: 0 on failure; 1 on success (either an immediate send or a queued send)
2014
2015  Module: filesys
2016
2017^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018setdesc <dir> <file> <desc>
2019^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020
2021  Description: sets the description for a file in a file system directory; the directory is relative to dcc-path
2022
2023  Returns: nothing
2024
2025  Module: filesys
2026
2027^^^^^^^^^^^^^^^^^^^^
2028getdesc <dir> <file>
2029^^^^^^^^^^^^^^^^^^^^
2030
2031  Returns: the description for a file in the file system, if one exists
2032
2033  Module: filesys
2034
2035^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2036setowner <dir> <file> <handle>
2037^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2038
2039  Description: changes the owner for a file in the file system; the directory is relative to dcc-path
2040
2041  Returns: nothing
2042
2043  Module: filesys
2044
2045^^^^^^^^^^^^^^^^^^^^^
2046getowner <dir> <file>
2047^^^^^^^^^^^^^^^^^^^^^
2048
2049  Returns: the owner of a file in the file system
2050
2051  Module: filesys
2052
2053^^^^^^^^^^^^^^^^^^^^^^^^^^^
2054setlink <dir> <file> <link>
2055^^^^^^^^^^^^^^^^^^^^^^^^^^^
2056
2057  Description: creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path
2058
2059  Returns: nothing
2060
2061  Module: filesys
2062
2063^^^^^^^^^^^^^^^^^^^^
2064getlink <dir> <file>
2065^^^^^^^^^^^^^^^^^^^^
2066
2067  Returns: the link for a linked file, if it exists
2068
2069  Module: filesys
2070
2071^^^^^^^^^^^^^^^^^
2072getfileq <handle>
2073^^^^^^^^^^^^^^^^^
2074
2075  Returns: list of files queued by someone; each item in the list will be a sublist with two elements: nickname the file is being sent to and the filename
2076
2077  Module: transfer
2078
2079^^^^^^^^^^^^^^^^^^^^^
2080getfilesendtime <idx>
2081^^^^^^^^^^^^^^^^^^^^^
2082
2083  Returns: the unixtime value from when a file transfer started, or a negative number:
2084
2085  +-----+------------------------------------------------------+
2086  | -1  | no matching transfer with the specified idx was found|
2087  +-----+------------------------------------------------------+
2088  | -2  | the idx matches an entry which is not a file transfer|
2089  +-----+------------------------------------------------------+
2090
2091  Module: transfer
2092
2093^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2094mkdir <directory> [<required-flags> [channel]]
2095^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2096
2097  Description: creates a directory in the file system. Only users with the required flags may access it.
2098
2099  Returns:
2100
2101  +-----+------------------------------------------------------+
2102  | 0   | success                                              |
2103  +-----+------------------------------------------------------+
2104  | 1   | can't create directory                               |
2105  +-----+------------------------------------------------------+
2106  | 2   | directory exists but is not a directory              |
2107  +-----+------------------------------------------------------+
2108  | -3  | could not open filedb                                |
2109  +-----+------------------------------------------------------+
2110
2111  Module: filesys
2112
2113^^^^^^^^^^^^^^^^^
2114rmdir <directory>
2115^^^^^^^^^^^^^^^^^
2116
2117  Description: removes a directory from the file system.
2118
2119  Returns: 0 on success; 1 on failure
2120
2121  Module: filesys
2122
2123^^^^^^^^^^^^^^^^^^^^^^^
2124mv <file> <destination>
2125^^^^^^^^^^^^^^^^^^^^^^^
2126
2127  Description: moves a file from its source to the given destination. The file can also be a mask, such as /incoming/\*, provided the destination is a directory.
2128
2129  Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned:
2130
2131  +-----+------------------------------------------------------+
2132  | -1  | invalid source file                                  |
2133  +-----+------------------------------------------------------+
2134  | -2  | invalid destination                                  |
2135  +-----+------------------------------------------------------+
2136  | -3  | destination file exists                              |
2137  +-----+------------------------------------------------------+
2138  | -4  | no matches found                                     |
2139  +-----+------------------------------------------------------+
2140
2141  Module: filesys
2142
2143^^^^^^^^^^^^^^^^^^^^^^^
2144cp <file> <destination>
2145^^^^^^^^^^^^^^^^^^^^^^^
2146
2147  Description: copies a file from its source to the given destination. The file can also be a mask, such as /incoming/\*, provided the destination is a directory.
2148
2149  Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned:
2150
2151  +-----+------------------------------------------------------+
2152  | -1  | invalid source file                                  |
2153  +-----+------------------------------------------------------+
2154  | -2  | invalid destination                                  |
2155  +-----+------------------------------------------------------+
2156  | -3  | destination file exists                              |
2157  +-----+------------------------------------------------------+
2158  | -4  | no matches found                                     |
2159  +-----+------------------------------------------------------+
2160
2161  Module: filesys
2162
2163^^^^^^^^^^^^^^
2164getflags <dir>
2165^^^^^^^^^^^^^^
2166
2167  Returns: the flags required to access a directory
2168
2169  Module: filesys
2170
2171^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2172setflags <dir> [<flags> [channel]]
2173^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2174
2175  Description: sets the flags required to access a directory
2176
2177  Returns: 0 on success; -1 or -3 on failure
2178
2179  Module: filesys
2180
2181Miscellaneous Commands
2182----------------------
2183
2184^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2185bind <type> <flags> <keyword/mask> [proc-name]
2186^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2187
2188  Description: You can use the 'bind' command to attach Tcl procedures to certain events. flags are the flags the user must have to trigger the event (if applicable). proc-name is the name of the Tcl procedure to call for this command (see below for the format of the procedure call). If the proc-name is omitted, no binding is added. Instead, the current binding is returned (if it's stackable, a list of the current bindings is returned).
2189
2190  Returns: name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command
2191
2192  Module: core
2193
2194^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2195unbind <type> <flags> <keyword/mask> <proc-name>
2196^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2197
2198  Description: removes a previously created bind
2199
2200  Returns: name of the command that was removed
2201
2202  Module: core
2203
2204^^^^^^^^^^^^^^^^^
2205binds [type/mask]
2206^^^^^^^^^^^^^^^^^
2207
2208  Returns: a list of Tcl binds, each item in the list is a sublist of five elements:
2209        {<type> <flags> <name> <hits> <proc>}
2210
2211  Module: core
2212
2213^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2214logfile [<modes> <channel> <filename>]
2215^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2216
2217  Description: creates a new logfile, which will log the modes given for the channel listed. If no logfile is specified, a list of existing logfiles will be returned. "*" indicates all channels. You can also change the modes and channel of an existing logfile with this command. Entering a blank mode and channel ("") makes the bot stop logging there.
2218
2219  Logfile flags:
2220
2221  +-----+---------------------------------------------------------------------+
2222  | b   | information about bot linking and userfile sharing                  |
2223  +-----+---------------------------------------------------------------------+
2224  | c   | commands                                                            |
2225  +-----+---------------------------------------------------------------------+
2226  | d   | misc debug information                                              |
2227  +-----+---------------------------------------------------------------------+
2228  | g   | raw outgoing share traffic                                          |
2229  +-----+---------------------------------------------------------------------+
2230  | h   | raw incoming share traffic                                          |
2231  +-----+---------------------------------------------------------------------+
2232  | j   | joins, parts, quits, topic changes, and netsplits on the channel    |
2233  +-----+---------------------------------------------------------------------+
2234  | k   | kicks, bans, and mode changes on the channel                        |
2235  +-----+---------------------------------------------------------------------+
2236  | l   | linked bot messages                                                 |
2237  +-----+---------------------------------------------------------------------+
2238  | m   | private msgs, notices and ctcps to the bot                          |
2239  +-----+---------------------------------------------------------------------+
2240  | o   | misc info, errors, etc (IMPORTANT STUFF)                            |
2241  +-----+---------------------------------------------------------------------+
2242  | p   | public text on the channel                                          |
2243  +-----+---------------------------------------------------------------------+
2244  | r   | raw incoming server traffic                                         |
2245  +-----+---------------------------------------------------------------------+
2246  | s   | server connects, disconnects, and notices                           |
2247  +-----+---------------------------------------------------------------------+
2248  | t   | raw incoming botnet traffic                                         |
2249  +-----+---------------------------------------------------------------------+
2250  | u   | raw outgoing botnet traffic                                         |
2251  +-----+---------------------------------------------------------------------+
2252  | v   | raw outgoing server traffic                                         |
2253  +-----+---------------------------------------------------------------------+
2254  | w   | wallops (make sure the bot sets +w in init-server)                  |
2255  +-----+---------------------------------------------------------------------+
2256  | x   | file transfers and file-area commands                               |
2257  +-----+---------------------------------------------------------------------+
2258
2259  Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}
2260
2261  Module: core
2262
2263^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2264maskhost <nick!user@host> [masktype]
2265^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2266
2267  Returns: masked hostmask for the string given according to the masktype (the default is 3).
2268
2269  Available types are:
2270
2271  +-----+------------------------------------------------------+
2272  | 0   | \*!user\@host                                        |
2273  +-----+------------------------------------------------------+
2274  | 1   | \*!*user\@host                                       |
2275  +-----+------------------------------------------------------+
2276  | 2   | \*!*\@host                                           |
2277  +-----+------------------------------------------------------+
2278  | 3   | \*!*user\@*.host                                     |
2279  +-----+------------------------------------------------------+
2280  | 4   | \*!*\@*.host                                         |
2281  +-----+------------------------------------------------------+
2282  | 5   | nick!user\@host                                      |
2283  +-----+------------------------------------------------------+
2284  | 6   | nick!*user\@host                                     |
2285  +-----+------------------------------------------------------+
2286  | 7   | nick!*\@host                                         |
2287  +-----+------------------------------------------------------+
2288  | 8   | nick!*user\@*.host                                   |
2289  +-----+------------------------------------------------------+
2290  | 9   | nick!*\@*.host                                       |
2291  +-----+------------------------------------------------------+
2292
2293  You can also specify types from 10 to 19 which correspond to types
2294  0 to 9, but instead of using a * wildcard to replace portions of the
2295  host, only numbers in hostnames are replaced with the '?' wildcard.
2296  Same is valid for types 20-29, but instead of '?', the '\*' wildcard
2297  will be used. Types 30-39 set the host to '\*'.
2298
2299  Module: core
2300
2301^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2302timer <minutes> <tcl-command> [count]
2303^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2304
2305  Description: executes the given Tcl command after a certain number of minutes have passed, at the top of the minute (ie, if a timer is started at 10:03:34 with 1 minute specified, it will execute at 10:04:00. If a timer is started at 10:06:34 with 2 minutes specified, it will execute at 10:08:00). If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the timer will repeat until it's removed with killtimer or until the bot is restarted.
2306
2307  Returns: a timerID
2308
2309  Module: core
2310
2311^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2312utimer <seconds> <tcl-command> [count]
2313^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2314
2315  Description: executes the given Tcl command after a certain number of seconds have passed. If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the utimer will repeat until it's removed with killutimer or until the bot is restarted.
2316
2317  Returns: a timerID
2318
2319  Module: core
2320
2321^^^^^^
2322timers
2323^^^^^^
2324
2325  Returns: a list of active minutely timers. Each entry in the list contains the number of minutes left till activation, the command that will be executed, the timerID, and the remaining number of repeats.
2326
2327  Module: core
2328
2329^^^^^^^
2330utimers
2331^^^^^^^
2332
2333  Returns: a list of active secondly timers. Each entry in the list contains the number of minutes left till activation, the command that will be executed, the timerID, and the remaining number of repeats.
2334
2335  Module: core
2336
2337^^^^^^^^^^^^^^^^^^^
2338killtimer <timerID>
2339^^^^^^^^^^^^^^^^^^^
2340
2341  Description: removes a minutely timer from the list
2342
2343  Returns: nothing
2344
2345  Module: core
2346
2347^^^^^^^^^^^^^^^^^^^^
2348killutimer <timerID>
2349^^^^^^^^^^^^^^^^^^^^
2350
2351  Description: removes a secondly timer from the list
2352
2353  Returns: nothing
2354
2355  Module: core
2356
2357^^^^^^^^
2358unixtime
2359^^^^^^^^
2360
2361  Returns: a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT).
2362
2363  Module: core
2364
2365^^^^^^^^^^^^^^^^^^
2366duration <seconds>
2367^^^^^^^^^^^^^^^^^^
2368
2369  Returns: the number of seconds converted into years, weeks, days, hours, minutes, and seconds. 804600 seconds is turned into 1 week 2 days 7 hours 30 minutes.
2370
2371  Module: core
2372
2373^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2374strftime <formatstring> [time]
2375^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2376
2377  Returns: a formatted string of time using standard strftime format. If time is specified, the value of the specified time is used. Otherwise, the current time is used. Note: The implementation of strftime varies from platform to platform, so the user should only use POSIX-compliant format specifiers to ensure fully portable code.
2378
2379  Module: core
2380
2381^^^^^^^^^^^^^^^^
2382ctime <unixtime>
2383^^^^^^^^^^^^^^^^
2384
2385  Returns: a formatted date/time string based on the current locale settings from the unixtime string given; for example "Fri Aug 3 11:34:55 1973"
2386
2387  Module: core
2388
2389^^^^
2390myip
2391^^^^
2392
2393  Returns: a long number representing the bot's IP address, as it might appear in (for example) a DCC request
2394
2395  Module: core
2396
2397^^^^^^^^^^^^
2398rand <limit>
2399^^^^^^^^^^^^
2400
2401  Returns: a random integer between 0 and limit-1. Limit must be greater than 0 and equal to or less than RAND_MAX, which is generally 2147483647. The underlying pseudo-random number generator is not cryptographically secure.
2402
2403  Module: core
2404
2405^^^^^^^^^^^^^^^^^^^^^^^
2406control <idx> <command>
2407^^^^^^^^^^^^^^^^^^^^^^^
2408
2409  Description: removes an idx from the party line and sends all future input to the Tcl command given. The command will be called with two parameters: the idx and the input text. The command should return 0 to indicate success and 1 to indicate that it relinquishes control of the user back to the bot. If the input text is blank (""), it indicates that the connection has been dropped. Also, if the input text is blank, never call killdcc on it, as it will fail with "invalid idx".
2410
2411  Returns: nothing
2412
2413  Module: core
2414
2415^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2416sendnote <from> <to[@bot]> <message>
2417^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2418
2419  Description: simulates what happens when one user sends a note to another
2420
2421  Returns:
2422
2423  +-----+----------------------------------------------------------+
2424  | 0   | the send failed                                          |
2425  +-----+----------------------------------------------------------+
2426  | 1   | the note was delivered locally or sent to another bot    |
2427  +-----+----------------------------------------------------------+
2428  | 2   | the note was stored locally                              |
2429  +-----+----------------------------------------------------------+
2430  | 3   | the user's notebox is too full to store a note           |
2431  +-----+----------------------------------------------------------+
2432  | 4   | a Tcl binding caught the note                            |
2433  +-----+----------------------------------------------------------+
2434  | 5   | the note was stored because the user is away             |
2435  +-----+----------------------------------------------------------+
2436
2437  Module: core
2438
2439^^^^^^^^^^^^^^^^^^^^
2440link [via-bot] <bot>
2441^^^^^^^^^^^^^^^^^^^^
2442
2443  Description: attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link.
2444
2445  Returns: 1 if the link will be attempted; 0 otherwise
2446
2447  Module: core
2448
2449^^^^^^^^^^^^^^^^^^^^^^
2450unlink <bot> [comment]
2451^^^^^^^^^^^^^^^^^^^^^^
2452
2453  Description: attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet.
2454
2455  Returns: 1 on success; 0 otherwise
2456
2457  Module: core
2458
2459^^^^^^^^^^^^^^^^^^^^^^
2460encrypt <key> <string>
2461^^^^^^^^^^^^^^^^^^^^^^
2462
2463  Returns: encrypted string (using the currently loaded encryption module), encoded into ASCII using base-64. As of v1.8.4, the default blowfish encryption module can use either the older ECB mode (currently used by default for compatibility reasons), or the more recent and more-secure CBC mode. You can explicitly request which encryption mode to use by prefixing the encryption key with either "ecb:" or "cbc:", or by using the blowfish-use-mode setting in the config file. Note: the default encryption mode for this function is planned to transition from ECB to CBC in v1.9.1.
2464
2465  Module: encryption
2466
2467^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2468decrypt <key> <encrypted-base64-string>
2469^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2470
2471  Returns: decrypted string (using the currently loaded encryption module). If the default blowfish encryption module is used, this automatically picks the right decryption mode. You may still prefix the key with "ecb:" or "cbc:" or use the blowfish-use-mode setting in the config file (see the encrypt command for more detailed information).
2472
2473  Module: encryption
2474
2475^^^^^^^^^^^^^^^^^^
2476encpass <password>
2477^^^^^^^^^^^^^^^^^^
2478
2479  Returns: encrypted string (using the currently loaded encryption module)
2480
2481  Module: encryption
2482
2483^^^^^^^^^^^^
2484die [reason]
2485^^^^^^^^^^^^
2486
2487  Description: causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used.
2488
2489  Returns: none
2490
2491  Module: core
2492
2493^^^^^^
2494unames
2495^^^^^^
2496
2497  Returns: the current operating system the bot is using
2498
2499  Module: core
2500
2501^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2502dnslookup <ip-address/hostname> <proc> [[arg1] [arg2] ... [argN]]
2503^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2504
2505  Description: This issues an asynchronous dns lookup request. The command will block if dns module is not loaded; otherwise it will either return immediately or immediately call the specified proc (e.g. if the lookup is already cached).
2506
2507  As soon as the request completes, the specified proc will be called as follows:
2508
2509    <proc> <ipaddress> <hostname> <status> [[arg1] [arg2] ... [argN]]
2510
2511  status is 1 if the lookup was successful and 0 if it wasn't. All additional parameters (called arg1, arg2 and argN above) get appended to the proc's other parameters.
2512
2513  Returns: nothing
2514
2515  Module: core
2516
2517^^^^^^^^^^^^
2518md5 <string>
2519^^^^^^^^^^^^
2520
2521  Returns: the 128 bit MD5 message-digest of the specified string
2522
2523  Module: core
2524
2525^^^^^^^^^^^^^^^^^
2526callevent <event>
2527^^^^^^^^^^^^^^^^^
2528
2529  Description: triggers the evnt bind manually for a certain event. You can call arbitrary events here, even ones that are not pre-defined by Eggdrop. For example: callevent rehash, or callevent myownevent123.
2530
2531  Returns: nothing
2532
2533  Module: core
2534
2535^^^^^^^
2536traffic
2537^^^^^^^
2538
2539  Returns: a list of sublists containing information about the bot's traffic usage in bytes. Each sublist contains five elements: type, in-traffic today, in-traffic total, out-traffic today, out-traffic total (in that order).
2540
2541  Module: core
2542
2543^^^^^^^
2544modules
2545^^^^^^^
2546  Returns: a list of sublists containing information about the bot's currently loaded modules. Each sublist contains three elements: module, version, and dependencies. Each dependency is also a sublist containing the module name and version.
2547
2548  Module: core
2549
2550^^^^^^^^^^^^^^^^^^^
2551loadmodule <module>
2552^^^^^^^^^^^^^^^^^^^
2553
2554  Description: attempts to load the specified module.
2555
2556  Returns: "Already loaded." if the module is already loaded, "" if successful, or the reason the module couldn't be loaded.
2557
2558  Module: core
2559
2560^^^^^^^^^^^^^^^^^^^^^
2561unloadmodule <module>
2562^^^^^^^^^^^^^^^^^^^^^
2563
2564  Description: attempts to unload the specified module.
2565
2566  Returns: "No such module" if the module is not loaded, "" otherwise.
2567
2568  Module: core
2569
2570^^^^^^^^^^^^^^^^^^^^^^^^
2571loadhelp <helpfile-name>
2572^^^^^^^^^^^^^^^^^^^^^^^^
2573
2574  Description: attempts to load the specified help file from the help/ directory.
2575
2576  Returns: nothing
2577
2578  Module: core
2579
2580^^^^^^^^^^^^^^^^^^^^^^^^^^
2581unloadhelp <helpfile-name>
2582^^^^^^^^^^^^^^^^^^^^^^^^^^
2583
2584  Description: attempts to unload the specified help file.
2585
2586  Returns: nothing
2587
2588  Module: core
2589
2590^^^^^^^^^^
2591reloadhelp
2592^^^^^^^^^^
2593
2594  Description: reloads the bot's help files.
2595
2596  Returns: nothing
2597
2598  Module: core
2599
2600^^^^^^^
2601restart
2602^^^^^^^
2603
2604  Description: rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list.
2605
2606  Returns: nothing
2607
2608  Module: core
2609
2610^^^^^^
2611rehash
2612^^^^^^
2613
2614  Description: rehashes the bot
2615
2616  Returns: nothing
2617
2618  Module: core
2619
2620^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2621stripcodes <strip-flags> <string>
2622^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2623
2624  Description: strips specified control characters from the string given. strip-flags can be any combination of the following:
2625
2626  +-----+-------------------------------------------------------------+
2627  | c   | remove all color codes                                      |
2628  +-----+-------------------------------------------------------------+
2629  | b   | remove all boldface codes                                   |
2630  +-----+-------------------------------------------------------------+
2631  | r   | remove all reverse video codes                              |
2632  +-----+-------------------------------------------------------------+
2633  | u   | remove all underline codes                                  |
2634  +-----+-------------------------------------------------------------+
2635  | a   | remove all ANSI codes                                       |
2636  +-----+-------------------------------------------------------------+
2637  | g   | remove all ctrl-g (bell) codes                              |
2638  +-----+-------------------------------------------------------------+
2639  | o   | remove all ordinary codes (ctrl+o, terminates bold/color/..)|
2640  +-----+-------------------------------------------------------------+
2641  | i   | remove all italics codes                                    |
2642  +-----+-------------------------------------------------------------+
2643  | \*  | remove all of the above                                     |
2644  +-----+-------------------------------------------------------------+
2645
2646  Returns: the stripped string.
2647
2648  Module: core
2649
2650^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2651matchaddr <hostmask> <address>
2652^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2653
2654  Description: checks if the address matches the hostmask given. The address should be in the form nick!user\@host.
2655
2656  Returns: 1 if the address matches the hostmask, 0 otherwise.
2657
2658  Module: core
2659
2660^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2661matchcidr <block> <address> <prefix>
2662^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2663
2664  Description: performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time.
2665
2666  Example: matchcidr 192.168.0.0 192.168.1.17 16
2667
2668  Returns: 1 if the address matches the block prefix, 0 otherwise.
2669
2670  Module: core
2671
2672^^^^^^^^^^^^^^^^^^^^^^^^^^^
2673matchstr <pattern> <string>
2674^^^^^^^^^^^^^^^^^^^^^^^^^^^
2675
2676  Description: checks if pattern matches string. Only two wildcards are supported: '*' and '?'. Matching is case-insensitive. This command is intended as a simplified alternative to Tcl's string match.
2677
2678  Returns: 1 if the pattern matches the string, 0 if it doesn't.
2679
2680  Module: core
2681
2682^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2683rfcequal <string1> <string2>
2684^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2685
2686  Description: Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []\^, depending on the rfc_compliant setting.
2687
2688  Returns: 1 if equal, 0 if not.
2689
2690  Module: core
2691
2692^^^^^^^^^^^^^
2693status [type]
2694^^^^^^^^^^^^^
2695
2696  Description: provides eggdrop status information similar to the .status command in partyline. The available types of information are:
2697
2698  +------+---------------------------------------------------------------------+
2699  | cpu  | total cpu time spent by eggdrop                                     |
2700  +------+---------------------------------------------------------------------+
2701  | mem  | dynamically allocated memory excluding the Tcl interpreter          |
2702  +------+---------------------------------------------------------------------+
2703  | cache| user entries cache hits (in %)                                      |
2704  +------+---------------------------------------------------------------------+
2705  | ipv6 | shows whether IPv6 support was compiled in                          |
2706  +------+---------------------------------------------------------------------+
2707
2708  Returns: the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs.
2709
2710  Module: core
2711
2712^^^^^^^^^^^
2713istls <idx>
2714^^^^^^^^^^^
2715
2716  Description: checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only.
2717
2718  Returns: 1 if the idx is a TLS connection, 0 if it's plaintext.
2719
2720  Module: core
2721
2722^^^^^^^^^^^^^^
2723starttls <idx>
2724^^^^^^^^^^^^^^
2725
2726  Description: establishes a secure (using TLS) connection over idx. The TLS connection should be first negotiated over the plaintext link, or using other means. Both parties must switch to TLS simultaneously. This command is available on TLS-enabled bots only.
2727
2728  Returns: nothing
2729
2730  Module: core
2731
2732^^^^^^^^^^^^^^^
2733tlsstatus <idx>
2734^^^^^^^^^^^^^^^
2735
2736  Description: provides information about an established TLS connection This includes certificate and cipher information as well as protocol version. This command is available on TLS-enabled bots only.
2737
2738  Returns: a flat list of name-value pairs
2739
2740  Module: core
2741
2742Global Variables
2743----------------
2744
2745NOTE: All config file variables are also global.
2746
2747^^^^^^^
2748botnick
2749^^^^^^^
2750
2751  Value: the current nickname the bot is using (for example: "Valis", "Valis0", etc.)
2752
2753  Module: server
2754
2755^^^^^^^
2756botname
2757^^^^^^^
2758
2759  Value: the current nick!user\@host that the server sees (for example: "Valis!valis\@crappy.com")
2760
2761  Module: server
2762
2763^^^^^^
2764server
2765^^^^^^
2766
2767  Value: the current server's real name (what server calls itself) and port bot is connected to (for example: "irc.math.ufl.edu:6667") Note that this does not necessarily match the servers internet address.
2768
2769  Module: server
2770
2771^^^^^^^^^^^^^
2772serveraddress
2773^^^^^^^^^^^^^
2774  Value: the current server's internet address (hostname or IP) and port bot is connected to. This will correspond to the entry in server list (for example: "eu.undernet.org:6667"). Note that this does not necessarily match the name server calls itself.
2775
2776  Module: server
2777
2778^^^^^^^
2779version
2780^^^^^^^
2781  Value: current bot version "1.1.2+pl1 1010201"; first item is the text version, to include a patch string if present, and second item is a numerical version
2782
2783  Module: core
2784
2785^^^^^^^^^^^
2786numversion*
2787^^^^^^^^^^^
2788  Value: the current numeric bot version (for example: "1010201"). Numerical version is in the format of "MNNRRPP", where:
2789
2790  +------+---------------------------------------+
2791  | M    | major release number                  |
2792  +------+---------------------------------------+
2793  | NN   | minor release number                  |
2794  +------+---------------------------------------+
2795  | RR   | sub-release number                    |
2796  +------+---------------------------------------+
2797  | PP   | patch level for that sub-release      |
2798  +------+---------------------------------------+
2799
2800  Module: core
2801
2802^^^^^^
2803uptime
2804^^^^^^
2805  Value: the unixtime value for when the bot was started
2806
2807  Module: core
2808
2809^^^^^^^^^^^^^
2810server-online
2811^^^^^^^^^^^^^
2812  Value: the unixtime value for when the bot connected to its current server
2813
2814  Module: server
2815
2816^^^^^^^^
2817lastbind
2818^^^^^^^^
2819  Value: the last command binding which was triggered. This allows you to identify which command triggered a Tcl proc.
2820
2821  Module: core
2822
2823^^^^^^^
2824isjuped
2825^^^^^^^
2826  Value: 1 if bot's nick is juped(437); 0 otherwise
2827
2828  Module: server
2829
2830^^^^^^^
2831handlen
2832^^^^^^^
2833  Value: the value of the HANDLEN define in src/eggdrop.h
2834
2835  Module: core
2836
2837^^^^^^
2838config
2839^^^^^^
2840  Value: the filename of the config file Eggdrop is currently using
2841
2842  Module: core
2843
2844^^^^^^^^^^^^^
2845configureargs
2846^^^^^^^^^^^^^
2847  Value: a string (not list) of configure arguments in shell expansion (single quotes)
2848
2849  Module: core
2850
2851^^^^^^^^
2852language
2853^^^^^^^^
2854  Value: a string containing the language with the highest priority for use by Eggdrop. This commonly reflects what is added with addlang in the config file
2855
2856  Module: core
2857
2858Binds
2859-----
2860
2861You can use the 'bind' command to attach Tcl procedures to certain events.
2862For example, you can write a Tcl procedure that gets called every time a
2863user says "danger" on the channel.
2864
2865Some bind types are marked as "stackable". That means that you can bind
2866multiple commands to the same trigger. Normally, for example, a bind such
2867as 'bind msg - stop msg:stop' (which makes a msg-command "stop" call the
2868Tcl proc "msg:stop") will overwrite any previous binding you had for the
2869msg command "stop". With stackable bindings, like 'msgm' for example,
2870you can bind the same command to multiple procs. When the bind is triggered,
2871ALL of the Tcl procs that are bound to it will be called. Raw binds are
2872triggered before builtin binds, as a builtin bind has the potential to
2873modify args.
2874
2875To remove a bind, use the 'unbind' command. For example, to remove the
2876bind for the "stop" msg command, use 'unbind msg - stop msg:stop'.
2877
2878^^^^^^^^^^
2879Bind Types
2880^^^^^^^^^^
2881
2882The following is a list of bind types and how they work. Below each bind type is the format of the bind command, the list of arguments sent to the Tcl proc, and an explanation.
2883
2884(1)  MSG
2885
2886  bind msg <flags> <command> <proc>
2887
2888  procname <nick> <user\@host> <handle> <text>
2889
2890  Description: used for /msg commands. The first word of the user's msg is the command, and everything else becomes the text argument.
2891
2892  Module: server
2893
2894(2)  DCC
2895
2896  bind dcc <flags> <command> <proc>
2897
2898  procname <handle> <idx> <text>
2899
2900  Description: used for partyline commands; the command is the first word and everything else becomes the text argument. The idx is valid until the user disconnects. After that, it may be reused, so be careful about storing an idx for long periods of time.
2901
2902  Module: core
2903
2904(3)  FIL
2905
2906  bind fil <flags> <command> <proc>
2907
2908  procname <handle> <idx> <text>
2909
2910  Description: the same as DCC, except this is triggered if the user is in the file area instead of the party line
2911
2912  Module: filesys
2913
2914(4)  PUB
2915
2916  bind pub <flags> <command> <proc>
2917
2918  procname <nick> <user\@host> <handle> <channel> <text>
2919
2920  Description: used for commands given on a channel. The first word becomes the command and everything else is the text argument.
2921
2922  Module: irc
2923
2924(5)  MSGM (stackable)
2925
2926  bind msgm <flags> <mask> <proc>
2927
2928  procname <nick> <user\@host> <handle> <text>
2929
2930  Description: matches the entire line of text from a /msg with the mask. This is useful for binding Tcl procs to words or phrases spoken anywhere within a line of text. If the proc returns 1, Eggdrop will not log the message that triggered this bind. MSGM binds are processed before MSG binds. If the exclusive-binds setting is enabled, MSG binds will not be triggered by text that a MSGM bind has already handled.
2931
2932  Module: server
2933
2934(6)  PUBM (stackable)
2935
2936  bind pubm <flags> <mask> <proc>
2937
2938  procname <nick> <user\@host> <handle> <channel> <text>
2939
2940  Description: just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text and can contain wildcards. If the proc returns 1, Eggdrop will not log the message that triggered this bind. PUBM binds are processed before PUB binds. If the exclusive-binds setting is enabled, PUB binds will not be triggered by text that a PUBM bind has already handled.
2941
2942  Examples:
2943    bind pubm * "#eggdrop Hello*" myProc
2944      Listens on #eggdrop for any line that begins with "Hello"
2945    bind pubm * "% Hello*" myProc
2946      Listens on any channel for any line that begins with "Hello"
2947    bind pubm * "% !command" myProc
2948      Listens on any channel for a line that ONLY contains "!command"
2949
2950  Module: irc
2951
2952(7)  NOTC (stackable)
2953
2954  bind notc <flags> <mask> <proc>
2955
2956  procname <nick> <user\@host> <handle> <text> <dest>
2957
2958  Description: dest will be a nickname (the bot's nickname, obviously) or a channel name. mask is matched against the entire text of the notice and can contain wildcards. It is considered a breach of protocol to respond to a /notice on IRC, so this is intended for internal use (logging, etc.) only. Note that server notices do not trigger the NOTC bind. If the proc returns 1, Eggdrop will not log the message that triggered this bind.
2959
2960  New Tcl procs should be declared as::
2961
2962   proc notcproc {nick uhost hand text {dest ""}} {
2963     global botnick; if {$dest == ""} {set dest $botnick}
2964     ...
2965   }
2966
2967  for compatibility.
2968
2969  Module: server
2970
2971(8)  JOIN (stackable)
2972
2973  bind join <flags> <mask> <proc>
2974
2975  procname <nick> <user\@host> <handle> <channel>
2976
2977  Description: triggered by someone joining the channel. The mask in the bind is matched against "#channel nick!user\@host" and can contain wildcards.
2978
2979  Module: irc
2980
2981(9)  PART (stackable)
2982
2983  bind part <flags> <mask> <proc>
2984
2985  procname <nick> <user\@host> <handle> <channel> <msg>
2986
2987  Description: triggered by someone leaving the channel. The mask is matched against "#channel nick!user\@host" and can contain wildcards. If no part message is specified, msg will be set to "".
2988
2989  New Tcl procs should be declared as::
2990
2991    proc partproc {nick uhost hand chan {msg ""}} { ... }
2992
2993  for compatibility.
2994
2995  Module: irc
2996
2997(10) SIGN (stackable)
2998
2999  bind sign <flags> <mask> <proc>
3000
3001  procname <nick> <user\@host> <handle> <channel> <reason>
3002
3003  Description: triggered by a signoff, or possibly by someone who got netsplit and never returned. The signoff message is the last argument to the proc. Wildcards can be used in the mask, which is matched against '#channel nick!user\@host'. If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per signoff, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with SIGN as the keyword.
3004
3005  Module: irc
3006
3007(11) TOPC (stackable)
3008
3009  bind topc <flags> <mask> <proc>
3010
3011  procname <nick> <user\@host> <handle> <channel> <topic>
3012
3013  Description: triggered by a topic change. mask can contain wildcards and is matched against '#channel <new topic>'.
3014
3015  Module: irc
3016
3017(12) KICK (stackable)
3018
3019  bind kick <flags> <mask> <proc>
3020
3021  procname <nick> <user\@host> <handle> <channel> <target> <reason>
3022
3023  Description: triggered when someone is kicked off the channel. The mask is matched against '#channel target reason' where the target is the nickname of the person who got kicked (can contain wildcards). The proc is called with the nick, user\@host, and handle of the kicker, plus the channel, the nickname of the person who was kicked, and the reason.
3024
3025
3026  Module: irc
3027
3028(13) NICK (stackable)
3029
3030  bind nick <flags> <mask> <proc>
3031
3032  procname <nick> <user\@host> <handle> <channel> <newnick>
3033
3034  Description: triggered when someone changes nicknames. The mask is matched against '#channel newnick' and can contain wildcards. Channel is "*" if the user isn't on a channel (usually the bot not yet in a channel). If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with NICK as the keyword.
3035
3036  Module: irc
3037
3038(14) MODE (stackable)
3039
3040  bind mode <flags> <mask> <proc>
3041
3042  procname <nick> <user\@host> <handle> <channel> <mode-change> <target>
3043
3044  Description: mode changes are broken down into their component parts before being sent here, so the <mode-change> will always be a single mode, such as "+m" or "-o". target will show the argument of the mode change (for o/v/b/e/I) or "" if the set mode does not take an argument. The bot's automatic response to a mode change will happen AFTER all matching Tcl procs are called. The mask will be matched against '#channel +/-modes' and can contain wildcards.
3045
3046  If it is a server mode, nick will be "", user\@host is the server name, and handle is \*.
3047
3048  Note that "target" was added in 1.3.17 and that this will break Tcl scripts that were written for pre-1.3.17 Eggdrop that use the mode binding. Also, due to a typo, mode binds were broken completely in 1.3.17 but were fixed in 1.3.18. Mode bindings are not triggered at all in 1.3.17.
3049
3050  One easy example (from guppy) of how to support the "target" parameter in 1.3.18 and later and still remain compatible with older Eggdrop versions is:
3051
3052  Old script looks as follows::
3053
3054             bind mode - * mode_proc
3055             proc mode_proc {nick uhost hand chan mode} { ... }
3056
3057  To make it work with 1.3.18+ and stay compatible with older bots, do::
3058
3059             bind mode - * mode_proc_fix
3060             proc mode_proc_fix {nick uhost hand chan mode {target ""}} {
3061               if {$target != ""} {append mode " $target"}
3062               mode_proc $nick $uhost $hand $chan $mode
3063             }
3064             proc mode_proc {nick uhost hand chan mode} { ... }
3065
3066  Module: irc
3067
3068(15) CTCP (stackable)
3069
3070  bind ctcp <flags> <keyword> <proc>
3071
3072  procname <nick> <user\@host> <handle> <dest> <keyword> <text>
3073
3074  Description: dest will be a nickname (the bot's nickname, obviously) or channel name. keyword is the ctcp command (which can contain wildcards), and text may be empty. If the proc returns 0, the bot will attempt its own processing of the ctcp command.
3075
3076  Module: server
3077
3078(16) CTCR (stackable)
3079
3080  bind ctcr <flags> <keyword> <proc>
3081
3082  procname <nick> <user\@host> <handle> <dest> <keyword> <text>
3083
3084  Description: just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg)
3085
3086  Module: server
3087
3088(17) RAW (stackable)
3089
3090  bind raw <flags> <keyword> <proc>
3091
3092  procname <from> <keyword> <text>
3093
3094  IMPORTANT: While not necessarily deprecated, this bind has been supplanted by the RAWT bind as of 1.9.1. You probably want to be using RAWT, not RAW.
3095
3096  Description: previous versions of Eggdrop required a special compile option to enable this binding, but it's now standard. The keyword is either a numeric, like "368", or a keyword, such as "PRIVMSG". "from" will be the server name or the source user (depending on the keyword); flags are ignored. The order of the arguments is identical to the order that the IRC server sends to the bot. The pre-processing only splits it apart enough to determine the keyword. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases). The RAW bind does not support the IRCv3 message-tags capability, please see RAWT for more information.
3097
3098  Module: server
3099
3100(18) BOT
3101
3102  bind bot <flags> <command> <proc>
3103
3104  procname <from-bot> <command> <text>
3105
3106  Description: triggered by a message coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored.
3107
3108  Module: core
3109
3110(19) CHON (stackable)
3111
3112  bind chon <flags> <mask> <proc>
3113
3114  procname <handle> <idx>
3115
3116  Description: when someone first enters the party-line area of the bot via dcc chat or telnet, this is triggered before they are connected to a chat channel (so, yes, you can change the channel in a 'chon' proc). mask is matched against the handle and supports wildcards. This is NOT triggered when someone returns from the file area, etc.
3117
3118  Module: core
3119
3120(20) CHOF (stackable)
3121
3122  bind chof <flags> <mask> <proc>
3123
3124  procname <handle> <idx>
3125
3126  Description: triggered when someone leaves the party line to disconnect from the bot. mask is matched against the handle and can contain wildcards. Note that the connection may have already been dropped by the user, so don't send output to the idx.
3127
3128  Module: core
3129
3130(21) SENT (stackable)
3131
3132  bind sent <flags> <mask> <proc>
3133
3134  procname <handle> <nick> <path/to/file>
3135
3136  Description: after a user has successfully downloaded a file from the bot, this binding is triggered. mask is matched against the handle of the user that initiated the transfer and supports wildcards. nick is the actual recipient (on IRC) of the file. The path is relative to the dcc directory (unless the file transfer was started by a script call to 'dccsend', in which case the path is the exact path given in the call to 'dccsend').
3137
3138  Module: transfer
3139
3140(22) RCVD (stackable)
3141
3142  bind rcvd <flags> <mask> <proc>
3143
3144  procname <handle> <nick> <path/to/file>
3145
3146  Description: triggered after a user uploads a file successfully. mask is matched against the user's handle. nick is the IRC nickname that the file transfer originated from. The path is where the file ended up, relative to the dcc directory (usually this is your incoming dir).
3147
3148  Module: transfer
3149
3150(23) CHAT (stackable)
3151
3152  bind chat <flags> <mask> <proc>
3153
3154  procname <handle> <channel#> <text>
3155
3156  Description: when a user says something on the botnet, it invokes this binding. Flags are ignored; handle could be a user on this bot ("DronePup") or on another bot ("Eden\@Wilde") and therefore you can't rely on a local user record. The mask is checked against the entire line of text and supports wildcards.
3157
3158  NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead.
3159
3160  Module: core
3161
3162(24) LINK (stackable)
3163
3164  bind link <flags> <mask> <proc>
3165
3166  procname <botname> <via>
3167
3168  Description: triggered when a bot links into the botnet. botname is the botnetnick of the bot that just linked in; via is the bot it linked through. The mask is checked against the botnetnick of the bot that linked and supports wildcards. flags are ignored.
3169
3170  Module: core
3171
3172(25) DISC (stackable)
3173
3174  bind disc <flags> <mask> <proc>
3175
3176  procname <botname>
3177
3178  Description: triggered when a bot disconnects from the botnet for whatever reason. Just like the link bind, flags are ignored; mask is matched against the botnetnick of the bot that unlinked. Wildcards are supported in mask.
3179
3180  Module: core
3181
3182(26) SPLT (stackable)
3183
3184  bind splt <flags> <mask> <proc>
3185
3186  procname <nick> <user\@host> <handle> <channel>
3187
3188  Description: triggered when someone gets netsplit on the channel. Be aware that this may be a false alarm (it's easy to fake a netsplit signoff message on some networks); mask may contain wildcards and is matched against '#channel nick!user\@host'. Anyone who is SPLT will trigger a REJN or SIGN within the next wait-split (defined in the config file) seconds.
3189
3190  Module: irc
3191
3192(27) REJN (stackable)
3193
3194  bind rejn <flags> <mask> <proc>
3195
3196  procname <nick> <user\@host> <handle> <channel>
3197
3198  Description: someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user\@host'.
3199
3200  Module: irc
3201
3202(28) FILT (stackable)
3203
3204  bind filt <flags> <mask> <proc>
3205
3206  procname <idx> <text>
3207
3208  Description: party line and file system users have their text sent through filt before being processed. If the proc returns a blank string, the text is considered parsed. Otherwise, the bot will use the text returned from the proc and continue parsing that
3209
3210  Module: core
3211
3212(29) NEED (stackable)
3213
3214  bind need <flags> <mask> <proc>
3215
3216  procname <channel> <type>
3217
3218  Description: this bind is triggered on certain events, like when the bot needs operator status or the key for a channel. The types are: op, unban, invite, limit, and key; the mask is matched against '#channel type' and can contain wildcards. flags are ignored.
3219
3220  Example::
3221
3222    bind need - "% op" needop < handles only need op
3223    bind need - "*" needall   < handles all needs
3224
3225  Module: irc
3226
3227(30) FLUD (stackable)
3228
3229  bind flud <flags> <type> <proc>
3230
3231  procname <nick> <user\@host> <handle> <type> <channel>
3232
3233  Description: any floods detected through the flood control settings (like 'flood-ctcp') are sent here before processing. If the proc returns 1, no further action is taken on the flood; if the proc returns 0, the bot will do its normal "punishment" for the flood. The flood types are: pub, msg, join, or ctcp (and can be masked to "*" for the bind); flags are ignored.
3234
3235  Module: server
3236
3237(31) NOTE (stackable)
3238
3239  bind note <flags> <mask> <proc>
3240
3241  procname <from> <to> <text>
3242
3243  Description: incoming notes (either from the party line, someone on IRC, or someone on another bot on the botnet) are checked against these binds before being processed. The mask is matched against the receiving handle and supports wildcards. If the proc returns 1, Eggdrop will not process the note any further. Flags are ignored.
3244
3245  Module: core
3246
3247(32) ACT (stackable)
3248
3249  bind act <flags> <mask> <proc>
3250
3251  procname <handle> <channel#> <action>
3252
3253  Description: when someone does an action on the botnet, it invokes this binding. flags are ignored; the mask is matched against the text of the action and can support wildcards.
3254
3255  Module: core
3256
3257(33) WALL (stackable)
3258
3259  bind wall <flags> <mask> <proc>
3260
3261  procname <from> <msg>
3262
3263  Description: when the bot receives a wallops, it invokes this binding. flags are ignored; the mask is matched against the text of the wallops msg. Note that RFC shows the server name as a source of the message, whereas many IRCds send the nick!user\@host of the actual sender, thus, Eggdrop will not parse it at all, but simply pass it to bind in its original form. If the proc returns 1,           Eggdrop will not log the message that triggered this bind.
3264
3265  Module: server
3266
3267(34) BCST (stackable)
3268
3269  bind bcst <flags> <mask> <proc>
3270
3271  procname <botname> <channel#> <text>
3272
3273  Description: when a bot broadcasts something on the botnet (see 'dccbroadcast' above), it invokes this binding. flags are ignored; the mask is matched against the message text and can contain wildcards. 'channel' argument will always be '-1' since broadcasts are not directed to any partyline channel.
3274
3275  It is also invoked when a BOT (not a person, as with the CHAT bind) 'says' something on a channel. In this case, the 'channel' argument will be a valid channel, and not '-1'.
3276
3277  Module: core
3278
3279(35) CHJN (stackable)
3280
3281  bind chjn <flags> <mask> <proc>
3282
3283  procname <botname> <handle> <channel#> <flag> <idx> <user\@host>
3284
3285  Description: when someone joins a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. flag is one of: * (owner), + (master), @ (op), or % (botnet master). Flags are ignored.
3286
3287  Module: core
3288
3289(36) CHPT (stackable)
3290
3291  bind chpt <flags> <mask> <proc>
3292
3293  procname <botname> <handle> <idx> <channel#>
3294
3295  Description: when someone parts a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. Flags are ignored.
3296
3297  Module: core
3298
3299(37) TIME (stackable)
3300
3301  bind time <flags> <mask> <proc>
3302
3303  procname <minute 00-59> <hour 00-23> <day 01-31> <month 00-11> <year 0000-9999>
3304
3305  Description: allows you to schedule procedure calls at certain times. mask matches 5 space separated integers of the form: "minute hour day month year". The month var starts at 00 (Jan) and ends at 11 (Dec). Minute, hour, day, month have a zero padding so they are exactly two characters long; year is four characters. Flags are ignored.
3306
3307  Module: core
3308
3309(38) AWAY (stackable)
3310
3311  bind away <flags> <mask> <proc>
3312
3313  procname <botname> <idx> <text>
3314
3315  Description: triggers when a user goes away or comes back on the botnet. text is the reason that has been specified (text is "" when returning). mask is matched against the botnet-nick of the bot the user is connected to and supports wildcards. flags are ignored.
3316
3317  Module: core
3318
3319(39) LOAD (stackable)
3320
3321  bind load <flags> <mask> <proc>
3322
3323  procname <module>
3324
3325  Description: triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored.
3326
3327  Module: core
3328
3329(40) UNLD (stackable)
3330
3331  bind unld <flags> <mask> <proc>
3332
3333  procname <module>
3334
3335  Description: triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards;
3336  flags are ignored.
3337
3338  Module: core
3339
3340(41) NKCH (stackable)
3341
3342  bind nkch <flags> <mask> <proc>
3343
3344  procname <oldhandle> <newhandle>
3345
3346  Description: triggered whenever a local user's handle is changed (in the userfile). mask is matched against the user's old handle and can contain wildcards; flags are ignored.
3347
3348  Module: core
3349
3350(42) EVNT (stackable)
3351
3352  bind evnt <flags> <type> <proc>
3353
3354  procname <type>
3355
3356  Description: triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are::
3357
3358          sighup            - called on a kill -HUP <pid>
3359          sigterm           - called on a kill -TERM <pid>
3360          sigill            - called on a kill -ILL <pid>
3361          sigquit           - called on a kill -QUIT <pid>
3362          save              - called when the userfile is saved
3363          rehash            - called just after a rehash
3364          prerehash         - called just before a rehash
3365          prerestart        - called just before a restart
3366          logfile           - called when the logs are switched daily
3367          loaded            - called when the bot is done loading
3368          userfile-loaded   - called after userfile has been loaded
3369          connect-server    - called just before we connect to an IRC server
3370          preinit-server    - called immediately when we connect to the server
3371          init-server       - called when we actually get on our IRC server
3372          disconnect-server - called when we disconnect from our IRC server
3373          fail-server       - called when an IRC server fails to respond
3374
3375  Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop.
3376
3377  Module: core
3378
3379(43) LOST (stackable)
3380
3381  bind lost <flags> <mask> <proc>
3382
3383  procname <handle> <nick> <path> <bytes-transferred> <length-of-file>
3384
3385  Description: triggered when a DCC SEND transfer gets lost, such as when the connection is terminated before all data was successfully sent/received. This is typically caused by a user abort.
3386
3387  Module: transfer
3388
3389(44) TOUT (stackable)
3390
3391  bind tout <flags> <mask> <proc>
3392
3393  procname <handle> <nick> <path> <bytes-transferred> <length-of-file>
3394
3395  Description: triggered when a DCC SEND transfer times out. This may either happen because the dcc connection was not accepted or because the data transfer stalled for some reason.
3396
3397  Module: transfer
3398
3399(45) OUT (stackable)
3400
3401  bind out <flags> <mask> <proc>
3402
3403  procname <queue> <message> <queued|sent>
3404
3405  Description: triggered whenever output is sent to the server. Normally the event will occur twice for each line sent: once before entering a server queue and once after the message is actually sent. This allows for more flexible logging of server output and introduces the ability to cancel the message. Mask is matched against "queue status", where status is either 'queued' or 'sent'. Queues are: mode, server, help, noqueue. noqueue is only used by the putnow tcl command.
3406
3407  Module: server
3408
3409(46) CRON (stackable)
3410
3411  bind cron <flags> <mask> <proc>
3412
3413  procname <minute 0-59> <hour 0-23> <day 1-31> <month 1-12> <weekday 0-6>
3414
3415  Description: similar to bind TIME, but the mask is evaluated as a cron expression, e.g. "16/2 \*/2 5-15 7,8,9 4". It can contain up to five fields: minute, hour, day, month, weekday; delimited by whitespace. Week days are represented as 0-6, where Sunday can be either 0 or 7. Symbolic names are not supported. The bind will be triggered if the mask matches all of the fields, except that if both day and weekday are not '\*', only one of them is required to match. If any number of fields are omitted at the end, the match will proceed as if they were '\*'. All cron operators are supported. Please refer to the crontab manual for their meanings. Flags are ignored.
3416
3417  Module: core
3418
3419(47) LOG (stackable)
3420
3421  bind log <flags> <mask> <proc>
3422
3423  procname <level> <channel> <message>
3424
3425  Description: triggered whenever a message is sent to a log. The mask is matched against "channel text". The level argument to the proc will contain the level(s) the message is sent to, or '\*' if the message is sent to all log levels at once. If the message wasn't sent to a specific channel, channel will be set to '\*'.
3426
3427  Module: core
3428
3429(48) TLS (stackable)
3430
3431  bind tls <flags> <mask> <proc>
3432
3433  procname <idx>
3434
3435  Description: triggered for tcp connections when a ssl handshake has completed and the connection is secured. The mask is matched against the idx of the connection.
3436
3437  Module: core
3438
3439(49) DIE (stackable)
3440
3441  bind die <flags> <mask> <proc>
3442
3443  procname <shutdownreason>
3444
3445  Description: triggered when eggdrop is about to die. The mask is matched against the shutdown reason. The bind won't be triggered if the bot crashes or is being terminated by SIGKILL.
3446
3447  Module: core
3448
3449(50) IRCAWAY (stackable)
3450
3451  bind ircaway <flags> <mask> <proc>
3452
3453  procname <nick> <user> <hand> <channel> <msg>
3454
3455  Description: triggered when Eggdrop receives an AWAY message for a user from an IRC server, ONLY if the away-notify capability is enabled via CAP (the server must supports this capability, see the 'cap' Tcl command for more info on requesting capabilities). "Normal" away messages (301 messages) will not trigger this bind, for those you should instead use a RAWT bind. The mask for the bind is in the format "#channel nick!user@hostname" (* to catch all nicknames). nick is the nickname of the user that triggered the bind, user is the nick!user@host of the user, handle is the handle of the user on the bot (- if the user is not added to the bot), channel is the channel the user was found on (read on for more info on this) and msg is the contents of the away message, if any. If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword.
3456
3457  Module: irc
3458
3459(51) INVT (stackable)
3460
3461  bind invt <flags> <mask> <proc>
3462
3463  procname <nick> <user@host> <channel> <invitee>
3464
3465  Description: triggered when eggdrop received an INVITE message. The mask for the bind is in the format "#channel nickname", where nickname (not a hostmask) is that of the invitee. For the proc, nick is the nickname of the person sending the invite request, user@host is the user@host of the person sending the invite, channel is the channel the invitee is being invited to, and invitee is the target (nickname only) of the invite. The invitee argument was added to support the IRCv3 invite-notify capability, where the eggdrop may be able to see invite messages for other people that are not the eggdrop.
3466
3467(52) RAWT (stackable)
3468
3469  bind rawt <flags> <keyword> <proc>
3470
3471  procname <from> <keyword> <text> <tag>
3472
3473  Description: similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The keyword is either a numeric, like "368", or a keyword, such as "PRIVMSG" or "TAGMSG". "from" will be the server name or the source user (depending on the keyword); flags are ignored. "tag" will be the contents, if any, of the entire tag message prefixed to the server message in a dict format, such as "msgid 890157217279768 aaa bbb". The order of the arguments is identical to the order that the IRC server sends to the bot. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases). As of 1.9.1, it is recommended to use the RAWT bind instead of the RAW bind.
3474
3475(53) ACCOUNT (stackable)
3476
3477  bind account <flags> <mask> <proc>
3478
3479  procname <nick> <user> <hand> <account>
3480
3481  Description: triggered when Eggdrop receives an ACCOUNT message. The mask for the bind is in the format "#channel nick!user@hostname.com account" where channel is the channel the user was found on when the bind was triggered, the hostmask is the user's hostmask, and account is the account name the user is logging in to, or "" for logging out. The mask argument can accept wildcards. For the proc, nick is the nickname of the user logging into/out of an account, user is the user@host.com hostmask, hand is the handle of the user (or * if none), and account is the name of the account the user logged in to (or "" if the user logged out of an account).
3482
3483(54) ISUPPORT (stackable)
3484
3485  bind isupport <flags> <mask> <proc>
3486
3487  procname <key> <isset> <value>
3488
3489  Description: triggered when the value of an isupport key changes. The mask is matched against the isupport key. If the value is not set, isset is 0 and the value is the empty string. Because the empty string is valid value, use isset to distinguish empty string values from a key being unset. The bind is called before the change is processed, so [isupport isset]/[isupport get] return the old value. A return value other than 0 makes Eggdrop ignore the change and revert to the old value. After a disconnect from the server, all isupport values are reset to default, but $::server will be empty, so that case can be caught and ignored.
3490
3491  Module: server
3492
3493
3494^^^^^^^^^^^^^
3495Return Values
3496^^^^^^^^^^^^^
3497
3498Several bindings pay attention to the value you return from the proc(using 'return <value>'). Usually, they expect a 0 or 1, and returning an empty return is interpreted as a 0. Be aware if you omit the return statement, the result of the last Tcl command executed will be returned by the proc. This will not likely produce the results you intended (this is a "feature" of Tcl).
3499
3500Here's a list of the bindings that use the return value from procs they trigger:
3501
3502(1) MSG   Return 1 to make Eggdrop log the command as::
3503
3504    (nick!user@host) !handle! command
3505
3506(2) DCC   Return 1 to make Eggdrop log the command as::
3507
3508    #handle# command
3509
3510(3) FIL   Return 1 to make Eggdrop log the command as::
3511
3512    #handle# files: command
3513
3514(4) PUB   Return 1 to make Eggdrop log the command as::
3515
3516    <<nick>> !handle! command
3517
3518(5) CTCP  Return 1 to ask the bot not to process the CTCP command on its own. Otherwise, it would send its own response to the CTCP (possibly an error message if it doesn't know how to deal with it).
3519
3520(6) FILT  Return "" to indicate the text has been processed, and the bot should just ignore it. Otherwise, it will treat the text like any other.
3521
3522(7) FLUD  Return 1 to ask the bot not to take action on the flood. Otherwise it will do its normal punishment.
3523
3524(8) RAW   Return 1 to ask the bot not to process the server text. This can affect the bot's performance by causing it to miss things that it would normally act on -- you have been warned.
3525
3526(9) CHON  Return 1 to ask the bot not to process the partyline join event.
3527
3528(10) CHOF  Return 1 to ask the bot not to process the partyline part event.
3529
3530(11) WALL  Return 1 to make Eggdrop not log the message that triggered this bind.
3531
3532(12) NOTE  Return 1 to make Eggdrop not process the note any further. This includes stacked note bindings that would be processed after this one, as well as the built-in eggdrop note handling routines.
3533
3534(13) MSGM  Return 1 to make Eggdrop not log the message that triggered this bind.
3535
3536(14) PUBM  Return 1 to make Eggdrop not log the message that triggered this bind.
3537
3538(15) NOTC  Return 1 to make Eggdrop not log the message that triggered this bind.
3539
3540(16) OUT   Return 1 to make Eggdrop drop the message instead of sending it. Only meaningful for messages with status "queued".
3541
3542(17) EVNT  Return 1 to make Eggdrop not to take the default action for the event. Used for signal type events, ignored for others.
3543
3544(18) TLS   Return 1 to disable verbose ssl information for the handshake.
3545
3546(19) RAWT  Return 1 to ask the bot not to process the server text. This can affet the bot's performance by causing it to miss things that it would normally act on -- you have been warned. Again.
3547
3548Control Procedures
3549------------------
3550
3551Using the 'control' command, you can put a DCC connection (or outgoing
3552TCP connection) in control of a script. All text received from the
3553connection is sent to the proc you specify. All outgoing text should
3554be sent with 'putdcc'.
3555
3556The control procedure is called with these parameters::
3557
3558  procname <idx> <input-text>
3559
3560This allows you to use the same proc for several connections. The
3561idx will stay the same until the connection is dropped. After that,
3562it will probably get reused for a later connection.
3563
3564To indicate that the connection has closed, your control procedure
3565will be called with blank text (the input-text will be ""). This
3566is the only time it will ever be called with "" as the text, and it
3567is the last time your proc will be called for that connection. Don't
3568call killdcc on the idx when text is blank, it will always fail with
3569"invalid idx".
3570
3571If you want to hand control of your connection back to Eggdrop, your
3572proc should return 1. Otherwise, return 0 to retain control.
3573
3574TCP Connections
3575---------------
3576
3577Eggdrop allows you to make two types of TCP ("telnet") connections:
3578outgoing and incoming. For an outgoing connection, you specify the
3579remote host and port to connect to. For an incoming connection, you
3580specify a port to listen on.
3581
3582All of the connections are *event driven*. This means that the bot will
3583trigger your procs when something happens on the connection, and your
3584proc is expected to return as soon as possible. Waiting in a proc for
3585more input is a no-no.
3586
3587To initiate an outgoing connection, use::
3588
3589  set idx [connect <hostname> <[+]port>]
3590
3591For SSL connections, prefix the port with a plus sign.
3592
3593$idx now contains a new DCC entry for the outgoing connection.
3594
3595All connections use non-blocking (commonly called "asynchronous",
3596which is a misnomer) I/O. Without going into a big song and dance
3597about asynchronous I/O, what this means to you is:
3598
3599  * assume the connection succeeded immediately
3600  * if the connection failed, an EOF will arrive for that idx
3601
3602The only time a 'connect' will return an error is if you give it a
3603hostname that can't be resolved (this is considered a "DNS error").
3604Otherwise, it will appear to have succeeded. If the connection failed,
3605you will immediately get an EOF.
3606
3607Right after doing a 'connect' call, you should set up a 'control' for
3608the new idx (see the section above). From then on, the connection will
3609act just like a normal DCC connection that has been put under the control
3610of a script. If you ever return "1" from the control proc (indicating
3611that you want control to return to Eggdrop), the bot will just close the
3612connection and dispose of it. Other commands that work on normal DCC
3613connections, like 'killdcc' and 'putdcc', will work on this idx, too.
3614The 'killdcc' command will fail with "invalid idx" if you attempt to use
3615it on a closed socket.
3616
3617To create a listen port, use::
3618
3619  listen <[+]port> script <proc>
3620
3621By default, a listen port will allow both plaintext and SSL connections.
3622To restrict a port to allow only SSL connections, prefix the port with a
3623plus sign.
3624
3625Procs should be declared as::
3626
3627  <procname> <newidx>
3628
3629For example::
3630
3631  listen 6687 script listen:grab
3632
3633  proc listen:grab {newidx} {
3634    control $newidx listen:control
3635  }
3636
3637When a new connection arrives in port 6687, Eggdrop will create a new idx for the connection. That idx is sent to 'listen:grab'. The proc immediately puts this idx under control. Once 'listen:grab' has been called, the idx behaves exactly like an outgoing connection would.
3638
3639Secure connection can be also established after a connection is active. You can connect/listen normally and switch later using the 'starttls' command. Your script should first inform the other side of the connection that it wants to switch to SSL. How to do this is application specific.
3640
3641The best way to learn how to use these commands is to find a script that uses them and follow it carefully. However, hopefully this has given you a good start.
3642
3643Match Characters
3644----------------
3645
3646Many of the bindings allow match characters in the arguments. Here
3647are the four special characters:
3648
3649+-----+--------------------------------------------------------------------------+
3650| ?   | matches any single character                                             |
3651+-----+--------------------------------------------------------------------------+
3652| \*  | matches 0 or more characters of any type                                 |
3653+-----+--------------------------------------------------------------------------+
3654| %   | matches 0 or more non-space characters (can be used to match a single    |
3655|     | word) (This character only works in binds, not in regular matching)      |
3656+-----+--------------------------------------------------------------------------+
3657| ~   | matches 1 or more space characters (can be used for whitespace between   |
3658|     | words) (This char only works in binds, not in regular matching)          |
3659+-----+--------------------------------------------------------------------------+
3660
3661  Copyright (C) 1999 - 2021 Eggheads Development Team
3662