From b79352e6f1b2596f8c088f3c282e0a43c6056b87 Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 13:16:30 -0400 Subject: [PATCH 1/9] Add examples to tcl-commands.doc --- doc/sphinx_source/using/tcl-commands.rst | 3873 +++++++++++++++++++--- 1 file changed, 3425 insertions(+), 448 deletions(-) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 5ae8be558..9a8d5a528 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -1,7 +1,7 @@ .. highlight:: text Eggdrop Tcl Commands -Last revised: January 6, 2024 +Last revised: September 13, 2026 ==================== Eggdrop Tcl Commands @@ -13,9 +13,8 @@ of the normal Tcl built-in commands are still there, of course, but you can also use these to manipulate features of the bot. They are listed according to category. -This list is accurate for Eggdrop v1.10.2. Most scripts written for the v1.3, v1.4, -1.6, 1.8, and 1.9 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. -Scripts which were written for v0.9, v1.0, v1.1 or v1.2 will probably not work without modification. +This list is accurate for Eggdrop v1.10.2. Most scripts written for the +1.6, 1.8, 1.9, and 1.10 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. Output Commands --------------- @@ -24,7 +23,7 @@ Output Commands putserv [options] ^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: -next push messages to the front of the queue @@ -32,13 +31,21 @@ putserv [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putserv "PRIVMSG #lamest :Hello from LamestBot!" + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^ puthelp [options] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sends text to the server, like 'putserv', but it uses a different queue intended for sending messages to channels or people. + Description: Sends text to the server, like 'putserv', but it uses a different queue intended for sending messages to channels or people. Options: -next push messages to the front of the queue @@ -46,13 +53,21 @@ puthelp [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + puthelp "PRIVMSG #lamest :Hello, Foobar!" + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^ putquick [options] ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sends text to the server, like 'putserv', but it uses a different (and faster) queue. + Description: Sends text to the server, like 'putserv', but it uses a different (and faster) queue. Options: -next push messages to the front of the queue @@ -60,151 +75,272 @@ putquick [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putquick "NOTICE Foobar :This message uses the quick queue." + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^ putnow [-oneline] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server. + Description: Sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server. Options: -oneline send text up to the first \r or \n, discarding the rest Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putnow "PING :irc.example.net" + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putkick [reason] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sends kicks to the server and tries to put as many nicks into one kick command as possible. + Description: Sends kicks to the server and tries to put as many nicks into one kick command as possible. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putkick "#lamest" Foobar "Example kick reason" + + Module: irc ^^^^^^^^^^^^^ putlog ^^^^^^^^^^^^^ - Description: logs to the logfile and partyline if the 'misc' flag (o) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description: Logs to the logfile and partyline if the 'misc' flag (o) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putlog "LamestBot loaded the example script." + + Module: core ^^^^^^^^^^^^^^^^ putcmdlog ^^^^^^^^^^^^^^^^ - Description: logs to the logfile and partyline if the 'cmds' flag (c) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description: Logs to the logfile and partyline if the 'cmds' flag (c) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putcmdlog "Foobar used an example command." + + Module: core ^^^^^^^^^^^^^^^^^ putxferlog ^^^^^^^^^^^^^^^^^ - Description: logs to the logfile and partyline if the 'files' flag (x) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description: Logs to the logfile and partyline if the 'files' flag (x) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putxferlog "Example file transfer completed." + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putloglev ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: logs to the logfile and partyline at the log level of the specified flag. Use "*" in lieu of a flag to indicate all log levels. + Description: Logs to the logfile and partyline at the log level of the specified flag. Use "*" in lieu of a flag to indicate all log levels. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putloglev o "#lamest" "Example log message." + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ dumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + dumpfile Foobar help.txt + + Module: core ^^^^^^^^^^^^^^^^^ queuesize [queue] ^^^^^^^^^^^^^^^^^ + Description: Returns the number of messages waiting in Eggdrop's output queues. + + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set queued [queuesize server] + + Module: server ^^^^^^^^^^^^^^^^^^ clearqueue ^^^^^^^^^^^^^^^^^^ - Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all. + Description: Removes all messages from a queue. Valid arguments are: mode, server, help, or all. Returns: the number of deleted lines from the specified queue. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set removed [clearqueue help] + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cap [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. "values" will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and "values" with a capability name as arg will list the values associated for the capability. "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. "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"]. + 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. "values" will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and "values" with a capability name as arg will list the values associated for the capability. "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. "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"]. Returns: a list of CAP capabilities for the "enabled" and "ls" sub-commands; a dict of capability/value pairs for the "values" command or a list if "values" if followed by an argument; otherwise nothing. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set capabilities [cap ls] + + Module: server ^^^^^^^^^^^^^^^^^^^^^^ tagmsg ^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Examples: - set mytags [dict create +foo bar moo baa +last ""]; tagmsg $mytags #channel - tagmsg "+foo bar moo baa +last {}" #channel Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set tags [dict create +example value] + tagmsg $tags "#lamest" + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server add [[+]port [password]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + server add irc.example.net +6697 + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server remove [[+]port] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + server remove irc.example.net +6697 + + Module: server ^^^^^^^^^^^ server list ^^^^^^^^^^^ - Description: lists all servers currently added to the bots internal server list + Description: Lists all servers currently added to the bots internal server list. Returns: A list of lists in the format {{hostname} {port} {password}} + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set servers [server list] + + Module: server User Record Manipulation Commands @@ -214,51 +350,103 @@ User Record Manipulation Commands countusers ^^^^^^^^^^ + Description: Returns the number of users in the bot's user database. + + Returns: number of users in the bot's database + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set usercount [countusers] + putlog "LamestBot has $usercount users." + + Module: core ^^^^^^^^^^^^^^^^^^ validuser ^^^^^^^^^^^^^^^^^^ + Description: Checks whether a user with the specified handle exists in the bot's user database. + + Returns: 1 if a user by that name exists; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + if {[validuser foobar]} { + putlog "The handle foobar exists." + } + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ finduser [-account] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. + Description: Finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. Returns: the handle found, or "*" if none + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set handle [finduser "Foobar!foobar@127.0.0.1"] + + Module: core ^^^^^^^^^^^^^^^^ userlist [flags] ^^^^^^^^^^^^^^^^ + Description: Returns users from the bot's user database, optionally filtered by a flag mask. + + Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/\|}[chan]{&/\|}[bot]). '&' specifies "and"; '|' specifies "or". + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set users [userlist] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ passwdok ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: checks the password given against the user's password. Check against the password "-" to find out if a user has no password set. + Description: Checks the password given against the user's password. Check against the password "-" to find out if a user has no password set. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set valid [passwdok foobar "example-password"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getuser [entry-type] [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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: + 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: +----------+-------------------------------------------------------------------------------------+ | ACCOUNT | returns the list of service accounts associated with the user | @@ -288,13 +476,21 @@ getuser [entry-type] [extra info] Returns: info specific to each entry-type + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set hosts [getuser foobar HOSTS] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setuser [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. +---------+---------------------------------------------------------------------------------------+ | Type | Extra Info | @@ -331,37 +527,69 @@ setuser [extra info] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setuser foobar INFO "Example user information" + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chhandle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: changes a user's handle + Description: Changes a user's handle. Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can't be found + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set changed [chhandle foobar foobar2] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: changes the attributes for a user record, if you include any. + Description: Changes the attributes for a user record, if you include any. Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are specified in the format of \| , the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set flags [chattr foobar +o "#lamest"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ botattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: similar to chattr except this modifies bot flags rather than normal user attributes. + Description: Similar to chattr except this modifies bot flags rather than normal user attributes. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set flags [botattr OtherBot] + + Module: core .. _matchattr: @@ -370,7 +598,7 @@ botattr [changes [channel]] matchattr [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: checks if the flags of the specified user match the flags provided. "flags" is of the form:: + Description: Checks if the flags of the specified user match the flags provided. "flags" is of the form:: [+/-][&/|[&/|]] @@ -378,22 +606,40 @@ matchattr [channel] Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + if {[matchattr foobar o "#lamest"]} { + putlog "foobar has the requested flags." + } + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ adduser [hostmask] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: creates a new user entry with the handle and hostmask given (with no password and the default flags) + Description: Creates a new user entry with the handle and hostmask given (with no password and the default flags). Returns: 1 if successful; 0 if the handle already exists + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set added [adduser foobar "Foobar!foobar@127.0.0.1"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addbot
[botport [userport]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: adds a new bot to the userlist with the handle and botaddress given (with no password and no flags).
format is one of: + Description: Adds a new bot to the userlist with the handle and botaddress given (with no password and no flags).
format is one of: - ipaddress - ipv4address:botport/userport [DEPRECATED] @@ -404,79 +650,149 @@ NOTE 2: In the deprecated formats, an additional botport and/or userport given a Returns: 1 if successful; 0 if the bot already exists or a port is invalid + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set added [addbot OtherBot 127.0.0.1] + + Module: core ^^^^^^^^^^^^^^^^ deluser ^^^^^^^^^^^^^^^^ - Description: attempts to erase the user record for a handle + Description: Attempts to erase the user record for a handle. Returns: 1 if successful, 0 if no such user exists + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set deleted [deluser foobar] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ delhost ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: deletes a hostmask from a user's host list + Description: Deletes a hostmask from a user's host list. Returns: 1 on success; 0 if the hostmask (or user) doesn't exist + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [delhost foobar "Foobar!foobar@127.0.0.1"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: adds a channel record for a user + Description: Adds a channel record for a user. Returns: 1 on success; 0 if the user or channel does not exist + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set added [addchanrec foobar "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ delchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: removes a channel record for a user. This includes all associated channel flags. + Description: Removes a channel record for a user. This includes all associated channel flags. Returns: 1 on success; 0 if the user or channel does not exist + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set deleted [delchanrec foobar "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ haschanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Checks whether a user has a channel record for the specified channel. + + Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set has_record [haschanrec foobar "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a user's info line for the specified channel. + + Returns: info line for a specific channel (behaves just like 'getinfo') + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set info [getchaninfo foobar "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sets the info line on a specific channel for a user. If info is "none", it will be removed. + Description: Sets the info line on a specific channel for a user. If info is "none", it will be removed. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setchaninfo foobar "#lamest" "Example channel information" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -487,13 +803,21 @@ newchanban [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newchanban "#lamest" "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -503,13 +827,21 @@ newban [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newban "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -519,13 +851,21 @@ newchanexempt [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newchanexempt "#lamest" "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -535,13 +875,21 @@ newexempt [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newexempt "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchaninvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -551,13 +899,21 @@ newchaninvite [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newchaninvite "#lamest" "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newinvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Options: @@ -567,326 +923,659 @@ newinvite [lifetime] [options] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newinvite "*!*@127.0.0.1" foobar "Example text" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. + Description: Makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [stickban "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description: Makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [unstickban "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. + Description: Makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [stickexempt "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description: Makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [unstickexempt "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. + Description: Makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [stickinvite "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description: Makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [unstickinvite "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanban ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: removes a ban from the ban list for a channel + Description: Removes a ban from the ban list for a channel. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killchanban "#lamest" "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^ killban ^^^^^^^^^^^^^ - Description: removes a ban from the global ban list + Description: Removes a ban from the global ban list. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killban "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: removes an exempt from the exempt list for a channel + Description: Removes an exempt from the exempt list for a channel. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killchanexempt "#lamest" "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^ killexempt ^^^^^^^^^^^^^^^^^^^ - Description: removes an exempt from the global exempt list + Description: Removes an exempt from the global exempt list. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killexempt "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: removes an invite from the invite list for a channel + Description: Removes an invite from the invite list for a channel. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killchaninvite "#lamest" "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^ killinvite ^^^^^^^^^^^^^^^^^^^ - Description: removes an invite from the global invite list + Description: Removes an invite from the global invite list. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [killinvite "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^ ischanjuped ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the channel is juped, and the bot is unable to join; 0 otherwise. + Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set juped [ischanjuped "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isban "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [ispermban "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isexempt "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. - Module: channels + .. admonition:: Example + :collapsible: closed + .. code-block:: tcl + + set result [ispermexempt "*!*@127.0.0.1"] + + + Module: channels + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +isinvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -isinvite [channel [-channel]] -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Description: 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. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isinvite "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isperminvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isperminvite "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isbansticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isbansticky "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexemptsticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isexemptsticky "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isinvitesticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [isinvitesticky "*!*@127.0.0.1"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set banned [matchban "Foobar!foobar@127.0.0.1" "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set exempt [matchexempt "Foobar!foobar@127.0.0.1" "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that. + Returns: 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set invited [matchinvite "Foobar!foobar@127.0.0.1" "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^ banlist [channel] ^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set bans [banlist "#lamest"] + Module: channels ^^^^^^^^^^^^^^^^^^^^ exemptlist [channel] ^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set exempts [exemptlist "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^ invitelist [channel] ^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set invites [invitelist "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newignore [lifetime] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + newignore "*!*@127.0.0.1" foobar "Example ignore" 60 + + Module: core ^^^^^^^^^^^^^^^^^^^^^ killignore ^^^^^^^^^^^^^^^^^^^^^ - Description: removes an entry from the ignore list + Description: Removes an entry from the ignore list. Returns: 1 if successful; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set removed [killignore "*!*@127.0.0.1"] + + Module: core ^^^^^^^^^^ ignorelist ^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set ignores [ignorelist] + + Module: core ^^^^^^^^^^^^^^^^^^^ isignore ^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the ignore is in the list; 0 otherwise. + Returns: 1 if the ignore is in the list; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set ignored [isignore "*!*@127.0.0.1"] + + Module: core ^^^^ save ^^^^ - Description: writes the user and channel files to disk + Description: Writes the user and channel files to disk. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + save + + Module: core ^^^^^^ reload ^^^^^^ - Description: loads the userfile from disk, replacing whatever is in memory + Description: Loads the userfile from disk, replacing whatever is in memory. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + reload + + Module: core ^^^^^^ backup ^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + backup + + Module: core ^^^^^^^^^^^^^ getting-users ^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [getting-users] + + Module: core Channel Commands @@ -896,89 +1585,183 @@ Channel Commands channel add [option-list] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 {}). + 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 {}). Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + channel add "#lamest" + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel set ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sets options for the channel specified. `options` is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in doc/settings/mod.channels. Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example ``channel set #lamest need-op { putmsg ChanServ "op #lamest" }`` + Description: Sets options for the channel specified. `options` is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in doc/settings/mod.channels. Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example ``channel set #lamestst need-op { putmsg ChanServ "op #lamestst" }``. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + channel set "#lamest" +autoop + + Module: channels ^^^^^^^^^^^^^^^^^^^ channel info ^^^^^^^^^^^^^^^^^^^ + Description: Returns the settings currently stored for the specified channel. + + Returns: a list of info about the specified channel's settings. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set info [channel info "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel get [setting] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a channel setting, or all channel settings when no setting is specified. + + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set autoop [channel get "#lamest" autoop] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^ channel remove ^^^^^^^^^^^^^^^^^^^^^ - Description: removes a channel record from the bot and makes the bot no longer monitor the channel + Description: Removes a channel record from the bot and makes the bot no longer monitor the channel. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + channel remove "#lamest" + + Module: channels ^^^^^^^^^^^^ savechannels ^^^^^^^^^^^^ - Description: saves the channel settings to the channel-file if one is defined. + Description: Saves the channel settings to the channel-file if one is defined. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + savechannels + + Module: channels ^^^^^^^^^^^^ loadchannels ^^^^^^^^^^^^ - Description: reloads the channel settings from the channel-file if one is defined. + Description: Reloads the channel settings from the channel-file if one is defined. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + loadchannels + + Module: channels ^^^^^^^^ channels ^^^^^^^^ + Description: Returns the channels for which the bot has channel records. + + Returns: a list of the channels the bot has a channel record for + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set channel_list [channels] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channame2dname ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Description: Converts a real IRC channel name to the channel description name Eggdrop uses internally. This is primarily relevant to !channels; for other channels, the two names are the same. + + Returns: the channel description name corresponding to + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set dname [channame2dname "#lamest"] + + See also: chandname2name + + Module: irc + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chandname2name ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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". + Description: Converts an Eggdrop channel description name to the real IRC channel name used by the server. This is primarily relevant to !channels; for other channels, the two names are the same. + + Returns: the real IRC channel name corresponding to - 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. + .. admonition:: Example + :collapsible: closed - If you only have the chan dname and want to directly send raw server commands, use the chandname2name command. + .. code-block:: tcl - NOTE: For non-!channels, chan dname and chan name are the same. + set channel_name [chandname2name "#lamest"] + + See also: channame2dname Module: irc @@ -986,286 +1769,599 @@ chandname2name isbotnick ^^^^^^^^^^^^^^^^ + Description: Checks whether the specified nickname is the bot's current nickname. + + Returns: 1 if the nick matches the botnick; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set is_bot [isbotnick LamestBot] + + Module: server ^^^^^^^^^^^^^^^^^ botisop [channel] ^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise. + Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set opped [botisop "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^ botishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise. + Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set halfopped [botishalfop "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^ botisvoice [channel] ^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise. + Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set voiced [botisvoice "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^ botonchan [channel] ^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise. + Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set present [botonchan "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^ isop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set opped [isop Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set halfopped [ishalfop Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^ wasop ^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise. + Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set previously_opped [wasop Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ washalfop ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise. + Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set previously_halfopped [washalfop Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isvoice [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set voiced [isvoice Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isidentified [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses) + Description: Determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses). Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); 0 otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set identified [isidentified Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ isaway [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. + 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 w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; 0 otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set away [isaway Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isircbot [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding "BOT=B" (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. + Description: Determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding "BOT=B" (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; 0 otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set is_bot [isircbot Foobar "#lamest"] + + Module: irc + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Description: Returns 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise. Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set present [onchan Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ monitor [nickname] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The 'add' command sends 'nickname' to the server to track. The 'delete' command removes 'nickname' from being tracked by the server (or returns an error if the nickname is not present). The 'list' command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The 'online' command returns a string of tracked nicknames that are currently online. The 'offline' command returns a list of tracked nicknames that are currently offline. + Description: Interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The 'add' command sends 'nickname' to the server to track. The 'delete' command removes 'nickname' from being tracked by the server (or returns an error if the nickname is not present). The 'list' command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The 'online' command returns a string of tracked nicknames that are currently online. The 'offline' command returns a list of tracked nicknames that are currently offline. Returns: The 'add' sub-command returns a '1' if the nick was successfully added, a '0' if the nick is already in the monitor list, and a '2' if the nick could not be added. The 'delete' sub-command returns a '1' if the nick is removed, or an error if the nick is not found. The 'status' sub-command returns a '1' if 'nickname' is online or a 0 if 'nickname' is offline. The 'clear' command removes all nicknames from the list the server is monitoring. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set added [monitor add Foobar] + + Module: irc ^^^^^^^^^^^^^^^ accounttracking ^^^^^^^^^^^^^^^ - Description: checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). + Description: Checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). Returns: a '1' if all three functionalities are present, a '0' if one or more are missing. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [accounttracking] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getaccount [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. + Returns: the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set account [getaccount Foobar "#lamest"] + + Module: irc + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ nick2hand [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set handle [nick2hand Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ account2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set nicks [account2nicks foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nick [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set nick [hand2nick foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set nicks [hand2nicks foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ handonchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set present [handonchan foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^ ischanban ^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel). + Returns: 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [ischanban "*!*@127.0.0.1" "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel). + Returns: 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [ischanexempt "*!*@127.0.0.1" "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel). + Returns: 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [ischaninvite "*!*@127.0.0.1" "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^ chanbans ^^^^^^^^^^^^^^^^^^ + Description: Returns a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Returns: a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set bans [chanbans "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^ chanexempts ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Returns: a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set exempts [chanexempts "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^ chaninvites ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Returns: a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set invites [chaninvites "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^ resetbans ^^^^^^^^^^^^^^^^^^^ - 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 + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetbans "#lamest" + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^ resetexempts ^^^^^^^^^^^^^^^^^^^^^^ - 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 + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetexempts "#lamest" + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^ resetinvites ^^^^^^^^^^^^^^^^^^^^^^ - 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 + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetinvites "#lamest" + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanidle [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified. + Description: Resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetchanidle Foobar "#lamest" + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanjoin [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: resets the channel join time for the given nick or for all nicks on the channel if no nick is specified. + Description: Resets the channel join time for the given nick or for all nicks on the channel if no nick is specified. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetchanjoin Foobar "#lamest" + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchan [flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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: + 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: +-----+------------------------------+ | b | channel bans | @@ -1281,6 +2377,14 @@ resetchan [flags] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + resetchan "#lamest" w + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1305,160 +2409,322 @@ refreshchan [flags] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + refreshchan "#lamest" w + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanhost [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set host [getchanhost Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanjoin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set joined [getchanjoin Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchansplit [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise. + Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set split [onchansplit Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chanlist [flags][<&|>chanflags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: lists all users on a channel Eggdrop has joined. 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 `Flag Masks`_ for additional information). + Description: Lists all users on a channel Eggdrop has joined. 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 `Flag Masks`_ for additional information). 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. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set nicks [chanlist "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanidle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns number of minutes that person has been idle; -1 if the specified user isn't on the channel. + Returns: number of minutes that person has been idle; -1 if the specified user isn't on the channel + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set idle [getchanidle Foobar "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^ getchanmode ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns string of the type "+ntik key" for the channel specified. + Returns: string of the type "+ntik key" for the channel specified + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set modes [getchanmode "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jump [server [[+]port [password]]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + jump irc.example.net +6697 + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pushmode [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + Description: Sends out a channel mode change (ex: pushmode #lamest +o Foobar) 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + pushmode "#lamest" +o Foobar + + Module: irc ^^^^^^^^^^^^^^^^^^^ flushmode ^^^^^^^^^^^^^^^^^^^ - 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) + 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). Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + flushmode "#lamest" + + Module: irc ^^^^^^^^^^^^^^^ topic ^^^^^^^^^^^^^^^ + Description: Returns string containing the current topic of the specified channel. + Returns: string containing the current topic of the specified channel + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set current_topic [topic "#lamest"] + + Module: irc ^^^^^^^^^^^^^^^^^^^ validchan ^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: 1 if the channel exists, 0 if not + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set known [validchan "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^ isdynamic ^^^^^^^^^^^^^^^^^^^ + Description: Returns 1 if the channel is a dynamic channel; 0 otherwise. + Returns: 1 if the channel is a dynamic channel; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set dynamic [isdynamic "#lamest"] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setudef flag example-setting + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ renudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: renames a user defined channel flag, string, or integer setting. + Description: Renames a user defined channel flag, string, or integer setting. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + renudef flag example-setting renamed-setting + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deludef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: deletes a user defined channel flag, string, or integer setting. + Description: Deletes a user defined channel flag, string, or integer setting. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + deludef flag example-setting + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^ getudefs [flag/int/str] ^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a list of user defined channel settings of the given type, or all of them if no type is given. + Returns: a list of user defined channel settings of the given type, or all of them if no type is given. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set flags [getudefs flag] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^ chansettype ^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set type [chansettype autoop] + + Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1471,6 +2737,14 @@ isupport get [key] Returns: string or dict, see description above + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set chantypes [isupport get CHANTYPES] + + Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1481,6 +2755,14 @@ isupport isset Returns: 0 or 1 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set supported [isupport isset CHANTYPES] + + Module: server @@ -1493,110 +2775,213 @@ DCC Commands putdcc [-raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putdcc 0 "Hello, foobar." + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ putidx -[raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description. Alias for the putdcc_ command. + Description: Alias for the putdcc_ command. - Returns: nothing + Returns: nothing - Module: core + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putidx 0 "Hello, foobar." + + + Module: core ^^^^^^^^^^^^^^^^^^^^^^ dccbroadcast ^^^^^^^^^^^^^^^^^^^^^^ - Description: sends a message to everyone on the party line across the botnet, in the form of "\*\*\* " for local users, "\*\*\* (Bot) " for users on other bots with version below 1.8.4, and "(Bot) " for users on other bots with version 1.8.4+ and console log mode 'l' enabled + Description: Sends a message to everyone on the party line across the botnet, in the form of "\*\*\* " for local users, "\*\*\* (Bot) " for users on other bots with version below 1.8.4, and "(Bot) " for users on other bots with version 1.8.4+ and console log mode 'l' enabled. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + dccbroadcast "Example botnet announcement" + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccputchan ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + dccputchan 0 "Hello from LamestBot" + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ boot [reason] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: boots a user from the partyline + Description: Boots a user from the partyline. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + boot foobar@LamestBot "Requested disconnect" + + Module: core ^^^^^^^^^^^^^^^^^^^^^ dccsimul ^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + dccsimul 0 ".who" + + Module: core ^^^^^^^^^^^^^^^^^ hand2idx ^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set idx [hand2idx foobar] + + Module: core ^^^^^^^^^^^^^^ idx2hand ^^^^^^^^^^^^^^ + Description: Returns handle of the user with the given idx. + Returns: handle of the user with the given idx + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set handle [idx2hand 0] + + Module: core ^^^^^^^^^^^^^^ valididx ^^^^^^^^^^^^^^ + Description: Returns 1 if the idx currently exists; 0 otherwise. + Returns: 1 if the idx currently exists; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set valid [valididx 0] + + Module: core ^^^^^^^^^^^^^ getchan ^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set partyline_channel [getchan 0] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^ setchan ^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setchan 0 0 + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ console [channel] [console-modes] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). + + 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 + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl - 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 + set settings [console 0 "#lamest" +mp] Module: core @@ -1604,27 +2989,43 @@ console [channel] [console-modes] resetconsole ^^^^^^^^^^^^^^^^^^ - Description: changes a dcc user's console mode to the default setting in the configfile. + Description: Changes a dcc user's console mode to the default setting in the configfile. Returns: a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set settings [resetconsole 0] + + Module: core ^^^^^^^^^^^^^^^^^^^ echo [status] ^^^^^^^^^^^^^^^^^^^ - Description: turns a user's echo on or off; the status has to be a 1 or 0 + Description: Turns a user's echo on or off; the status has to be a 1 or 0. Returns: new value of echo for that user (or the current value, if status was omitted) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set echo_enabled [echo 0] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strip [+/-strip-flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: modifies the strip-flags for a user. The supported strip-flags are: + Description: Modifies the strip-flags for a user. The supported strip-flags are: +------+-------------------------------------------------------------+ | c | remove all color codes | @@ -1648,13 +3049,21 @@ strip [+/-strip-flags] Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set strip_flags [strip 0 +c] + + Module: core ^^^^^^^^^^^^^^^^^^^ page [number] ^^^^^^^^^^^^^^^^^^^ - Description: This allows you to slow down the number of lines the bot sends + Description: This allows you to slow down the number of lines the bot sends. to a user at once via the partyline. When enabled, any commands that send @@ -1670,50 +3079,94 @@ page [number] status was omitted) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set page_lines [page 0 20] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ putbot ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored. + Description: Sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putbot OtherBot "Hello from LamestBot" + + Module: core ^^^^^^^^^^^^^^^^^^^^ putallbots ^^^^^^^^^^^^^^^^^^^^ - Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored. + Description: Sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + putallbots "example-message Hello" + + Module: core ^^^^^^^^^^^^^ killdcc ^^^^^^^^^^^^^ - Description: kills a partyline or file area connection + Description: Kills a partyline or file area connection. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + killdcc 0 + + Module: core ^^^^ bots ^^^^ + Description: Returns list of the bots currently connected to the botnet. + Returns: list of the bots currently connected to the botnet + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set linked_bots [bots] + + Module: core ^^^^^^^ botlist ^^^^^^^ + Description: 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: + 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: +----------+-----------------------------------------------+ @@ -1726,39 +3179,79 @@ botlist | sharing | a "+" if the bot is a sharebot; "-" otherwise | +----------+-----------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set botnet [botlist] + + Module: core ^^^^^^^^^^^^^^ islinked ^^^^^^^^^^^^^^ + Description: Returns 1 if the bot is currently linked; 0 otherwise. + Returns: 1 if the bot is currently linked; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set linked [islinked OtherBot] + + Module: core ^^^^^^^ dccused ^^^^^^^ + Description: Returns number of dcc connections currently in use. + Returns: number of dcc connections currently in use + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set connections [dccused] + + Module: core ^^^^^^^^^^^^^^ dcclist [type] ^^^^^^^^^^^^^^ + Description: Returns a list of active connections, each item in the list is a sublist containing seven elements: + Returns: a list of active connections, each item in the list is a sublist containing seven elements: { <[+]port> {} }. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set connections [dcclist chat] + + Module: core ^^^^^^^^^^^^^^^ socklist [type] ^^^^^^^^^^^^^^^ + Description: 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: + 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: +----------+--------------------------------------------------------+ @@ -1786,57 +3279,111 @@ socklist [type] | time | timestamp of when the socket was established | +----------+--------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set sockets [socklist] + + Module: core ^^^^^^^^^^^ whom ^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set users [whom 0] + + Module: core ^^^^^^^^^^^^^^^^ getdccidle ^^^^^^^^^^^^^^^^ + Description: Returns number of seconds the dcc chat/file system/script user has been idle. + Returns: number of seconds the dcc chat/file system/script user has been idle + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set idle_seconds [getdccidle 0] + + Module: core ^^^^^^^^^^^^^^^^ getdccaway ^^^^^^^^^^^^^^^^ + Description: Returns away message for a dcc chat user (or "" if the user is not set away). + Returns: away message for a dcc chat user (or "" if the user is not set away) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set away_message [getdccaway 0] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ setdccaway ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away. + Description: Sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setdccaway 0 "Away for a moment" + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ connect <[+]port> ^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: idx of the new connection + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set idx [connect 127.0.0.1 9000] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listen [ip] [options [flag]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. listen [ip] bots [mask] @@ -1866,7 +3413,15 @@ listen [ip] [options [flag]] Description: stop listening on a port - Returns: nothing + Returns: nothing + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set port [listen 127.0.0.1 3333 users] + Module: core @@ -1874,10 +3429,18 @@ listen [ip] [options [flag]] dccdumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + dccdumpfile 0 help.txt + + Module: core Notes Module @@ -1887,40 +3450,74 @@ Notes Module notes [numberlist] ^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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: + 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:: { } + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set note_count [notes foobar] + + Module: notes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ erasenotes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: erases some or all stored notes for a user. Use '-' to erase all notes. + Description: Erases some or all stored notes for a user. Use '-' to erase all notes. Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set erased [erasenotes foobar "1-3"] + + Module: notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listnotes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: lists existing notes according to the numberlist (ex: "2-4;8;16-") + Description: Lists existing notes according to the numberlist (ex: "2-4;8;16-"). Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set notes [listnotes foobar "1-3"] + + Module: notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ storenote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: stores a note for later reading, notifies idx of any results (use idx -1 for no notify). + Description: Stores a note for later reading, notifies idx of any results (use idx -1 for no notify). Returns: 0 on success; non-0 on failure + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set status [storenote foobar foobar "Remember the meeting." -1] + + Module: notes Assoc Module @@ -1930,20 +3527,36 @@ Assoc Module assoc [name] ^^^^^^^^^^^^^^^^^^^ - Description: sets the name associated with a botnet channel, if you specify one + Description: Sets the name associated with a botnet channel, if you specify one. Returns: current name for that channel, if any + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set name [assoc 1 lamest] + + Module: assoc ^^^^^^^^^^^^^^^^ killassoc ^^^^^^^^^^^^^^^^ - Description: removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs. + Description: Removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + killassoc 1 + + Module: assoc Compress Module @@ -1952,25 +3565,57 @@ Compress Module ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compressfile [-level ] [target-file] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -and -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Description: Compresses a file. The optional level specifies the compression mode from 0 (minimum CPU usage and compression) through 9 (maximum CPU usage and compression). If target-file is omitted, src-file is overwritten. + + Returns: nothing + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + compressfile -level 6 example.txt example.txt.gz + + See also: uncompressfile, iscompressed + + Module: compress + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ uncompressfile [target-file] -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + Description: Uncompresses a file. If target-file is omitted, src-file is overwritten. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + uncompressfile example.txt.gz example.txt + + See also: compressfile, iscompressed + Module: compress ^^^^^^^^^^^^^^^^^^^^^^^ iscompressed ^^^^^^^^^^^^^^^^^^^^^^^ - Description: determines whether is gzip compressed. + Description: Determines whether is gzip compressed. . Returns: 1 if it is, 0 if it isn't, and 2 if some kind of error prevented the checks from succeeding. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set compressed [iscompressed example.gz] + + Module: compress Filesys Module @@ -1980,41 +3625,78 @@ Filesys Module setpwd ^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setpwd 0 / + + Module: filesys ^^^^^^^^^^^^ getpwd ^^^^^^^^^^^^ + Description: Returns the current directory of a file system user. + Returns: the current directory of a file system user + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set directory [getpwd 0] + + Module: filesys ^^^^^^^^^^^^^^ getfiles ^^^^^^^^^^^^^^ + Description: Returns a list of files in the directory given; the directory is relative to dcc-path. Returns: a list of files in the directory given; the directory is relative to dcc-path + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set files [getfiles /] + + Module: filesys ^^^^^^^^^^^^^ getdirs ^^^^^^^^^^^^^ + Description: Returns a list of subdirectories in the directory given; the directory is relative to dcc-path. + Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set directories [getdirs /] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccsend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 + 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. Returns: @@ -2033,94 +3715,184 @@ dccsend | 5 | the file could not be opened or temporary file could not be created | +-------+---------------------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [dccsend example.txt Foobar] + + Module: transfer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ filesend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 + 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. Returns: 0 on failure; 1 on success (either an immediate send or a queued send) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [filesend 0 example.txt Foobar] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fileresend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: 0 on failure; 1 on success (either an immediate send or a queued send) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [fileresend 0 example.txt Foobar] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setdesc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sets the description for a file in a file system directory; the directory is relative to dcc-path + Description: Sets the description for a file in a file system directory; the directory is relative to dcc-path. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setdesc / example.txt "Example file" + + Module: filesys ^^^^^^^^^^^^^^^^^^^^ getdesc ^^^^^^^^^^^^^^^^^^^^ + Description: Returns the description for a file in the file system, if one exists. + Returns: the description for a file in the file system, if one exists + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set description [getdesc / example.txt] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setowner ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: changes the owner for a file in the file system; the directory is relative to dcc-path + Description: Changes the owner for a file in the file system; the directory is relative to dcc-path. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setowner / example.txt foobar + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^ getowner ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns the owner of a file in the file system. + Returns: the owner of a file in the file system + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set owner [getowner / example.txt] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setlink ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path + Description: Creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setlink / example.txt OtherBot:/example.txt + + Module: filesys ^^^^^^^^^^^^^^^^^^^^ getlink ^^^^^^^^^^^^^^^^^^^^ + Description: Returns the link for a linked file, if it exists. + Returns: the link for a linked file, if it exists + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set link [getlink / example.txt] + + Module: filesys ^^^^^^^^^^^^^^^^^ getfileq ^^^^^^^^^^^^^^^^^ + Description: 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. + 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 + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set queued_files [getfileq foobar] + + Module: transfer ^^^^^^^^^^^^^^^^^^^^^ getfilesendtime ^^^^^^^^^^^^^^^^^^^^^ + Description: Returns the unixtime value from when a file transfer started, or a negative number: + Returns: the unixtime value from when a file transfer started, or a negative number: +-----+------------------------------------------------------+ @@ -2129,13 +3901,21 @@ getfilesendtime | -2 | the idx matches an entry which is not a file transfer| +-----+------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [getfilesendtime 0] + + Module: transfer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mkdir [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: creates a directory in the file system. Only users with the required flags may access it. + Description: Creates a directory in the file system. Only users with the required flags may access it. Returns: @@ -2149,23 +3929,39 @@ mkdir [ [channel]] | -3 | could not open filedb | +-----+------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [mkdir /examples] + + Module: filesys ^^^^^^^^^^^^^^^^^ rmdir ^^^^^^^^^^^^^^^^^ - Description: removes a directory from the file system. + Description: Removes a directory from the file system. Returns: 0 on success; 1 on failure + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [rmdir /examples] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^ mv ^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned: @@ -2179,13 +3975,21 @@ mv | -4 | no matches found | +-----+------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set moved [mv /incoming/example.txt /files/example.txt] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^ cp ^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned: @@ -2199,24 +4003,49 @@ cp | -4 | no matches found | +-----+------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set copied [cp /incoming/example.txt /files/example.txt] + Module: filesys ^^^^^^^^^^^^^^ getflags ^^^^^^^^^^^^^^ + Description: Returns the flags required to access a directory. + Returns: the flags required to access a directory + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set required_flags [getflags /] + + Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setflags [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: sets the flags required to access a directory + Description: Sets the flags required to access a directory. Returns: 0 on success; -1 or -3 on failure + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + setflags /examples +o "#lamest" + + Module: filesys PBKDF2 Module @@ -2226,17 +4055,37 @@ PBKDF2 Module encpass2 ^^^^^^^^^^^^^^^ + Description: Returns a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + Returns: a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set hash [encpass2 "example-password"] + + Module: pbkdf2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pbkdf2 [-bin] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + Returns: a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set key [pbkdf2 "example-password" "example-salt" 10000 sha256] + + Module: pbkdf2 Miscellaneous Commands @@ -2250,26 +4099,50 @@ bind [proc-name] Returns: name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind pub - !hello example_hello + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unbind ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: removes a previously created bind + Description: Removes a previously created bind. Returns: name of the command that was removed + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + unbind pub - !hello example_hello + + Module: core ^^^^^^^^^^^^^^^^^ binds [type/mask] ^^^^^^^^^^^^^^^^^ - Description: By default, lists Tcl binds registered with the Eggdrop. You can specify 'all' to view all binds, 'tcl' to view Tcl binds, and 'python' to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. + Description: By default, lists Tcl binds registered with the Eggdrop. You can specify 'all' to view all binds, 'tcl' to view Tcl binds, and 'python' to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. + + Returns: a list of Tcl binds, each item in the list is a sublist of five elements: + { } + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set public_binds [binds pub] - Returns: a list of Tcl binds, each item in the list is a sublist of five elements: - { } Module: core @@ -2277,7 +4150,7 @@ binds [type/mask] logfile [ ] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Logfile flags: @@ -2319,7 +4192,15 @@ logfile [ ] | x | file transfers and file-area commands | +-----+---------------------------------------------------------------------+ - Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log} + Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lamest lame.log} + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set logfiles [logfile] + Module: core @@ -2327,6 +4208,8 @@ logfile [ ] maskhost [masktype] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: Returns masked hostmask for the string given according to the masktype (the default is 3). + Returns: masked hostmask for the string given according to the masktype (the default is 3). Available types are: @@ -2359,131 +4242,257 @@ maskhost [masktype] Same is valid for types 20-29, but instead of '?', the '\*' wildcard will be used. Types 30-39 set the host to '\*'. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set mask [maskhost "Foobar!foobar@127.0.0.1"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ timer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of "timer". + 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. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of "timer". Returns: a timerName + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set id [timer 5 {putlog "Example timer fired."}] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utimer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of "timer". + 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. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of "timer". Returns: a timerName + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set id [utimer 30 {putlog "Example timer fired."}] + + Module: core ^^^^^^ timers ^^^^^^ - Description: lists all active minutely timers. + Description: Lists all active minutely timers. Returns: a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set active_timers [timers] + + Module: core ^^^^^^^ utimers ^^^^^^^ - Description: lists all active secondly timers. + Description: Lists all active secondly timers. Returns: a list of active secondly timers, with each timer sub-list containing the number of seconds left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set active_timers [utimers] + Module: core ^^^^^^^^^^^^^^^^^^^^^ killtimer ^^^^^^^^^^^^^^^^^^^^^ - Description: removes the timerName minutely timer from the timer list. + Description: Removes the timerName minutely timer from the timer list. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set timer_id [timer 5 {putlog "Example timer fired."}] + killtimer $timer_id + + Module: core ^^^^^^^^^^^^^^^^^^^^^^ killutimer ^^^^^^^^^^^^^^^^^^^^^^ - Description: removes the timerName secondly timer from the timer list. + Description: Removes the timerName secondly timer from the timer list. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set timer_id [utimer 30 {putlog "Example timer fired."}] + killutimer $timer_id + + Module: core ^^^^^^^^ unixtime ^^^^^^^^ + Description: Returns the current Unix timestamp. + + Returns: a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT). + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set now [unixtime] + + Module: core ^^^^^^^^^^^^^^^^^^ duration ^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set readable [duration 3600] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strftime [time] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set date [strftime "%Y-%m-%d"] + + Module: core ^^^^^^^^^^^^^^^^ ctime ^^^^^^^^^^^^^^^^ + Description: 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". + 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" + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set date [ctime [unixtime]] + + Module: core ^^^^ myip ^^^^ + Description: Returns a long number representing the bot's IP address, as it might appear in (for example) a DCC request. + Returns: a long number representing the bot's IP address, as it might appear in (for example) a DCC request + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [myip] + + Module: core ^^^^^^^^^^^^ rand ^^^^^^^^^^^^ + Description: 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. + 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set value [rand 100] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^ control ^^^^^^^^^^^^^^^^^^^^^^^ - 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". + 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". Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + control 0 example_proc + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sendnote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: simulates what happens when one user sends a note to another + Description: Simulates what happens when one user sends a note to another. Returns: @@ -2501,59 +4510,122 @@ sendnote | 5 | the note was stored because the user is away | +-----+----------------------------------------------------------+ + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [sendnote foobar foobar "Example note"] + + Module: core ^^^^^^^^^^^^^^^^^^^^ link [via-bot] ^^^^^^^^^^^^^^^^^^^^ - Description: attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. + Description: Attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. Returns: 1 if the link will be attempted; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set started [link OtherBot] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^ unlink [comment] ^^^^^^^^^^^^^^^^^^^^^^ - Description: attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. + Description: Attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. Returns: 1 on success; 0 otherwise + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set removed [unlink OtherBot "Maintenance"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^ encrypt ^^^^^^^^^^^^^^^^^^^^^^ + Description: 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.0. + 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.0. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [encrypt "example-password" "Example text"] + + Module: encryption ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ decrypt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Description: 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). + 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). + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set encrypted [encrypt "example-password" "Example text"] + set plain [decrypt "example-password" $encrypted] + + Module: encryption ^^^^^^^^^^^^^^^^^^ encpass ^^^^^^^^^^^^^^^^^^ + Description: Returns encrypted string (using the currently loaded encryption module). + Returns: encrypted string (using the currently loaded encryption module) + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set encrypted [encpass "example-password"] + + Module: encryption ^^^^^^^^^^^^ die [reason] ^^^^^^^^^^^^ - Description: causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used. + Description: Causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used. + + Returns: nothing + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + die - Returns: none Module: core @@ -2561,8 +4633,18 @@ die [reason] unames ^^^^^^ + Description: Returns the current operating system the bot is using. + Returns: the current operating system the bot is using + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [unames] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2579,116 +4661,221 @@ dnslookup [[arg1] [arg2] ... [argN]] Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + proc example_dns_result {ip host status} { + putlog "DNS result: $host -> $ip (status $status)" + } + dnslookup irc.example.net example_dns_result + + Module: core ^^^^^^^^^^^^ md5 ^^^^^^^^^^^^ + Description: Returns the 128 bit MD5 message-digest of the specified string. + Returns: the 128 bit MD5 message-digest of the specified string + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set digest [md5 "example text"] + + Module: core ^^^^^^^^^^^^^^^^^ callevent ^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + callevent example-event + + Module: core ^^^^^^^ traffic ^^^^^^^ + Description: 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). + 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). + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set usage [traffic] + + Module: core ^^^^^^^ modules ^^^^^^^ + + Description: 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. 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. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set loaded_modules [modules] + + Module: core ^^^^^^^^^^^^^^^^^^^ loadmodule ^^^^^^^^^^^^^^^^^^^ - Description: attempts to load the specified module. + Description: Attempts to load the specified module. Returns: "Already loaded." if the module is already loaded, "" if successful, or the reason the module couldn't be loaded. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [loadmodule notes] + + Module: core ^^^^^^^^^^^^^^^^^^^^^ unloadmodule ^^^^^^^^^^^^^^^^^^^^^ - Description: attempts to unload the specified module. + Description: Attempts to unload the specified module. Returns: "No such module" if the module is not loaded, "" otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set result [unloadmodule notes] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ loadhelp ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: attempts to load the specified help file from the help/ directory. + Description: Attempts to load the specified help file from the help/ directory. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + loadhelp example.help + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ unloadhelp ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: attempts to unload the specified help file. + Description: Attempts to unload the specified help file. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + unloadhelp example.help + + Module: core ^^^^^^^^^^ reloadhelp ^^^^^^^^^^ - Description: reloads the bot's help files. + Description: Reloads the bot's help files. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + reloadhelp + + Module: core ^^^^^^^ restart ^^^^^^^ - Description: rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list. + Description: Rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + restart + + Module: core ^^^^^^ rehash ^^^^^^ - Description: rehashes the bot + Description: Rehashes the bot. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + rehash + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stripcodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: strips specified control characters from the string given. strip-flags can be any combination of the following: + Description: Strips specified control characters from the string given. strip-flags can be any combination of the following: +-----+-------------------------------------------------------------+ | c | remove all color codes | @@ -2712,38 +4899,69 @@ stripcodes Returns: the stripped string. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set clean [stripcodes c "Example text"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchaddr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: checks if the address matches the hostmask given. The address should be in the form nick!user\@host. + Description: Checks if the address matches the hostmask given. The address should be in the form nick!user\@host. Returns: 1 if the address matches the hostmask, 0 otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set matched [matchaddr "*!*@127.0.0.1" "Foobar!foobar@127.0.0.1"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchcidr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. + Description: Performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. - Example: matchcidr 192.168.0.0 192.168.1.17 16 Returns: 1 if the address matches the block prefix, 0 otherwise. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set matched [matchcidr 127.0.0.0 127.0.0.1 8] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchstr ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. Returns: 1 if the pattern matches the string, 0 if it doesn't. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set matched [matchstr "Foo*" "Foobar"] + + Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2754,13 +4972,21 @@ rfcequal Returns: 1 if equal, 0 if not. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set equal [rfcequal "Foobar" "foobar"] + + Module: core ^^^^^^^^^^^^^ status [type] ^^^^^^^^^^^^^ - Description: provides eggdrop status information similar to the .status command in partyline. The available types of information are: + Description: Provides eggdrop status information similar to the .status command in partyline. The available types of information are: +------+---------------------------------------------------------------------+ | cpu | total cpu time spent by eggdrop | @@ -2774,36 +5000,68 @@ status [type] Returns: the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set cpu_info [status cpu] + + Module: core ^^^^^^^^^^^ istls ^^^^^^^^^^^ - Description: checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. + Description: Checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. Returns: 1 if the idx is a TLS connection, 0 if it's plaintext. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set secure [istls 0] + + Module: core ^^^^^^^^^^^^^^ starttls ^^^^^^^^^^^^^^ - 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. + 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. Returns: nothing + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + starttls 0 + + Module: core ^^^^^^^^^^^^^^^ tlsstatus ^^^^^^^^^^^^^^^ - 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. + 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. Returns: a flat list of name-value pairs + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + set details [tlsstatus 0] + + Module: core Global Variables @@ -2815,7 +5073,7 @@ NOTE: All config file variables are also global. botnick ^^^^^^^ - Value: the current nickname the bot is using (for example: "Valis", "Valis0", etc.) + Value: the current nickname the bot is using (for example: "LamestBot", "LamestBot1", etc.) Module: server @@ -2823,7 +5081,7 @@ botnick botname ^^^^^^^ - Value: the current nick!user\@host that the server sees (for example: "Valis!valis\@crappy.com") + Value: the current nick!user\@host that the server sees (for example: "LamestBot!eggdrop\@127.0.0.1") Module: server @@ -2831,14 +5089,14 @@ botname server ^^^^^^ - 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. + Value: the current server's real name (what server calls itself) and port bot is connected to (for example: "irc.example.net:6667") Note that this does not necessarily match the servers internet address. Module: server ^^^^^^^^^^^^^ serveraddress ^^^^^^^^^^^^^ - 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. + 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: "irc.example.net:6667"). Note that this does not necessarily match the name server calls itself. Module: server @@ -2965,41 +5223,37 @@ You will commonly see flag masks for global flags written "ov"; this is the same Some additional examples: -+------------+-----------------------------------------------------------------+ -| Flag Mask | Action | -+============+=================================================================+ -| m, +m, m|* | Checks if the user has the m global flag | -+------------+-----------------------------------------------------------------+ -| +mn | Checks if the user has the m OR n global flag | -+------------+-----------------------------------------------------------------+ -| \|+mn | Checks if the user has the m OR n channel flag | -+------------+-----------------------------------------------------------------+ -| \|+mn #foo | Checks if the user has the m OR n channel flag for #foo | -+------------+-----------------------------------------------------------------+ -| &+mn | Checks if the user has the m AND n channel flag | -+------------+-----------------------------------------------------------------+ -| &mn #foo | Checks if the user has the m AND n channel flag for #foo | -+------------+-----------------------------------------------------------------+ -| \|+o #foo | Checks if the user has the o channel flag for #foo | -+------------+-----------------------------------------------------------------+ -| +o|+n #foo | Checks if the user has the o global flag OR the n channel flag | -| | for #foo | -+------------+-----------------------------------------------------------------+ -| +m&+v #foo | Checks if the user has the m global flag AND the v channel flag | -| | for #foo | -+------------+-----------------------------------------------------------------+ -| -m | Checks if the user does not have the m global flag | -+------------+-----------------------------------------------------------------+ -| \|-n #foo | Checks if the user does not have the n channel flag for #foo | -+------------+-----------------------------------------------------------------+ -| +m|-n #foo | Checks if the user has the global m flag OR does not have a | -| | channel n flag for #foo | -+------------+-----------------------------------------------------------------+ -| -n&-m #foo | Checks if the user does not have the global n flag AND does | -| | not have the channel m flag for #foo | -+------------+-----------------------------------------------------------------+ -| ||+b | Checks if the user has the bot flag b | -+------------+-----------------------------------------------------------------+ ++----------------+-----------------------------------------------------------------------------------------------------+ +| Flag Mask | Action | ++================+=====================================================================================================+ +| m, +m, m|* | Checks if the user has the m global flag | ++----------------+-----------------------------------------------------------------------------------------------------+ +| +mn | Checks if the user has the m OR n global flag | ++----------------+-----------------------------------------------------------------------------------------------------+ +| \\|+mn | Checks if the user has the m OR n channel flag | ++----------------+-----------------------------------------------------------------------------------------------------+ +| \\|+mn #lamest | Checks if the user has the m OR n channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| &+mn | Checks if the user has the m AND n channel flag | ++----------------+-----------------------------------------------------------------------------------------------------+ +| &mn #lamest | Checks if the user has the m AND n channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| \\|+o #lamest | Checks if the user has the o channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| +o|+n #lamest | Checks if the user has the o global flag OR the n channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| +m&+v #lamest | Checks if the user has the m global flag AND the v channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| -m | Checks if the user does not have the m global flag | ++----------------+-----------------------------------------------------------------------------------------------------+ +| \\|-n #lamest | Checks if the user does not have the n channel flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| +m|-n #lamest | Checks if the user has the global m flag OR does not have a channel n flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| -n&-m #lamest | Checks if the user does not have the global n flag AND does not have the channel m flag for #lamest | ++----------------+-----------------------------------------------------------------------------------------------------+ +| ||+b | Checks if the user has the bot flag b | ++----------------+-----------------------------------------------------------------------------------------------------+ As a side note, Tcl scripts historically have used a '-' to skip processing of a flag type (Example: -\|o). It is unknown where and why this practice started, but as a style tip, Eggdrop developers recommend using a '\*' to skip processing, so as not to confuse a single "-" meaning "skip processing" with a preceding "-ov" which means "not these flags". @@ -3017,7 +5271,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: used for /msg commands. The first word of the user's msg is the command, and everything else becomes the text argument. + Description: Used for /msg commands. The first word of the user's msg is the command, and everything else becomes the text argument. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind msg * !hello msg_proc + + proc msg_proc {nick user hand text} { + putlog "Nick is $nick, user is $user, handle is $hand, text is $text" + } + + Trigger and output:: + + /msg LamestBot !hello world + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is world Module: server @@ -3027,7 +5297,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + Description: Used for partyline commands; the command is the first word and everything else is 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind dcc * hello dcc_proc + + proc dcc_proc {hand idx text} { + putlog "Handle is $hand, idx is $idx, text is $text" + } + + Trigger and output:: + + .hello world + Handle is foobar, idx is 3, text is world Module: core @@ -3037,7 +5323,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: the same as DCC, except this is triggered if the user is in the file area instead of the party line + Description: The same as DCC, except this is triggered if the user is in the file area instead of the party line. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind fil * hello fil_proc + + proc fil_proc {hand idx text} { + putlog "Handle is $hand, idx is $idx, text is $text" + } + + Trigger and output:: + + .hello world + Handle is foobar, idx is 3, text is world Module: filesys @@ -3047,7 +5349,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: used for commands given on a channel. The first word becomes the command and everything else is the text argument. + Description: Used for commands given on a channel. The first word becomes the command and everything else is the text argument. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind pub * !hello pub_proc + + proc pub_proc {nick user hand chan text} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, text is $text" + } + + Trigger and output:: + + !hello world + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, text is world Module: irc @@ -3057,7 +5375,24 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind msgm * "*" msgm_proc + + proc msgm_proc {nick user hand text} { + putlog "Nick is $nick, user is $user, handle is $hand, text is $text" + return 0 + } + + Trigger and output:: + + /msg LamestBot hello world + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is hello world Module: server @@ -3067,16 +5402,25 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind pubm * "% *" pubm_proc + + proc pubm_proc {nick user hand chan text} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, text is $text" + return 0 + } + + Trigger and output:: + + hello world + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, text is hello world - Examples: - bind pubm * "#eggdrop Hello*" myProc - Listens on #eggdrop for any line that begins with "Hello" - bind pubm * "% Hello*" myProc - Listens on any channel for any line that begins with "Hello" - bind pubm * "% !command" myProc - Listens on any channel for a line that ONLY contains "!command" - Module: irc (7) NOTC (stackable) @@ -3085,7 +5429,7 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. New Tcl procs should be declared as:: @@ -3096,6 +5440,23 @@ The following is a list of bind types and how they work. Below each bind type is for compatibility. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind notc * "*" notc_proc + + proc notc_proc {nick user hand text {dest ""}} { + putlog "Nick is $nick, user is $user, handle is $hand, text is $text, destination is $dest" + return 0 + } + + Trigger and output:: + + Foobar sends NOTICE LamestBot :hello world + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is hello world, destination is LamestBot + Module: server (8) JOIN (stackable) @@ -3104,7 +5465,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: triggered by someone joining the channel. The mask in the bind is matched against "#channel nick!user\@host" and can contain wildcards. + Description: Triggered by someone joining the channel. The mask in the bind is matched against "#channel nick!user\@host" and can contain wildcards. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind join * "#lamest *" join_proc + + proc join_proc {nick user hand chan} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" + } + + Trigger and output:: + + Foobar joins #lamest + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest Module: irc @@ -3114,7 +5491,7 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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 "". + 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 "". New Tcl procs should be declared as:: @@ -3122,6 +5499,22 @@ The following is a list of bind types and how they work. Below each bind type is for compatibility. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind part * "#lamest *" part_proc + + proc part_proc {nick user hand chan {msg ""}} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, message is $msg" + } + + Trigger and output:: + + Foobar parts #lamest with "Goodbye" + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Goodbye + Module: irc (10) SIGN (stackable) @@ -3130,7 +5523,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind sign * "#lamest *" sign_proc + + proc sign_proc {nick user hand chan reason} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, reason is $reason" + } + + Trigger and output:: + + Foobar quits IRC with "Leaving" + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, reason is Leaving Module: irc @@ -3140,18 +5549,49 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: triggered by a topic change. mask can contain wildcards and is matched against '#channel '. + Description: Triggered by a topic change. mask can contain wildcards and is matched against '#channel '. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind topc * "#lamest *" topc_proc + + proc topc_proc {nick user hand chan topic} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, topic is $topic" + } + + Trigger and output:: + + Foobar changes the #lamest topic to "Example topic" + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, topic is Example topic Module: irc (12) KICK (stackable) - bind kick - - procname + bind kick + + procname + + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind kick * "#lamest *" kick_proc + + proc kick_proc {nick user hand chan target reason} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, target is $target, reason is $reason" + } - 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. + Trigger and output:: + Foobar kicks Guest from #lamest with "Example reason" + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, target is Guest, reason is Example reason Module: irc @@ -3161,7 +5601,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind nick * "#lamest *" nick_proc + + proc nick_proc {nick user hand chan newnick} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, new nick is $newnick" + } + + Trigger and output:: + + Foobar changes nick to Foobar2 + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, new nick is Foobar2 Module: irc @@ -3171,37 +5627,51 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: mode changes are broken down into their component parts before being sent here, so the 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. + Description: Mode changes are broken down into their component parts before being sent here, so the 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. If it is a server mode, nick will be "", user\@host is the server name, and handle is \*. - - 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. - 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: + .. admonition:: Example + :collapsible: closed - Old script looks as follows:: + .. code-block:: tcl - bind mode - * mode_proc - proc mode_proc {nick uhost hand chan mode} { ... } + bind mode * "#lamest *" mode_proc + + proc mode_proc {nick user hand chan mode target} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, mode is $mode, target is $target" + } - To make it work with 1.3.18+ and stay compatible with older bots, do:: + Trigger and output:: - bind mode - * mode_proc_fix - proc mode_proc_fix {nick uhost hand chan mode {target ""}} { - if {$target != ""} {append mode " $target"} - mode_proc $nick $uhost $hand $chan $mode - } - proc mode_proc {nick uhost hand chan mode} { ... } + Foobar sets +o Guest on #lamest + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, mode is +o, target is Guest Module: irc (15) CTCP (stackable) bind ctcp - procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind ctcp * VERSION ctcp_proc + + proc ctcp_proc {nick user hand dest keyword text} { + putlog "Nick is $nick, user is $user, handle is $hand, destination is $dest, keyword is $keyword, text is $text" + return 0 + } + + Trigger and output:: + + Foobar sends a CTCP VERSION request to LamestBot + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, destination is LamestBot, keyword is VERSION, text is Module: server @@ -3211,7 +5681,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg) + Description: Just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg). + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind ctcr * VERSION ctcr_proc + + proc ctcr_proc {nick user hand dest keyword text} { + putlog "Nick is $nick, user is $user, handle is $hand, destination is $dest, keyword is $keyword, text is $text" + } + + Trigger and output:: + + Foobar sends a CTCP VERSION reply to LamestBot + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, destination is LamestBot, keyword is VERSION, text is Example client Module: server @@ -3225,6 +5711,23 @@ The following is a list of bind types and how they work. Below each bind type is Description: The mask can contain wildcards and is matched against the keyword, which is either a numeric, like "368", or a keyword, such as "PRIVMSG". "from" will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind). + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind raw - PRIVMSG raw_proc + + proc raw_proc {from keyword text} { + putlog "From is $from, keyword is $keyword, text is $text" + return 0 + } + + Trigger and output:: + + Foobar sends PRIVMSG LamestBot :hello world + From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is LamestBot :hello world + Module: server (18) BOT @@ -3233,7 +5736,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind bot - HELLO bot_proc + + proc bot_proc {from command text} { + putlog "From bot is $from, command is $command, text is $text" + } + + Trigger and output:: + + RemoteBot sends botnet message "HELLO hello world" + From bot is RemoteBot, command is HELLO, text is hello world Module: core @@ -3243,7 +5762,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind chon * "*" chon_proc + + proc chon_proc {hand idx} { + putlog "Handle is $hand, idx is $idx" + } + + Trigger and output:: + + foobar enters the party line + Handle is foobar, idx is 3 Module: core @@ -3253,7 +5788,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind chof * "*" chof_proc + + proc chof_proc {hand idx} { + putlog "Handle is $hand, idx is $idx" + } + + Trigger and output:: + + foobar leaves the party line + Handle is foobar, idx is 3 Module: core @@ -3263,7 +5814,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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'). + 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'). + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind sent * "*" sent_proc + + proc sent_proc {hand nick path} { + putlog "Handle is $hand, nick is $nick, path is $path" + } + + Trigger and output:: + + Foobar successfully downloads example.txt + Handle is foobar, nick is Foobar, path is example.txt Module: transfer @@ -3273,7 +5840,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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). + 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). + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind rcvd * "*" rcvd_proc + + proc rcvd_proc {hand nick path} { + putlog "Handle is $hand, nick is $nick, path is $path" + } + + Trigger and output:: + + Foobar successfully uploads example.txt + Handle is foobar, nick is Foobar, path is incoming/example.txt Module: transfer @@ -3283,10 +5866,26 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. Eggdrop passes the partyline channel number the user spoke on to the proc in "channel#". + 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. Eggdrop passes the partyline channel number the user spoke on to the proc in "channel#". NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind chat - "*" chat_proc + + proc chat_proc {hand chan text} { + putlog "Handle is $hand, channel is $chan, text is $text" + } + + Trigger and output:: + + hello world + Handle is foobar, channel is 0, text is hello world + Module: core (24) LINK (stackable) @@ -3295,7 +5894,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind link - "*" link_proc + + proc link_proc {bot via} { + putlog "Bot is $bot, via is $via" + } + + Trigger and output:: + + RemoteBot links to the botnet through LamestBot + Bot is RemoteBot, via is LamestBot Module: core @@ -3305,7 +5920,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind disc - "*" disc_proc + + proc disc_proc {bot} { + putlog "Bot is $bot" + } + + Trigger and output:: + + RemoteBot disconnects from the botnet + Bot is RemoteBot Module: core @@ -3315,7 +5946,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind splt * "#lamest *" splt_proc + + proc splt_proc {nick user hand chan} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" + } + + Trigger and output:: + + Foobar is detected as split from #lamest + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest Module: irc @@ -3325,7 +5972,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user\@host'. + Description: Someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user\@host'. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind rejn * "#lamest *" rejn_proc + + proc rejn_proc {nick user hand chan} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" + } + + Trigger and output:: + + Foobar rejoins #lamest after a split + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest Module: irc @@ -3335,7 +5998,24 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: party line and file system users have their text sent through filt before being processed. 'mask' is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. + Description: Party line and file system users have their text sent through filt before being processed. 'mask' is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind filt - "*" filt_proc + + proc filt_proc {idx text} { + putlog "Idx is $idx, text is $text" + return $text + } + + Trigger and output:: + + .who + Idx is 3, text is .who Module: core @@ -3345,12 +6025,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. - Example:: + .. admonition:: Example + :collapsible: closed - bind need - "% op" needop < handles only need op - bind need - "*" needall < handles all needs + .. code-block:: tcl + + bind need - "% op" need_proc + + proc need_proc {chan type} { + putlog "Channel is $chan, type is $type" + } + + Trigger and output:: + + LamestBot determines it needs operator status on #lamest + Channel is #lamest, type is op Module: irc @@ -3360,7 +6051,24 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind flud - pub flud_proc + + proc flud_proc {nick user hand type chan} { + putlog "Nick is $nick, user is $user, handle is $hand, type is $type, channel is $chan" + return 0 + } + + Trigger and output:: + + Foobar triggers the configured public-message flood threshold on #lamest + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, type is pub, channel is #lamest Module: server @@ -3370,7 +6078,24 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind note - foobar note_proc + + proc note_proc {from to text} { + putlog "From is $from, to is $to, text is $text" + return 0 + } + + Trigger and output:: + + OtherUser sends the note "hello world" to foobar + From is OtherUser, to is foobar, text is hello world Module: core @@ -3380,7 +6105,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind act - "*" act_proc + + proc act_proc {hand chan action} { + putlog "Handle is $hand, channel is $chan, action is $action" + } + + Trigger and output:: + + foobar performs the partyline action "waves" + Handle is foobar, channel is 0, action is waves Module: core @@ -3390,20 +6131,52 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind wall - "*" wall_proc + + proc wall_proc {from msg} { + putlog "From is $from, message is $msg" + return 0 + } + + Trigger and output:: + + irc.example.net sends WALLOPS :Example maintenance notice + From is irc.example.net, message is Example maintenance notice Module: server (34) BCST (stackable) bind bcst - procname - 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. + 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. 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'. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind bcst - "*" bcst_proc + + proc bcst_proc {bot chan text} { + putlog "Bot is $bot, channel is $chan, text is $text" + } + + Trigger and output:: + + RemoteBot broadcasts "hello botnet" + Bot is RemoteBot, channel is -1, text is hello botnet + Module: core (35) CHJN (stackable) @@ -3412,7 +6185,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind chjn - "*" chjn_proc + + proc chjn_proc {bot hand chan flag idx user} { + putlog "Bot is $bot, handle is $hand, channel is $chan, flag is $flag, idx is $idx, user is $user" + } + + Trigger and output:: + + foobar joins botnet channel 0 on LamestBot + Bot is LamestBot, handle is foobar, channel is 0, flag is @, idx is 3, user is foobar@127.0.0.1 Module: core @@ -3422,7 +6211,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind chpt - "*" chpt_proc + + proc chpt_proc {bot hand idx chan} { + putlog "Bot is $bot, handle is $hand, idx is $idx, channel is $chan" + } + + Trigger and output:: + + foobar leaves botnet channel 0 on LamestBot + Bot is LamestBot, handle is foobar, idx is 3, channel is 0 Module: core @@ -3432,7 +6237,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind time - "* * * * *" time_proc + + proc time_proc {minute hour day month year} { + putlog "Minute is $minute, hour is $hour, day is $day, month is $month, year is $year" + } + + Trigger and output:: + + The clock reaches 12:34 on September 13, 2026 + Minute is 34, hour is 12, day is 13, month is 08, year is 2026 Module: core @@ -3442,7 +6263,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind away - "*" away_proc + + proc away_proc {bot idx text} { + putlog "Bot is $bot, idx is $idx, text is $text" + } + + Trigger and output:: + + foobar sets the partyline away message to "Lunch" + Bot is LamestBot, idx is 3, text is Lunch Module: core @@ -3452,7 +6289,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. + Description: Triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind load - "*" load_proc + + proc load_proc {module} { + putlog "Module is $module" + } + + Trigger and output:: + + The irc module is loaded + Module is irc Module: core @@ -3462,9 +6315,25 @@ The following is a list of bind types and how they work. Below each bind type is procname - Description: triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards; + Description: Triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards;. flags are ignored. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind unld - "*" unld_proc + + proc unld_proc {module} { + putlog "Module is $module" + } + + Trigger and output:: + + The irc module is unloaded + Module is irc + Module: core (41) NKCH (stackable) @@ -3473,7 +6342,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind nkch - "*" nkch_proc + + proc nkch_proc {oldhand newhand} { + putlog "Old handle is $oldhand, new handle is $newhand" + } + + Trigger and output:: + + The local handle foobar is changed to foobar2 + Old handle is foobar, new handle is foobar2 Module: core @@ -3483,7 +6368,7 @@ The following is a list of bind types and how they work. Below each bind type is procname [arg] - Description: triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:: + Description: Triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:: sighup - called on a kill -HUP sigterm - called on a kill -TERM @@ -3506,6 +6391,22 @@ The following is a list of bind types and how they work. Below each bind type is Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop. + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind evnt - rehash evnt_proc + + proc evnt_proc {type {arg ""}} { + putlog "Type is $type, arg is $arg" + } + + Trigger and output:: + + A rehash event occurs + Type is rehash, arg is + Module: core (43) LOST (stackable) @@ -3514,7 +6415,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind lost - "*" lost_proc + + proc lost_proc {hand nick path bytes length} { + putlog "Handle is $hand, nick is $nick, path is $path, bytes transferred is $bytes, file length is $length" + } + + Trigger and output:: + + Foobar aborts example.txt after 1024 of 4096 bytes + Handle is foobar, nick is Foobar, path is example.txt, bytes transferred is 1024, file length is 4096 Module: transfer @@ -3524,7 +6441,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind tout - "*" tout_proc + + proc tout_proc {hand nick path bytes length} { + putlog "Handle is $hand, nick is $nick, path is $path, bytes transferred is $bytes, file length is $length" + } + + Trigger and output:: + + A DCC SEND of example.txt to Foobar times out after 1024 of 4096 bytes + Handle is foobar, nick is Foobar, path is example.txt, bytes transferred is 1024, file length is 4096 Module: transfer @@ -3534,7 +6467,24 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind out - "server *" out_proc + + proc out_proc {queue message status} { + putlog "Queue is $queue, message is $message, status is $status" + } + + Trigger and output:: + + putserv "PRIVMSG #lamest :Hello, Foobar!" + Queue is server, message is PRIVMSG #lamest :Hello, Foobar!, status is queued + Queue is server, message is PRIVMSG #lamest :Hello, Foobar!, status is sent Module: server @@ -3544,7 +6494,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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. + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind cron - "0 12 * * *" cron_proc + + proc cron_proc {minute hour day month weekday} { + putlog "Minute is $minute, hour is $hour, day is $day, month is $month, weekday is $weekday" + } + + Trigger and output:: + + The clock reaches 12:00 on September 13, 2026 + Minute is 0, hour is 12, day is 13, month is 9, weekday is 0 Module: core @@ -3554,7 +6520,23 @@ The following is a list of bind types and how they work. Below each bind type is procname - 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 '\*'. + 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 '*'. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind log - "#lamest *" log_proc + + proc log_proc {level channel message} { + putlog "Level is $level, channel is $channel, message is $message" + } + + Trigger and output:: + + A public message from Foobar is logged for #lamest + Level is p, channel is #lamest, message is Hello! Module: core @@ -3563,8 +6545,24 @@ The following is a list of bind types and how they work. Below each bind type is bind tls procname - - 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. + + Description: Triggered for TCP connections when an SSL/TLS handshake has completed and the connection is secured. The mask is matched against the idx of the connection. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind tls - "*" tls_proc + + proc tls_proc {idx} { + putlog "Idx is $idx" + } + + Trigger and output:: + + TLS negotiation completes for connection idx 3 + Idx is 3 Module: core @@ -3573,8 +6571,24 @@ The following is a list of bind types and how they work. Below each bind type is bind die procname - - 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. + + 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. + + .. admonition:: Example + :collapsible: closed + + .. code-block:: tcl + + bind die - "*" die_proc + + proc die_proc {reason} { + putlog "Shutdown reason is $reason" + } + + Trigger and output:: + + Eggdrop shuts down with the reason "Maintenance" + Shutdown reason is Maintenance Module: core @@ -3583,245 +6597,208 @@ The following is a list of bind types and how they work. Below each bind type is bind ircaway procname - - 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. - Module: irc + 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 support this capability; see the 'cap' Tcl command for more information 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, 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 with the bot. To trigger a proc only once per away change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword. -(51) INVT (stackable) + .. admonition:: Example + :collapsible: closed - bind invt + .. code-block:: tcl - procname + bind ircaway - "#lamest *" ircaway_proc - 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. + proc ircaway_proc {nick user hand channel msg} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $channel, message is $msg" + } -(52) RAWT (stackable) + Trigger and output:: - bind rawt + Foobar sets an away message of "Lunch" while on #lamest + Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Lunch - procname + Module: irc - Description: similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like "368", or a keyword, such as "PRIVMSG" or "TAGMSG". "from" will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. "tag" is a dictionary (flat key/value list) of the message tags with "" for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns 1, Eggdrop will not process the line any further, to include not being processed by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. +(51) INVT (stackable) -(53) ACCOUNT (stackable) + bind invt - bind account + procname - procname + Description: Triggered when Eggdrop receives 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 Eggdrop may be able to see invite messages for other people that are not the Eggdrop. - Description: this bind will trigger when eggdrop detects a change in the authentication status of a user's service account. The mask for the bind is in the format "#channel nick!user@hostname.com account" and accepts wildcards_. account is either the account name the user is logging in to or "*" if the user is not logged in to an account. + .. admonition:: Example + :collapsible: closed - NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see doc/ACCOUNTS for additional information. + .. code-block:: tcl -(54) ISUPPORT (stackable) + bind invt - "#lamest *" invt_proc - bind isupport + proc invt_proc {nick userhost channel invitee} { + putlog "Nick is $nick, user@host is $userhost, channel is $channel, invitee is $invitee" + } - procname - - 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. + Trigger and output:: - Module: server + Foobar invites LamestBot to #lamest + Nick is Foobar, user@host is foobar@127.0.0.1, channel is #lamest, invitee is LamestBot -(55) MONITOR (stackable) + Module: irc - bind monitor +(52) RAWT (stackable) - procname + bind rawt - Description: triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is '0' if the nickname disconnected, or '1' if the nickname connected. + procname - Module: irc + Description: Similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like "368", or a keyword, such as "PRIVMSG" or "TAGMSG". from will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. tags is a dictionary (flat key/value list) of the message tags with "" for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns 1, Eggdrop will not process the line any further, including processing by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. -(56) CHGHOST + .. admonition:: Example + :collapsible: closed - bind chghost + .. code-block:: tcl - procname + bind rawt - "PRIVMSG" rawt_proc - Description: triggered when a server sends an IRCv3 spec CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of "#channel nick!user\@host" and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed; the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. + proc rawt_proc {from keyword text tags} { + putlog "From is $from, keyword is $keyword, text is $text, tags are $tags" + } -(57) CHANSET + Trigger and output:: - bind chanset + @account=foobar :Foobar!foobar@127.0.0.1 PRIVMSG #lamest :Hello! + From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is #lamest :Hello!, tags are account foobar - procname + Module: server - Description: triggered when a channel setting is set via the partyline. flags is ignored, mask is the name of channel setting (not including any +/- prefix) and can contain wildcards. The proc will be called with the channel that the setting was set on, the text name of the setting that was changed, and the value it was set to (0/1 for -/+, string, or X:Y formatted value). +(53) ACCOUNT (stackable) -^^^^^^^^^^^^^ -Return Values -^^^^^^^^^^^^^ + bind account -Several bindings pay attention to the value you return from the proc(using 'return '). 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). + procname -Here's a list of the bindings that use the return value from procs they trigger: - -(1) MSG Return 1 to make Eggdrop log the command as:: + Description: This bind will trigger when Eggdrop detects a change in the authentication status of a user's services account. The mask for the bind is in the format "#channel nick!user@hostname.com account" and accepts wildcards. account is either the account name the user is logging in to or "*" if the user is not logged in to an account. - (nick!user@host) !handle! command + NOTE: The three required IRC components for account tracking are the WHOX feature, the extended-join IRCv3 capability, and the account-notify IRCv3 capability. If only some of the three features are available, Eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see doc/ACCOUNTS for additional information. -(2) DCC Return 1 to make Eggdrop log the command as:: + .. admonition:: Example + :collapsible: closed - #handle# command + .. code-block:: tcl -(3) FIL Return 1 to make Eggdrop log the command as:: + bind account - "#lamest *" account_proc - #handle# files: command + proc account_proc {nick user hand chan account} { + putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, account is $account" + } -(4) PUB Return 1 to make Eggdrop log the command as:: + Trigger and output:: - <> !handle! command + Foobar identifies to services as foobar while on #lamest + Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, account is foobar -(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). - -(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. + Module: irc -(7) FLUD Return 1 to ask the bot not to take action on the flood. Otherwise it will do its normal punishment. +(54) ISUPPORT (stackable) + + bind isupport -(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. + procname -(9) CHON Return 1 to ask the bot not to process the partyline join event. + 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 a 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. -(10) CHOF Return 1 to ask the bot not to process the partyline part event. + .. admonition:: Example + :collapsible: closed -(11) WALL Return 1 to make Eggdrop not log the message that triggered this bind. + .. code-block:: tcl -(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. + bind isupport - "CHANTYPES" isupport_proc -(13) MSGM Return 1 to make Eggdrop not log the message that triggered this bind. + proc isupport_proc {key isset value} { + putlog "Key is $key, isset is $isset, value is $value" + } -(14) PUBM Return 1 to make Eggdrop not log the message that triggered this bind. + Trigger and output:: -(15) NOTC Return 1 to make Eggdrop not log the message that triggered this bind. + The server advertises CHANTYPES=#& + Key is CHANTYPES, isset is 1, value is #& -(16) OUT Return 1 to make Eggdrop drop the message instead of sending it. Only meaningful for messages with status "queued". + Module: server -(17) EVNT Return 1 to make Eggdrop not to take the default action for the event. Used for signal type events, ignored for others. +(55) MONITOR (stackable) -(18) TLS Return 1 to disable verbose ssl information for the handshake. + bind monitor -(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. + procname -(20) CHANSET Return 1 to prevent the channel setting from being changed. + Description: Triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is '0' if the nickname disconnected, or '1' if the nickname connected. -Control Procedures ------------------- + .. admonition:: Example + :collapsible: closed -Using the 'control' command, you can put a DCC connection (or outgoing -TCP connection) in control of a script. All text received from the -connection is sent to the proc you specify. All outgoing text should -be sent with 'putdcc'. + .. code-block:: tcl -The control procedure is called with these parameters:: + bind monitor - "Foobar" monitor_proc - procname + proc monitor_proc {nick online} { + putlog "Nick is $nick, online is $online" + } -This allows you to use the same proc for several connections. The -idx will stay the same until the connection is dropped. After that, -it will probably get reused for a later connection. + Trigger and output:: -To indicate that the connection has closed, your control procedure -will be called with blank text (the input-text will be ""). This -is the only time it will ever be called with "" as the text, and it -is the last time your proc will be called for that connection. Don't -call killdcc on the idx when text is blank, it will always fail with -"invalid idx". + Foobar connects to the IRC network + Nick is Foobar, online is 1 -If you want to hand control of your connection back to Eggdrop, your -proc should return 1. Otherwise, return 0 to retain control. + Module: irc -TCP Connections ---------------- +(56) CHGHOST -Eggdrop allows you to make two types of TCP ("telnet") connections: -outgoing and incoming. For an outgoing connection, you specify the -remote host and port to connect to. For an incoming connection, you -specify a port to listen on. + bind chghost -All of the connections are *event driven*. This means that the bot will -trigger your procs when something happens on the connection, and your -proc is expected to return as soon as possible. Waiting in a proc for -more input is a no-no. + procname -To initiate an outgoing connection, use:: + Description: Triggered when a server sends an IRCv3 CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of "#channel nick!user@host" and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed, the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. - set idx [connect <[+]port>] - -For SSL connections, prefix the port with a plus sign. + .. admonition:: Example + :collapsible: closed -$idx now contains a new DCC entry for the outgoing connection. + .. code-block:: tcl -All connections use non-blocking (commonly called "asynchronous", -which is a misnomer) I/O. Without going into a big song and dance -about asynchronous I/O, what this means to you is: + bind chghost - "#lamest *" chghost_proc - * assume the connection succeeded immediately - * if the connection failed, an EOF will arrive for that idx + proc chghost_proc {nick oldhost hand channel newhost} { + putlog "Nick is $nick, old user@host is $oldhost, handle is $hand, channel is $channel, new user@host is $newhost" + } -The only time a 'connect' will return an error is if you give it a -hostname that can't be resolved (this is considered a "DNS error"). -Otherwise, it will appear to have succeeded. If the connection failed, -you will immediately get an EOF. + Trigger and output:: -Right after doing a 'connect' call, you should set up a 'control' for -the new idx (see the section above). From then on, the connection will -act just like a normal DCC connection that has been put under the control -of a script. If you ever return "1" from the control proc (indicating -that you want control to return to Eggdrop), the bot will just close the -connection and dispose of it. Other commands that work on normal DCC -connections, like 'killdcc' and 'putdcc', will work on this idx, too. -The 'killdcc' command will fail with "invalid idx" if you attempt to use -it on a closed socket. + Foobar changes host from foobar@127.0.0.1 to foobar@example.net on #lamest + Nick is Foobar, old user@host is foobar@127.0.0.1, handle is foobar, channel is #lamest, new user@host is foobar@example.net -To create a listen port, use:: + Module: irc - listen <[+]port> script +(57) CHANSET -By default, a listen port will allow both plaintext and SSL connections. -To restrict a port to allow only SSL connections, prefix the port with a -plus sign. - -Procs should be declared as:: + bind chanset - + procname -For example:: + Description: Triggered when a channel setting is set via the partyline. flags is ignored, mask is the name of channel setting (not including any +/- prefix) and can contain wildcards. The proc will be called with the channel that the setting was set on, the text name of the setting that was changed, and the value it was set to (0/1 for -/+, string, or X:Y formatted value). - listen 6687 script listen:grab + .. admonition:: Example + :collapsible: closed - proc listen:grab {newidx} { - control $newidx listen:control - } + .. code-block:: tcl -When 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. + bind chanset - "autoop" chanset_proc -Secure 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. + proc chanset_proc {chan setting value} { + putlog "Channel is $chan, setting is $setting, value is $value" + } -The 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. + Trigger and output:: -.. _wildcards: + .chanset #lamest +autoop + Channel is #lamest, setting is autoop, value is 1 -Match Characters ----------------- + Module: channels -Many of the bindings allow match characters in the arguments. Here -are the four special characters: - -+-----+--------------------------------------------------------------------------+ -| ? | matches any single character | -+-----+--------------------------------------------------------------------------+ -| \* | matches 0 or more characters of any type | -+-----+--------------------------------------------------------------------------+ -| % | matches 0 or more non-space characters (can be used to match a single | -| | word) (This character only works in binds, not in regular matching) | -+-----+--------------------------------------------------------------------------+ -| ~ | matches 1 or more space characters (can be used for whitespace between | -| | words) (This char only works in binds, not in regular matching) | -+-----+--------------------------------------------------------------------------+ -| \\* | matches a literal \*, but please note that Tcl needs escaping as well, | -| | so a bind would have to use "\\*" or {\*} for a mask argument | -+-----+--------------------------------------------------------------------------+ - - Copyright (C) 1999 - 2025 Eggheads Development Team From c9ab6d7cef49edbf5ce03c9c58d8eda1bf791a7e Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 13:33:31 -0400 Subject: [PATCH 2/9] More formatting --- doc/sphinx_source/using/tcl-commands.rst | 1060 ++++++++++++---------- 1 file changed, 600 insertions(+), 460 deletions(-) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 9a8d5a528..3e291a4e6 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -13,8 +13,9 @@ of the normal Tcl built-in commands are still there, of course, but you can also use these to manipulate features of the bot. They are listed according to category. -This list is accurate for Eggdrop v1.10.2. Most scripts written for the -1.6, 1.8, 1.9, and 1.10 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. +This list is accurate for Eggdrop v1.10.2. Most scripts written for the v1.3, v1.4, +1.6, 1.8, and 1.9 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. +Scripts which were written for v0.9, v1.0, v1.1 or v1.2 will probably not work without modification. Output Commands --------------- @@ -257,7 +258,7 @@ cap [arg] 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. "values" will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and "values" with a capability name as arg will list the values associated for the capability. "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. "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"]. - Returns: a list of CAP capabilities for the "enabled" and "ls" sub-commands; a dict of capability/value pairs for the "values" command or a list if "values" if followed by an argument; otherwise nothing. + Returns: a list of CAP capabilities for the ``enabled`` and ``ls`` sub-commands; a dict of capability/value pairs for the ``values`` command or a list if ``values`` if followed by an argument; otherwise nothing. .. admonition:: Example :collapsible: closed @@ -331,7 +332,7 @@ server list Description: Lists all servers currently added to the bots internal server list. - Returns: A list of lists in the format {{hostname} {port} {password}} + Returns: A list of lists in the format ``{{hostname} {port} {password}}`` .. admonition:: Example :collapsible: closed @@ -373,7 +374,7 @@ validuser Description: Checks whether a user with the specified handle exists in the bot's user database. - Returns: 1 if a user by that name exists; 0 otherwise + Returns: ``1`` if a user by that name exists; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -393,7 +394,7 @@ finduser [-account] Description: Finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. - Returns: the handle found, or "*" if none + Returns: the handle found, or ``*`` if none .. admonition:: Example :collapsible: closed @@ -412,7 +413,7 @@ userlist [flags] Description: Returns users from the bot's user database, optionally filtered by a flag mask. - Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/\|}[chan]{&/\|}[bot]). '&' specifies "and"; '|' specifies "or". + Returns: a list of users on the bot. You can use the flag matching system here ([global]``{&/\|}``[chan]``{&/\|}``[bot]). '&' specifies ``and``; '|' specifies ``or``. .. admonition:: Example :collapsible: closed @@ -430,7 +431,7 @@ passwdok Description: Checks the password given against the user's password. Check against the password "-" to find out if a user has no password set. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -448,29 +449,34 @@ getuser [entry-type] [extra info] 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: - +----------+-------------------------------------------------------------------------------------+ - | ACCOUNT | returns the list of service accounts associated with the user | - +----------+-------------------------------------------------------------------------------------+ - | BOTFL | returns the current bot-specific flags for the user (bot-only) | - +----------+-------------------------------------------------------------------------------------+ - | BOTADDR | returns a list containing the bot's address, bot listen port, and user listen port | - +----------+-------------------------------------------------------------------------------------+ - | HOSTS | returns a list of hosts for the user | - +----------+-------------------------------------------------------------------------------------+ - | LASTON | returns a list containing the unixtime last seen and the last seen place. | - | | LASTON #channel returns the time last seen time for the channel or 0 if no info | - | | exists. | - +----------+-------------------------------------------------------------------------------------+ - | INFO | returns the user's global info line | - +----------+-------------------------------------------------------------------------------------+ - | XTRA | returns the user's XTRA info | - +----------+-------------------------------------------------------------------------------------+ - | COMMENT | returns the master-visible only comment for the user | - +----------+-------------------------------------------------------------------------------------+ - | HANDLE | returns the user's handle as it is saved in the userfile | - +----------+-------------------------------------------------------------------------------------+ - | PASS | returns the user's encrypted password | - +----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``entry-type`` + - Description + * - ``ACCOUNT`` + - returns the list of service accounts associated with the user + * - ``BOTFL`` + - returns the current bot-specific flags for the user (bot-only) + * - ``BOTADDR`` + - returns a list containing the bot's address, bot listen port, and user listen port + * - ``HOSTS`` + - returns a list of hosts for the user + * - ``LASTON`` + - returns a list containing the unixtime last seen and the last seen place. + LASTON #channel returns the time last seen time for the channel or 0 if no info + exists. + * - ``INFO`` + - returns the user's global info line + * - ``XTRA`` + - returns the user's XTRA info + * - ``COMMENT`` + - returns the master-visible only comment for the user + * - ``HANDLE`` + - returns the user's handle as it is saved in the userfile + * - ``PASS`` + - returns the user's encrypted password For additional custom user fields, to include the deprecated "EMAIL" and "URL" fields, reference scripts/userinfo.tcl. @@ -492,38 +498,41 @@ setuser [extra info] 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. - +---------+---------------------------------------------------------------------------------------+ - | Type | Extra Info | - +=========+=======================================================================================+ - | ACCOUNT | [account] | - | | If no value is specified, all accounts for the user will be cleared. Otherwise, only | - | | a single account will be added to the account list | - +---------+---------------------------------------------------------------------------------------+ - | PASS | | - | | Password string (Empty value will clear the password) | - +---------+---------------------------------------------------------------------------------------+ - | BOTADDR |
[bot listen port] [user listen port] | - | | Sets address, bot listen port and user listen port. If no listen ports are | - | | specified, only the bot address is updated. If only the bot listen port is | - | | specified, both the bot and user listen ports are set to the bot listen port. | - +---------+---------------------------------------------------------------------------------------+ - | HOSTS | [hostmask] | - | | If no value is specified, all hosts for the user will be cleared. Otherwise, only | - | | *1* hostmask is added :P | - +---------+---------------------------------------------------------------------------------------+ - | LASTON | This setting has 3 forms. | - | | | - | | | - | | sets global LASTON time. Standard values used by Eggdrop for are partyline, | - | | linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to | - | | anything. | - | | | - | | | - | | sets global LASTON time (leaving the place field empty) | - | | | - | | | - | | sets a user's LASTON time for a channel (if it is a valid channel) | - +---------+---------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 9 91 + :header-rows: 1 + + * - ``entry-type`` + - Description + * - ``ACCOUNT`` + - [account] + If no value is specified, all accounts for the user will be cleared. Otherwise, only + a single account will be added to the account list + * - ``PASS`` + - ```` + Password string (Empty value will clear the password) + * - ``BOTADDR`` + - ``
`` [bot listen port] [user listen port] + Sets address, bot listen port and user listen port. If no listen ports are + specified, only the bot address is updated. If only the bot listen port is + specified, both the bot and user listen ports are set to the bot listen port. + * - ``HOSTS`` + - [hostmask] + If no value is specified, all hosts for the user will be cleared. Otherwise, only + *1* hostmask is added :P + * - ``LASTON`` + - This setting has 3 forms. + + ```` ```` + sets global LASTON time. Standard values used by Eggdrop for ```` are partyline, + linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to + anything. + + ```` + sets global LASTON time (leaving the place field empty) + + ```` ```` + sets a user's LASTON time for a channel (if it is a valid channel) Returns: nothing @@ -543,7 +552,7 @@ chhandle Description: Changes a user's handle. - Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can't be found + Returns: ``1`` on success; ``0`` if the new handle is invalid or already used, or if the user can't be found .. admonition:: Example :collapsible: closed @@ -562,7 +571,7 @@ chattr [changes [channel]] Description: Changes the attributes for a user record, if you include any. Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are specified in the format of \| , the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -580,7 +589,7 @@ botattr [changes [channel]] Description: Similar to chattr except this modifies bot flags rather than normal user attributes. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -604,7 +613,7 @@ matchattr [channel] 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. Please see `Flag Masks`_ for additional information on flag usage. - Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise + Returns: ``1`` if the specified user has the flags matching the provided mask; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -624,7 +633,7 @@ adduser [hostmask] Description: Creates a new user entry with the handle and hostmask given (with no password and the default flags). - Returns: 1 if successful; 0 if the handle already exists + Returns: ``1`` if successful; ``0`` if the handle already exists .. admonition:: Example :collapsible: closed @@ -648,7 +657,7 @@ addbot
[botport [userport]] NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments. NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored. - Returns: 1 if successful; 0 if the bot already exists or a port is invalid + Returns: ``1`` if successful; ``0`` if the bot already exists or a port is invalid .. admonition:: Example :collapsible: closed @@ -666,7 +675,7 @@ deluser Description: Attempts to erase the user record for a handle. - Returns: 1 if successful, 0 if no such user exists + Returns: ``1`` if successful, ``0`` if no such user exists .. admonition:: Example :collapsible: closed @@ -684,7 +693,7 @@ delhost Description: Deletes a hostmask from a user's host list. - Returns: 1 on success; 0 if the hostmask (or user) doesn't exist + Returns: ``1`` on success; ``0`` if the hostmask (or user) doesn't exist .. admonition:: Example :collapsible: closed @@ -702,7 +711,7 @@ addchanrec Description: Adds a channel record for a user. - Returns: 1 on success; 0 if the user or channel does not exist + Returns: ``1`` on success; ``0`` if the user or channel does not exist .. admonition:: Example :collapsible: closed @@ -720,7 +729,7 @@ delchanrec Description: Removes a channel record for a user. This includes all associated channel flags. - Returns: 1 on success; 0 if the user or channel does not exist + Returns: ``1`` on success; ``0`` if the user or channel does not exist .. admonition:: Example :collapsible: closed @@ -739,7 +748,7 @@ haschanrec Description: Checks whether a user has a channel record for the specified channel. - Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise + Returns: ``1`` if the given handle has a chanrec for the specified channel; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -796,9 +805,14 @@ newchanban [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the ban to be always active on a channel, even with dynamicbans on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the ban to be always active on a channel, even with dynamicbans on Returns: nothing @@ -821,9 +835,14 @@ newban [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the ban to be always active on a channel, even with dynamicbans on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the ban to be always active on a channel, even with dynamicbans on Returns: nothing @@ -845,9 +864,14 @@ newchanexempt [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the exempt to be always active on a channel, even with dynamicexempts on Returns: nothing @@ -869,9 +893,14 @@ newexempt [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the exempt to be always active on a channel, even with dynamicexempts on Returns: nothing @@ -893,9 +922,14 @@ newchaninvite [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the invite to be always active on a channel, even with dynamicinvites on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the invite to be always active on a channel, even with dynamicinvites on Returns: nothing @@ -917,9 +951,14 @@ newinvite [lifetime] [options] Options: - +-----------+-------------------------------------------------------------------------------------+ - | sticky | forces the invite to be always active on a channel, even with dynamicinvites on | - +-----------+-------------------------------------------------------------------------------------+ + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the invite to be always active on a channel, even with dynamicinvites on Returns: nothing @@ -939,7 +978,7 @@ stickban [channel] Description: Makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -957,7 +996,7 @@ unstickban [channel] Description: Makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -975,7 +1014,7 @@ stickexempt [channel] Description: Makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -993,7 +1032,7 @@ unstickexempt [channel] Description: Makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1010,7 +1049,7 @@ stickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: Makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1028,7 +1067,7 @@ unstickinvite [channel] Description: Makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1046,7 +1085,7 @@ killchanban Description: Removes a ban from the ban list for a channel. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1064,7 +1103,7 @@ killban Description: Removes a ban from the global ban list. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1082,7 +1121,7 @@ killchanexempt Description: Removes an exempt from the exempt list for a channel. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1100,7 +1139,7 @@ killexempt Description: Removes an exempt from the global exempt list. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1118,7 +1157,7 @@ killchaninvite Description: Removes an invite from the invite list for a channel. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1136,7 +1175,7 @@ killinvite Description: Removes an invite from the global invite list. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1154,7 +1193,7 @@ ischanjuped Description: Returns 1 if the channel is juped, and the bot is unable to join; 0 otherwise. - Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise + Returns: ``1`` if the channel is juped, and the bot is unable to join; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1172,7 +1211,7 @@ isban [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1190,7 +1229,7 @@ ispermban [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1208,7 +1247,7 @@ isexempt [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1226,7 +1265,7 @@ ispermexempt [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1244,7 +1283,7 @@ isinvite [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1262,7 +1301,7 @@ isperminvite [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1280,7 +1319,7 @@ isbansticky [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1298,7 +1337,7 @@ isexemptsticky [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1316,7 +1355,7 @@ isinvitesticky [channel [-channel]] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1334,7 +1373,7 @@ matchban [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1352,7 +1391,7 @@ matchexempt [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1370,7 +1409,7 @@ matchinvite [channel] Description: Returns 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that. - Returns: 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that + Returns: ``1`` if the specified nick!user\@host matches an invite in the global invite list; ``0`` otherwise. If a channel is specified, that channel's invite list is checked as well. .. admonition:: Example @@ -1459,7 +1498,7 @@ killignore ^^^^^^^^^^^^^^^^^^^^^ Description: Removes an entry from the ignore list. - Returns: 1 if successful; 0 otherwise + Returns: ``1`` if successful; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1495,7 +1534,7 @@ isignore Description: Returns 1 if the ignore is in the list; 0 otherwise. - Returns: 1 if the ignore is in the list; 0 otherwise + Returns: ``1`` if the ignore is in the list; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1566,7 +1605,7 @@ getting-users Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -1643,7 +1682,7 @@ channel get [setting] Description: Returns a channel setting, or all channel settings when no setting is specified. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -1772,7 +1811,7 @@ isbotnick Description: Checks whether the specified nickname is the bot's current nickname. - Returns: 1 if the nick matches the botnick; 0 otherwise + Returns: ``1`` if the nick matches the botnick; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1790,7 +1829,7 @@ botisop [channel] Description: Returns 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise. - Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise + Returns: ``1`` if the bot has ops on the specified channel (or any channel if no channel is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1808,7 +1847,7 @@ botishalfop [channel] Description: Returns 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise. - Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise + Returns: ``1`` if the bot has halfops on the specified channel (or any channel if no channel is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1826,7 +1865,7 @@ botisvoice [channel] Description: Returns 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise. - Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise + Returns: ``1`` if the bot has a voice on the specified channel (or any channel if no channel is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1844,7 +1883,7 @@ botonchan [channel] Description: Returns 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise. - Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise + Returns: ``1`` if the bot is on the specified channel (or any channel if no channel is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1862,7 +1901,7 @@ isop [channel] Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -1880,7 +1919,7 @@ ishalfop [channel] Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -1898,7 +1937,7 @@ wasop Description: Returns 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise. - Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise + Returns: ``1`` if someone that just got opped/deopped in the chan had op before the modechange; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1916,7 +1955,7 @@ washalfop Description: Returns 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise. - Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise + Returns: ``1`` if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -1934,7 +1973,7 @@ isvoice [channel] Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -1952,7 +1991,7 @@ isidentified [channel] Description: Determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses). - Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); 0 otherwise. + Returns: ``1`` if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); ``0`` otherwise. .. admonition:: Example :collapsible: closed @@ -1970,7 +2009,7 @@ isaway [channel] 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 w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. - Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; 0 otherwise. + Returns: ``1`` if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; ``0`` otherwise. .. admonition:: Example :collapsible: closed @@ -1988,7 +2027,7 @@ isircbot [channel] Description: Determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding "BOT=B" (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. - Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; 0 otherwise. + Returns: ``1`` if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; ``0`` otherwise. .. admonition:: Example :collapsible: closed @@ -2004,7 +2043,7 @@ onchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: Returns 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise. - Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise + Returns: ``1`` if someone by that nickname is on the specified channel (or any channel if none is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -2021,7 +2060,7 @@ monitor [nickname] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: Interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The 'add' command sends 'nickname' to the server to track. The 'delete' command removes 'nickname' from being tracked by the server (or returns an error if the nickname is not present). The 'list' command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The 'online' command returns a string of tracked nicknames that are currently online. The 'offline' command returns a list of tracked nicknames that are currently offline. - Returns: The 'add' sub-command returns a '1' if the nick was successfully added, a '0' if the nick is already in the monitor list, and a '2' if the nick could not be added. The 'delete' sub-command returns a '1' if the nick is removed, or an error if the nick is not found. The 'status' sub-command returns a '1' if 'nickname' is online or a 0 if 'nickname' is offline. The 'clear' command removes all nicknames from the list the server is monitoring. + Returns: The ``add`` sub-command returns a ``1`` if the nick was successfully added, a ``0`` if the nick is already in the monitor list, and a ``2`` if the nick could not be added. The ``delete`` sub-command returns a ``1`` if the nick is removed, or an error if the nick is not found. The ``status`` sub-command returns a ``1`` if ``nickname`` is online or a ``0`` if ``nickname`` is offline. The ``clear`` command removes all nicknames from the list the server is monitoring. .. admonition:: Example :collapsible: closed @@ -2039,7 +2078,7 @@ accounttracking Description: Checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). - Returns: a '1' if all three functionalities are present, a '0' if one or more are missing. + Returns: a ``1`` if all three functionalities are present, a ``0`` if one or more are missing. .. admonition:: Example :collapsible: closed @@ -2057,7 +2096,7 @@ getaccount [channel] Description: Returns the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. - Returns: the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. + Returns: the services account name associated with nickname, ``*`` if the user is not logged into services, or ``""`` if eggdrop does not know the account status of the user. NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. @@ -2076,7 +2115,7 @@ nick2hand [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2094,7 +2133,7 @@ account2nicks [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2112,7 +2151,7 @@ hand2nick [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2130,7 +2169,7 @@ hand2nicks [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2148,7 +2187,7 @@ handonchan [channel] Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -2166,7 +2205,7 @@ ischanban Description: Returns 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel). - Returns: 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) + Returns: ``1`` if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) .. admonition:: Example :collapsible: closed @@ -2184,7 +2223,7 @@ ischanexempt Description: Returns 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel). - Returns: 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) + Returns: ``1`` if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) .. admonition:: Example :collapsible: closed @@ -2202,7 +2241,7 @@ ischaninvite Description: Returns 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel). - Returns: 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) + Returns: ``1`` if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) .. admonition:: Example :collapsible: closed @@ -2220,7 +2259,7 @@ chanbans Description: Returns a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. - Returns: a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + Returns: a list of the current bans on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view .. admonition:: Example :collapsible: closed @@ -2238,7 +2277,7 @@ chanexempts Description: Returns a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. - Returns: a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + Returns: a list of the current exempts on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view .. admonition:: Example :collapsible: closed @@ -2256,7 +2295,7 @@ chaninvites Description: Returns a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. - Returns: a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view + Returns: a list of the current invites on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view .. admonition:: Example :collapsible: closed @@ -2363,17 +2402,22 @@ resetchan [flags] 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: - +-----+------------------------------+ - | b | channel bans | - +-----+------------------------------+ - | e | channel exempts | - +-----+------------------------------+ - | I | channel invites | - +-----+------------------------------+ - | m | channel modes | - +-----+------------------------------+ - | w | memberlist (who & away info) | - +-----+------------------------------+ + .. list-table:: + :widths: 14 86 + :header-rows: 1 + + * - ``flags`` + - Description + * - ``b`` + - channel bans + * - ``e`` + - channel exempts + * - ``I`` + - channel invites + * - ``m`` + - channel modes + * - ``w`` + - memberlist (who & away info) Returns: nothing @@ -2393,19 +2437,24 @@ refreshchan [flags] 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: - +-----+------------------------------+ - | b | channel bans | - +-----+------------------------------+ - | e | channel exempts | - +-----+------------------------------+ - | I | channel invites | - +-----+------------------------------+ - | m | channel modes | - +-----+------------------------------+ - | t | channel topic | - +-----+------------------------------+ - | w | memberlist (who & away info) | - +-----+------------------------------+ + .. list-table:: + :widths: 14 86 + :header-rows: 1 + + * - ``flags`` + - Description + * - ``b`` + - channel bans + * - ``e`` + - channel exempts + * - ``I`` + - channel invites + * - ``m`` + - channel modes + * - ``t`` + - channel topic + * - ``w`` + - memberlist (who & away info) Returns: nothing @@ -2425,7 +2474,7 @@ getchanhost [channel] Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2443,7 +2492,7 @@ getchanjoin Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2461,7 +2510,7 @@ onchansplit [channel] Description: Returns 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise. - Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise + Returns: ``1`` if that nick is split from the channel (or any channel if no channel is specified); ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -2499,7 +2548,7 @@ getchanidle Description: Returns number of minutes that person has been idle; -1 if the specified user isn't on the channel. - Returns: number of minutes that person has been idle; -1 if the specified user isn't on the channel + Returns: number of minutes that person has been idle; ``-1`` if the specified user isn't on the channel .. admonition:: Example :collapsible: closed @@ -2517,7 +2566,7 @@ getchanmode Description: Returns string of the type "+ntik key" for the channel specified. - Returns: string of the type "+ntik key" for the channel specified + Returns: string of the type ``+ntik key`` for the channel specified .. admonition:: Example :collapsible: closed @@ -2607,7 +2656,7 @@ validchan 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. - Returns: 1 if the channel exists, 0 if not + Returns: ``1`` if the channel exists, ``0`` if not .. admonition:: Example :collapsible: closed @@ -2625,7 +2674,7 @@ isdynamic Description: Returns 1 if the channel is a dynamic channel; 0 otherwise. - Returns: 1 if the channel is a dynamic channel; 0 otherwise + Returns: ``1`` if the channel is a dynamic channel; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -2715,7 +2764,7 @@ chansettype Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2753,7 +2802,7 @@ isupport isset Description: Returns 0/1 depending on whether the key has a value. - Returns: 0 or 1 + Returns: ``0`` or ``1`` .. admonition:: Example :collapsible: closed @@ -2884,7 +2933,7 @@ hand2idx Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -2920,7 +2969,7 @@ valididx Description: Returns 1 if the idx currently exists; 0 otherwise. - Returns: 1 if the idx currently exists; 0 otherwise + Returns: ``1`` if the idx currently exists; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -2938,7 +2987,7 @@ getchan Description: 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. - 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 + 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 .. admonition:: Example :collapsible: closed @@ -3027,25 +3076,30 @@ strip [+/-strip-flags] Description: Modifies the strip-flags for a user. The supported strip-flags are: - +------+-------------------------------------------------------------+ - | c | remove all color codes | - +------+-------------------------------------------------------------+ - | b | remove all boldface codes | - +------+-------------------------------------------------------------+ - | r | remove all reverse video codes | - +------+-------------------------------------------------------------+ - | u | remove all underline codes | - +------+-------------------------------------------------------------+ - | a | remove all ANSI codes | - +------+-------------------------------------------------------------+ - | g | remove all ctrl-g (bell) codes | - +------+-------------------------------------------------------------+ - | o | remove all ordinary codes (ctrl+o, terminates bold/color/..)| - +------+-------------------------------------------------------------+ - | i | remove all italics codes | - +------+-------------------------------------------------------------+ - | \* | remove all of the above | - +------+-------------------------------------------------------------+ + .. list-table:: + :widths: 9 91 + :header-rows: 1 + + * - ``strip-flags`` + - Description + * - ``c`` + - remove all color codes + * - ``b`` + - remove all boldface codes + * - ``r`` + - remove all reverse video codes + * - ``u`` + - remove all underline codes + * - ``a`` + - remove all ANSI codes + * - ``g`` + - remove all ctrl-g (bell) codes + * - ``o`` + - remove all ordinary codes (ctrl+o, terminates bold/color/..) + * - ``i`` + - remove all italics codes + * - ``\*`` + - remove all of the above Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted) @@ -3167,17 +3221,22 @@ botlist Description: 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: - 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: + 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``: + + .. list-table:: + :widths: 18 82 + :header-rows: 1 - +----------+-----------------------------------------------+ - | bot | the bot's botnetnick | - +----------+-----------------------------------------------+ - | uplink | the bot the bot is connected to | - +----------+-----------------------------------------------+ - | version | it's current numeric version | - +----------+-----------------------------------------------+ - | sharing | a "+" if the bot is a sharebot; "-" otherwise | - +----------+-----------------------------------------------+ + * - Element + - Description + * - ``bot`` + - the bot's botnetnick + * - ``uplink`` + - the bot the bot is connected to + * - ``version`` + - it's current numeric version + * - ``sharing`` + - a ``+`` if the bot is a sharebot; ``-`` otherwise .. admonition:: Example :collapsible: closed @@ -3195,7 +3254,7 @@ islinked Description: Returns 1 if the bot is currently linked; 0 otherwise. - Returns: 1 if the bot is currently linked; 0 otherwise + Returns: ``1`` if the bot is currently linked; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -3232,9 +3291,9 @@ dcclist [type] Description: Returns a list of active connections, each item in the list is a sublist containing seven elements: Returns: a list of active connections, each item in the list is a sublist containing seven elements: - { <[+]port> {} }. + ``{ <[+]port> {} }``. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -3254,30 +3313,35 @@ socklist [type] 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: - +----------+--------------------------------------------------------+ - | idx | integer value assigned to Eggdrop connections | - +----------+--------------------------------------------------------+ - | handle | possible values are (telnet), (bots), (users), | - | | (script) for a listening socket, or the handle of the | - | | connected user for an established connection | - +----------+--------------------------------------------------------+ - | host | the hostname of the connection, if it is known; | - | | otherwise a * | - +----------+--------------------------------------------------------+ - | ip | the ip of the connection | - +----------+--------------------------------------------------------+ - | port | the port number associated with the connection (local | - | | port for listening connections, remote port for server | - | | connections. | - +----------+--------------------------------------------------------+ - | secure | 1 if SSL/TLS is used for the connect; 0 otherwise | - +----------+--------------------------------------------------------+ - | type | the type of connection (TELNET, CHAT, SERVER, etc) | - +----------+--------------------------------------------------------+ - | info | extra information associated with the connection | - +----------+--------------------------------------------------------+ - | time | timestamp of when the socket was established | - +----------+--------------------------------------------------------+ + .. list-table:: + :widths: 15 85 + :header-rows: 1 + + * - Key + - Description + * - ``idx`` + - integer value assigned to Eggdrop connections + * - ``handle`` + - possible values are (telnet), (bots), (users), + (script) for a listening socket, or the handle of the + connected user for an established connection + * - ``host`` + - the hostname of the connection, if it is known; + otherwise a * + * - ``ip`` + - the ip of the connection + * - ``port`` + - the port number associated with the connection (local + port for listening connections, remote port for server + connections. + * - ``secure`` + - 1 if SSL/TLS is used for the connect; 0 otherwise + * - ``type`` + - the type of connection (TELNET, CHAT, SERVER, etc) + * - ``info`` + - extra information associated with the connection + * - ``time`` + - timestamp of when the socket was established .. admonition:: Example :collapsible: closed @@ -3295,7 +3359,7 @@ whom Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -3331,7 +3395,7 @@ getdccaway Description: Returns away message for a dcc chat user (or "" if the user is not set away). - Returns: away message for a dcc chat user (or "" if the user is not set away) + Returns: away message for a dcc chat user (or ``""`` if the user is not set away) .. admonition:: Example :collapsible: closed @@ -3452,9 +3516,9 @@ notes [numberlist] Description: 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: - 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:: + 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:: - { } + ``{ }`` .. admonition:: Example :collapsible: closed @@ -3472,7 +3536,7 @@ erasenotes Description: Erases some or all stored notes for a user. Use '-' to erase all notes. - Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes. + Returns: ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, or number of erased notes. .. admonition:: Example :collapsible: closed @@ -3490,7 +3554,7 @@ listnotes Description: Lists existing notes according to the numberlist (ex: "2-4;8;16-"). - Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes. + Returns: ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, list of existing notes. .. admonition:: Example :collapsible: closed @@ -3508,7 +3572,7 @@ storenote Description: Stores a note for later reading, notifies idx of any results (use idx -1 for no notify). - Returns: 0 on success; non-0 on failure + Returns: ``0`` on success; non-``0`` on failure .. admonition:: Example :collapsible: closed @@ -3606,7 +3670,7 @@ iscompressed Description: Determines whether is gzip compressed. . - Returns: 1 if it is, 0 if it isn't, and 2 if some kind of error prevented the checks from succeeding. + Returns: ``1`` if it is, ``0`` if it isn't, and ``2`` if some kind of error prevented the checks from succeeding. .. admonition:: Example :collapsible: closed @@ -3700,20 +3764,25 @@ dccsend Returns: - +-------+---------------------------------------------------------------------+ - | 0 | success | - +-------+---------------------------------------------------------------------+ - | 1 | the dcc table is full (too many connections) | - +-------+---------------------------------------------------------------------+ - | 2 | can't open a socket for the transfer | - +-------+---------------------------------------------------------------------+ - | 3 | the file doesn't exist | - +-------+---------------------------------------------------------------------+ - | 4 | the file was queued for later transfer, which means that person has | - | | too many file transfers going right now | - +-------+---------------------------------------------------------------------+ - | 5 | the file could not be opened or temporary file could not be created | - +-------+---------------------------------------------------------------------+ + .. list-table:: + :widths: 9 91 + :header-rows: 1 + + * - Return value + - Description + * - ``0`` + - success + * - ``1`` + - the dcc table is full (too many connections) + * - ``2`` + - can't open a socket for the transfer + * - ``3`` + - the file doesn't exist + * - ``4`` + - the file was queued for later transfer, which means that person has + too many file transfers going right now + * - ``5`` + - the file could not be opened or temporary file could not be created .. admonition:: Example :collapsible: closed @@ -3731,7 +3800,7 @@ filesend [ircnick] 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. - Returns: 0 on failure; 1 on success (either an immediate send or a queued send) + Returns: ``0`` on failure; ``1`` on success (either an immediate send or a queued send) .. admonition:: Example :collapsible: closed @@ -3749,7 +3818,7 @@ fileresend [ircnick] 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. - Returns: 0 on failure; 1 on success (either an immediate send or a queued send) + Returns: ``0`` on failure; ``1`` on success (either an immediate send or a queued send) .. admonition:: Example :collapsible: closed @@ -3895,11 +3964,16 @@ getfilesendtime Returns: the unixtime value from when a file transfer started, or a negative number: - +-----+------------------------------------------------------+ - | -1 | no matching transfer with the specified idx was found| - +-----+------------------------------------------------------+ - | -2 | the idx matches an entry which is not a file transfer| - +-----+------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``-1`` + - no matching transfer with the specified idx was found + * - ``-2`` + - the idx matches an entry which is not a file transfer .. admonition:: Example :collapsible: closed @@ -3919,15 +3993,20 @@ mkdir [ [channel]] Returns: - +-----+------------------------------------------------------+ - | 0 | success | - +-----+------------------------------------------------------+ - | 1 | can't create directory | - +-----+------------------------------------------------------+ - | 2 | directory exists but is not a directory | - +-----+------------------------------------------------------+ - | -3 | could not open filedb | - +-----+------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``0`` + - success + * - ``1`` + - can't create directory + * - ``2`` + - directory exists but is not a directory + * - ``-3`` + - could not open filedb .. admonition:: Example :collapsible: closed @@ -3945,7 +4024,7 @@ rmdir Description: Removes a directory from the file system. - Returns: 0 on success; 1 on failure + Returns: ``0`` on success; ``1`` on failure .. admonition:: Example :collapsible: closed @@ -3965,15 +4044,20 @@ mv Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned: - +-----+------------------------------------------------------+ - | -1 | invalid source file | - +-----+------------------------------------------------------+ - | -2 | invalid destination | - +-----+------------------------------------------------------+ - | -3 | destination file exists | - +-----+------------------------------------------------------+ - | -4 | no matches found | - +-----+------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``-1`` + - invalid source file + * - ``-2`` + - invalid destination + * - ``-3`` + - destination file exists + * - ``-4`` + - no matches found .. admonition:: Example :collapsible: closed @@ -3993,15 +4077,20 @@ cp Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned: - +-----+------------------------------------------------------+ - | -1 | invalid source file | - +-----+------------------------------------------------------+ - | -2 | invalid destination | - +-----+------------------------------------------------------+ - | -3 | destination file exists | - +-----+------------------------------------------------------+ - | -4 | no matches found | - +-----+------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``-1`` + - invalid source file + * - ``-2`` + - invalid destination + * - ``-3`` + - destination file exists + * - ``-4`` + - no matches found .. admonition:: Example :collapsible: closed @@ -4036,7 +4125,7 @@ setflags [ [channel]] Description: Sets the flags required to access a directory. - Returns: 0 on success; -1 or -3 on failure + Returns: ``0`` on success; ``-1`` or ``-3`` on failure .. admonition:: Example :collapsible: closed @@ -4058,7 +4147,7 @@ encpass2 Description: Returns a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. - Returns: a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + Returns: a hash in the format of ``$pbkdf2-$rounds=$$`` where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. .. admonition:: Example :collapsible: closed @@ -4076,7 +4165,7 @@ pbkdf2 [-bin] Description: Returns a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. - Returns: a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + Returns: a derived key from the provided ``pass`` string using ``salt`` and ``rounds`` count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. .. admonition:: Example :collapsible: closed @@ -4134,7 +4223,7 @@ binds [type/mask] Description: By default, lists Tcl binds registered with the Eggdrop. You can specify 'all' to view all binds, 'tcl' to view Tcl binds, and 'python' to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. Returns: a list of Tcl binds, each item in the list is a sublist of five elements: - { } + ``{ }`` .. admonition:: Example :collapsible: closed @@ -4154,45 +4243,50 @@ logfile [ ] Logfile flags: - +-----+---------------------------------------------------------------------+ - | b | information about bot linking and userfile sharing | - +-----+---------------------------------------------------------------------+ - | c | commands | - +-----+---------------------------------------------------------------------+ - | d | misc debug information | - +-----+---------------------------------------------------------------------+ - | g | raw outgoing share traffic | - +-----+---------------------------------------------------------------------+ - | h | raw incoming share traffic | - +-----+---------------------------------------------------------------------+ - | j | joins, parts, quits, topic changes, and netsplits on the channel | - +-----+---------------------------------------------------------------------+ - | k | kicks, bans, and mode changes on the channel | - +-----+---------------------------------------------------------------------+ - | l | linked bot messages | - +-----+---------------------------------------------------------------------+ - | m | private msgs, notices and ctcps to the bot | - +-----+---------------------------------------------------------------------+ - | o | misc info, errors, etc (IMPORTANT STUFF) | - +-----+---------------------------------------------------------------------+ - | p | public text on the channel | - +-----+---------------------------------------------------------------------+ - | r | raw incoming server traffic | - +-----+---------------------------------------------------------------------+ - | s | server connects, disconnects, and notices | - +-----+---------------------------------------------------------------------+ - | t | raw incoming botnet traffic | - +-----+---------------------------------------------------------------------+ - | u | raw outgoing botnet traffic | - +-----+---------------------------------------------------------------------+ - | v | raw outgoing server traffic | - +-----+---------------------------------------------------------------------+ - | w | wallops (make sure the bot sets +w in init-server) | - +-----+---------------------------------------------------------------------+ - | x | file transfers and file-area commands | - +-----+---------------------------------------------------------------------+ - - Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lamest lame.log} + .. list-table:: + :widths: 7 93 + :header-rows: 1 + + * - ``modes`` + - Description + * - ``b`` + - information about bot linking and userfile sharing + * - ``c`` + - commands + * - ``d`` + - misc debug information + * - ``g`` + - raw outgoing share traffic + * - ``h`` + - raw incoming share traffic + * - ``j`` + - joins, parts, quits, topic changes, and netsplits on the channel + * - ``k`` + - kicks, bans, and mode changes on the channel + * - ``l`` + - linked bot messages + * - ``m`` + - private msgs, notices and ctcps to the bot + * - ``o`` + - misc info, errors, etc (IMPORTANT STUFF) + * - ``p`` + - public text on the channel + * - ``r`` + - raw incoming server traffic + * - ``s`` + - server connects, disconnects, and notices + * - ``t`` + - raw incoming botnet traffic + * - ``u`` + - raw outgoing botnet traffic + * - ``v`` + - raw outgoing server traffic + * - ``w`` + - wallops (make sure the bot sets +w in init-server) + * - ``x`` + - file transfers and file-area commands + + Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: ``{mco * eggdrop.log}`` ``{jp #lamest lame.log}`` .. admonition:: Example :collapsible: closed @@ -4214,27 +4308,32 @@ maskhost [masktype] Available types are: - +-----+------------------------------------------------------+ - | 0 | \*!user\@host | - +-----+------------------------------------------------------+ - | 1 | \*!*user\@host | - +-----+------------------------------------------------------+ - | 2 | \*!*\@host | - +-----+------------------------------------------------------+ - | 3 | \*!*user\@*.host | - +-----+------------------------------------------------------+ - | 4 | \*!*\@*.host | - +-----+------------------------------------------------------+ - | 5 | nick!user\@host | - +-----+------------------------------------------------------+ - | 6 | nick!*user\@host | - +-----+------------------------------------------------------+ - | 7 | nick!*\@host | - +-----+------------------------------------------------------+ - | 8 | nick!*user\@*.host | - +-----+------------------------------------------------------+ - | 9 | nick!*\@*.host | - +-----+------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``masktype`` + - Description + * - ``0`` + - \*!user\@host + * - ``1`` + - \*!*user\@host + * - ``2`` + - \*!*\@host + * - ``3`` + - \*!*user\@*.host + * - ``4`` + - \*!*\@*.host + * - ``5`` + - nick!user\@host + * - ``6`` + - nick!*user\@host + * - ``7`` + - nick!*\@host + * - ``8`` + - nick!*user\@*.host + * - ``9`` + - nick!*\@*.host You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the @@ -4258,7 +4357,7 @@ timer [count [timerName]] 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. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of "timer". - Returns: a timerName + Returns: a ``timerName`` .. admonition:: Example :collapsible: closed @@ -4276,7 +4375,7 @@ utimer [count [timerName]] 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. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of "timer". - Returns: a timerName + Returns: a ``timerName`` .. admonition:: Example :collapsible: closed @@ -4422,7 +4521,7 @@ ctime Description: 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". - 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" + 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`` .. admonition:: Example :collapsible: closed @@ -4458,7 +4557,7 @@ rand Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -4496,19 +4595,24 @@ sendnote Returns: - +-----+----------------------------------------------------------+ - | 0 | the send failed | - +-----+----------------------------------------------------------+ - | 1 | the note was delivered locally or sent to another bot | - +-----+----------------------------------------------------------+ - | 2 | the note was stored locally | - +-----+----------------------------------------------------------+ - | 3 | the user's notebox is too full to store a note | - +-----+----------------------------------------------------------+ - | 4 | a Tcl binding caught the note | - +-----+----------------------------------------------------------+ - | 5 | the note was stored because the user is away | - +-----+----------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``0`` + - the send failed + * - ``1`` + - the note was delivered locally or sent to another bot + * - ``2`` + - the note was stored locally + * - ``3`` + - the user's notebox is too full to store a note + * - ``4`` + - a Tcl binding caught the note + * - ``5`` + - the note was stored because the user is away .. admonition:: Example :collapsible: closed @@ -4526,7 +4630,7 @@ link [via-bot] Description: Attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. - Returns: 1 if the link will be attempted; 0 otherwise + Returns: ``1`` if the link will be attempted; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -4544,7 +4648,7 @@ unlink [comment] Description: Attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. - Returns: 1 on success; 0 otherwise + Returns: ``1`` on success; ``0`` otherwise .. admonition:: Example :collapsible: closed @@ -4562,7 +4666,7 @@ encrypt Description: 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.0. - 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.0. + 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.0. .. admonition:: Example :collapsible: closed @@ -4580,7 +4684,7 @@ decrypt Description: 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). - 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). + 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). .. admonition:: Example :collapsible: closed @@ -4716,7 +4820,7 @@ traffic Description: 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). - 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). + 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). .. admonition:: Example :collapsible: closed @@ -4733,7 +4837,7 @@ modules ^^^^^^^ Description: 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. - 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. + 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. .. admonition:: Example :collapsible: closed @@ -4751,7 +4855,7 @@ loadmodule Description: Attempts to load the specified module. - Returns: "Already loaded." if the module is already loaded, "" if successful, or the reason the module couldn't be loaded. + Returns: ``Already loaded.`` if the module is already loaded, ``""`` if successful, or the reason the module couldn't be loaded. .. admonition:: Example :collapsible: closed @@ -4769,7 +4873,7 @@ unloadmodule Description: Attempts to unload the specified module. - Returns: "No such module" if the module is not loaded, "" otherwise. + Returns: ``No such module`` if the module is not loaded, ``""`` otherwise. .. admonition:: Example :collapsible: closed @@ -4877,25 +4981,30 @@ stripcodes Description: Strips specified control characters from the string given. strip-flags can be any combination of the following: - +-----+-------------------------------------------------------------+ - | c | remove all color codes | - +-----+-------------------------------------------------------------+ - | b | remove all boldface codes | - +-----+-------------------------------------------------------------+ - | r | remove all reverse video codes | - +-----+-------------------------------------------------------------+ - | u | remove all underline codes | - +-----+-------------------------------------------------------------+ - | a | remove all ANSI codes | - +-----+-------------------------------------------------------------+ - | g | remove all ctrl-g (bell) codes | - +-----+-------------------------------------------------------------+ - | o | remove all ordinary codes (ctrl+o, terminates bold/color/..)| - +-----+-------------------------------------------------------------+ - | i | remove all italics codes | - +-----+-------------------------------------------------------------+ - | \* | remove all of the above | - +-----+-------------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``strip-flags`` + - Description + * - ``c`` + - remove all color codes + * - ``b`` + - remove all boldface codes + * - ``r`` + - remove all reverse video codes + * - ``u`` + - remove all underline codes + * - ``a`` + - remove all ANSI codes + * - ``g`` + - remove all ctrl-g (bell) codes + * - ``o`` + - remove all ordinary codes (ctrl+o, terminates bold/color/..) + * - ``i`` + - remove all italics codes + * - ``\*`` + - remove all of the above Returns: the stripped string. @@ -4915,7 +5024,7 @@ matchaddr
Description: Checks if the address matches the hostmask given. The address should be in the form nick!user\@host. - Returns: 1 if the address matches the hostmask, 0 otherwise. + Returns: ``1`` if the address matches the hostmask, ``0`` otherwise. .. admonition:: Example :collapsible: closed @@ -4934,7 +5043,7 @@ matchcidr
Description: Performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. - Returns: 1 if the address matches the block prefix, 0 otherwise. + Returns: ``1`` if the address matches the block prefix, ``0`` otherwise. .. admonition:: Example :collapsible: closed @@ -4952,7 +5061,7 @@ matchstr 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. - Returns: 1 if the pattern matches the string, 0 if it doesn't. + Returns: ``1`` if the pattern matches the string, ``0`` if it doesn't. .. admonition:: Example :collapsible: closed @@ -4970,7 +5079,7 @@ rfcequal Description: Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []\^, depending on the rfc_compliant setting. - Returns: 1 if equal, 0 if not. + Returns: ``1`` if equal, ``0`` if not. .. admonition:: Example :collapsible: closed @@ -4988,15 +5097,20 @@ status [type] Description: Provides eggdrop status information similar to the .status command in partyline. The available types of information are: - +------+---------------------------------------------------------------------+ - | cpu | total cpu time spent by eggdrop | - +------+---------------------------------------------------------------------+ - | mem | dynamically allocated memory excluding the Tcl interpreter | - +------+---------------------------------------------------------------------+ - | cache| user entries cache hits (in %) | - +------+---------------------------------------------------------------------+ - | ipv6 | shows whether IPv6 support was compiled in | - +------+---------------------------------------------------------------------+ + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``type`` + - Description + * - ``cpu`` + - total cpu time spent by eggdrop + * - ``mem`` + - dynamically allocated memory excluding the Tcl interpreter + * - ``cache`` + - user entries cache hits (in %) + * - ``ipv6`` + - shows whether IPv6 support was compiled in Returns: the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. @@ -5016,7 +5130,7 @@ istls Description: Checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. - Returns: 1 if the idx is a TLS connection, 0 if it's plaintext. + Returns: ``1`` if the idx is a TLS connection, ``0`` if it's plaintext. .. admonition:: Example :collapsible: closed @@ -5112,15 +5226,20 @@ numversion* ^^^^^^^^^^^ Value: the current numeric bot version (for example: "1.10.21"). Numerical version is in the format of "MNNRRPP", where: - +------+---------------------------------------+ - | M | major release number | - +------+---------------------------------------+ - | NN | minor release number | - +------+---------------------------------------+ - | RR | sub-release number | - +------+---------------------------------------+ - | PP | patch level for that sub-release | - +------+---------------------------------------+ + .. list-table:: + :widths: 13 87 + :header-rows: 1 + + * - MNNRRPP component + - Description + * - ``M`` + - major release number + * - ``NN`` + - minor release number + * - ``RR`` + - sub-release number + * - ``PP`` + - patch level for that sub-release Module: core @@ -5223,37 +5342,40 @@ You will commonly see flag masks for global flags written "ov"; this is the same Some additional examples: -+----------------+-----------------------------------------------------------------------------------------------------+ -| Flag Mask | Action | -+================+=====================================================================================================+ -| m, +m, m|* | Checks if the user has the m global flag | -+----------------+-----------------------------------------------------------------------------------------------------+ -| +mn | Checks if the user has the m OR n global flag | -+----------------+-----------------------------------------------------------------------------------------------------+ -| \\|+mn | Checks if the user has the m OR n channel flag | -+----------------+-----------------------------------------------------------------------------------------------------+ -| \\|+mn #lamest | Checks if the user has the m OR n channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| &+mn | Checks if the user has the m AND n channel flag | -+----------------+-----------------------------------------------------------------------------------------------------+ -| &mn #lamest | Checks if the user has the m AND n channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| \\|+o #lamest | Checks if the user has the o channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| +o|+n #lamest | Checks if the user has the o global flag OR the n channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| +m&+v #lamest | Checks if the user has the m global flag AND the v channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| -m | Checks if the user does not have the m global flag | -+----------------+-----------------------------------------------------------------------------------------------------+ -| \\|-n #lamest | Checks if the user does not have the n channel flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| +m|-n #lamest | Checks if the user has the global m flag OR does not have a channel n flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| -n&-m #lamest | Checks if the user does not have the global n flag AND does not have the channel m flag for #lamest | -+----------------+-----------------------------------------------------------------------------------------------------+ -| ||+b | Checks if the user has the bot flag b | -+----------------+-----------------------------------------------------------------------------------------------------+ +.. list-table:: + :widths: 14 86 + :header-rows: 1 + + * - Flag Mask + - Description + * - ``m``, ``+m``, ``m|*`` + - Checks if the user has the m global flag + * - ``+mn`` + - Checks if the user has the m OR n global flag + * - ``\\|+mn`` + - Checks if the user has the m OR n channel flag + * - \\|+mn #lamest + - Checks if the user has the m OR n channel flag for #lamest + * - ``&+mn`` + - Checks if the user has the m AND n channel flag + * - ``&mn #lamest`` + - Checks if the user has the m AND n channel flag for #lamest + * - \\|+o #lamest + - Checks if the user has the o channel flag for #lamest + * - ``+o|+n #lamest`` + - Checks if the user has the o global flag OR the n channel flag for #lamest + * - ``+m&+v #lamest`` + - Checks if the user has the m global flag AND the v channel flag for #lamest + * - ``-m`` + - Checks if the user does not have the m global flag + * - \\|-n #lamest + - Checks if the user does not have the n channel flag for #lamest + * - ``+m|-n #lamest`` + - Checks if the user has the global m flag OR does not have a channel n flag for #lamest + * - ``-n&-m #lamest`` + - Checks if the user does not have the global n flag AND does not have the channel m flag for #lamest + * - ``||+b`` + - Checks if the user has the bot flag b As a side note, Tcl scripts historically have used a '-' to skip processing of a flag type (Example: -\|o). It is unknown where and why this practice started, but as a style tip, Eggdrop developers recommend using a '\*' to skip processing, so as not to confuse a single "-" meaning "skip processing" with a preceding "-ov" which means "not these flags". @@ -5630,6 +5752,24 @@ The following is a list of bind types and how they work. Below each bind type is Description: Mode changes are broken down into their component parts before being sent here, so the 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. If it is a server mode, nick will be "", user\@host is the server name, and handle is \*. + + 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. + + 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: + + Old script looks as follows:: + + bind mode - * mode_proc + proc mode_proc {nick uhost hand chan mode} { ... } + + To make it work with 1.3.18+ and stay compatible with older bots, do:: + + bind mode - * mode_proc_fix + proc mode_proc_fix {nick uhost hand chan mode {target ""}} { + if {$target != ""} {append mode " $target"} + mode_proc $nick $uhost $hand $chan $mode + } + proc mode_proc {nick uhost hand chan mode} { ... } .. admonition:: Example :collapsible: closed From c7bc822b223155c6fc95015763cb17036ba53cb7 Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 13:57:54 -0400 Subject: [PATCH 3/9] Redo command formatting/order --- doc/sphinx_source/using/tcl-commands.rst | 8586 +++++++++++++++++----- 1 file changed, 6895 insertions(+), 1691 deletions(-) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 3e291a4e6..87d9708ff 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -17,20 +17,45 @@ This list is accurate for Eggdrop v1.10.2. Most scripts written for the v1.3, v1 1.6, 1.8, and 1.9 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. Scripts which were written for v0.9, v1.0, v1.1 or v1.2 will probably not work without modification. +.. note:: + + **Command notation:** Command headings show the complete Tcl signature and can be linked to directly. + ```` denotes a required argument, while ``[argument]`` denotes an optional argument. + Literal values, flags, identifiers, module names, and exact return values are shown in monospace. + Examples are collapsed by default. + Output Commands --------------- +.. _tcl-putserv: + ^^^^^^^^^^^^^^^^^^^^^^^^ putserv [options] ^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + ``-next`` + Push messages to the front of the queue + ``-normal`` + No effect + + Returns + nothing + + .. raw:: html + +
+ + Module + ``server`` - Options: - -next push messages to the front of the queue - -normal no effect - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -39,20 +64,39 @@ putserv [options] putserv "PRIVMSG #lamest :Hello from LamestBot!" +.. raw:: html + +
- Module: server +.. _tcl-puthelp: ^^^^^^^^^^^^^^^^^^^^^^^^ puthelp [options] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends text to the server, like 'putserv', but it uses a different queue intended for sending messages to channels or people. + Description + Sends text to the server, like ``putserv``, but it uses a different queue intended for sending messages to channels or people. + + Options + ``-next`` + Push messages to the front of the queue + ``-normal`` + No effect + + Returns + nothing + + .. raw:: html + +
+ + Module + ``server`` + - Options: - -next push messages to the front of the queue - -normal no effect + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -61,20 +105,39 @@ puthelp [options] puthelp "PRIVMSG #lamest :Hello, Foobar!" +.. raw:: html - Module: server +
+ +.. _tcl-putquick: ^^^^^^^^^^^^^^^^^^^^^^^^^ putquick [options] ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends text to the server, like 'putserv', but it uses a different (and faster) queue. + Description + Sends text to the server, like ``putserv``, but it uses a different (and faster) queue. + + Options + ``-next`` + Push messages to the front of the queue + ``-normal`` + No effect + + Returns + nothing + + .. raw:: html - Options: - -next push messages to the front of the queue - -normal no effect +
- Returns: nothing + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -83,19 +146,37 @@ putquick [options] putquick "NOTICE Foobar :This message uses the quick queue." +.. raw:: html + +
- Module: server +.. _tcl-putnow: ^^^^^^^^^^^^^^^^^^^^^^^^ putnow [-oneline] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server. + Description + Sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server. - Options: - -oneline send text up to the first \r or \n, discarding the rest + Options + ``-oneline`` + Send text up to the first \r or \n, discarding the rest - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -104,16 +185,33 @@ putnow [-oneline] putnow "PING :irc.example.net" +.. raw:: html - Module: server +
+ +.. _tcl-putkick: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putkick [reason] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends kicks to the server and tries to put as many nicks into one kick command as possible. + Description + Sends kicks to the server and tries to put as many nicks into one kick command as possible. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -122,16 +220,33 @@ putkick [reason] putkick "#lamest" Foobar "Example kick reason" +.. raw:: html + +
- Module: irc +.. _tcl-putlog: ^^^^^^^^^^^^^ putlog ^^^^^^^^^^^^^ - Description: Logs to the logfile and partyline if the 'misc' flag (o) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description + Logs ```` to the logfile and partyline if the ``misc`` flag (o) is active via the ``logfile`` config file setting and the ``.console`` partyline setting, respectively. + + Returns + nothing + + .. raw:: html - Returns: nothing +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -140,16 +255,33 @@ putlog putlog "LamestBot loaded the example script." +.. raw:: html - Module: core +
+ +.. _tcl-putcmdlog: ^^^^^^^^^^^^^^^^ putcmdlog ^^^^^^^^^^^^^^^^ - Description: Logs to the logfile and partyline if the 'cmds' flag (c) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description + Logs ```` to the logfile and partyline if the ``cmds`` flag (c) is active via the ``logfile`` config file setting and the ``.console`` partyline setting, respectively. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -158,16 +290,33 @@ putcmdlog putcmdlog "Foobar used an example command." +.. raw:: html + +
- Module: core +.. _tcl-putxferlog: ^^^^^^^^^^^^^^^^^ putxferlog ^^^^^^^^^^^^^^^^^ - Description: Logs to the logfile and partyline if the 'files' flag (x) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. + Description + Logs ```` to the logfile and partyline if the ``files`` flag (x) is active via the ``logfile`` config file setting and the ``.console`` partyline setting, respectively. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -176,16 +325,33 @@ putxferlog putxferlog "Example file transfer completed." +.. raw:: html - Module: core +
+ +.. _tcl-putloglev: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putloglev ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Logs to the logfile and partyline at the log level of the specified flag. Use "*" in lieu of a flag to indicate all log levels. + Description + Logs ```` to the logfile and partyline at the log level of the specified flag. Use ``*`` in lieu of a flag to indicate all log levels. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -194,16 +360,33 @@ putloglev putloglev o "#lamest" "Example log message." +.. raw:: html + +
- Module: core +.. _tcl-dumpfile: ^^^^^^^^^^^^^^^^^^^^^^^^^^ dumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -212,17 +395,34 @@ dumpfile dumpfile Foobar help.txt +.. raw:: html - Module: core +
+ +.. _tcl-queuesize: ^^^^^^^^^^^^^^^^^ queuesize [queue] ^^^^^^^^^^^^^^^^^ - Description: Returns the number of messages waiting in Eggdrop's output queues. + Description + Returns the number of messages waiting in Eggdrop's output queues. + + + 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. + + .. raw:: html +
- 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. + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -231,16 +431,33 @@ queuesize [queue] set queued [queuesize server] +.. raw:: html + +
- Module: server +.. _tcl-clearqueue: ^^^^^^^^^^^^^^^^^^ clearqueue ^^^^^^^^^^^^^^^^^^ - Description: Removes all messages from a queue. Valid arguments are: mode, server, help, or all. + Description + Removes all messages from a queue. Valid arguments are: mode, server, help, or all. - Returns: the number of deleted lines from the specified queue. + Returns + the number of deleted lines from the specified queue. + + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -249,16 +466,33 @@ clearqueue set removed [clearqueue help] +.. raw:: html - Module: server +
+ +.. _tcl-cap: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cap [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. "values" will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and "values" with a capability name as arg will list the values associated for the capability. "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. "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"]. + 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. ``values`` will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and ``values`` with a capability name as arg will list the values associated for the capability. ``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. ``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``]. + + Returns + a list of CAP capabilities for the ``enabled`` and ``ls`` sub-commands; a dict of capability/value pairs for the ``values`` command or a list if ``values`` if followed by an argument; otherwise nothing. - Returns: a list of CAP capabilities for the ``enabled`` and ``ls`` sub-commands; a dict of capability/value pairs for the ``values`` command or a list if ``values`` if followed by an argument; otherwise nothing. + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -267,17 +501,34 @@ cap [arg] set capabilities [cap ls] +.. raw:: html + +
- Module: server +.. _tcl-tagmsg: ^^^^^^^^^^^^^^^^^^^^^^ tagmsg ^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + + Returns + nothing + .. raw:: html - Returns: nothing +
+ + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -287,52 +538,103 @@ tagmsg set tags [dict create +example value] tagmsg $tags "#lamest" +.. raw:: html - Module: server +
+ +.. _tcl-server-add: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server add [[+]port [password]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — Add a server :collapsible: closed .. code-block:: tcl server add irc.example.net +6697 +.. raw:: html - Module: server +
+ +.. _tcl-server-remove: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server remove [[+]port] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — Remove a server :collapsible: closed .. code-block:: tcl server remove irc.example.net +6697 +.. raw:: html - Module: server +
+ +.. _tcl-server-list: ^^^^^^^^^^^ server list ^^^^^^^^^^^ - Description: Lists all servers currently added to the bots internal server list. + Description + Lists all servers currently added to the bots internal server list. + + Returns + A list of lists in the format ``{{hostname} {port} {password}}`` + + .. raw:: html + +
- Returns: A list of lists in the format ``{{hostname} {port} {password}}`` + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -341,20 +643,33 @@ server list set servers [server list] - - Module: server - User Record Manipulation Commands --------------------------------- +.. _tcl-countusers: + ^^^^^^^^^^ countusers ^^^^^^^^^^ - Description: Returns the number of users in the bot's user database. + Description + Returns the number of users in the bot's user database. + + + Returns + number of users in the bot's database + .. raw:: html - Returns: number of users in the bot's database +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -364,17 +679,34 @@ countusers set usercount [countusers] putlog "LamestBot has $usercount users." +.. raw:: html - Module: core +
+ +.. _tcl-validuser: ^^^^^^^^^^^^^^^^^^ validuser ^^^^^^^^^^^^^^^^^^ - Description: Checks whether a user with the specified handle exists in the bot's user database. + Description + Checks whether a user with the specified handle exists in the bot's user database. + + + Returns + ``1`` if a user by that name exists; ``0`` otherwise + + .. raw:: html +
- Returns: ``1`` if a user by that name exists; ``0`` otherwise + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -385,16 +717,33 @@ validuser putlog "The handle foobar exists." } +.. raw:: html + +
- Module: core +.. _tcl-finduser: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ finduser [-account] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. + Description + Finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. + + Returns + the handle found, or ``*`` if none + + .. raw:: html + +
+ + Module + ``core`` - Returns: the handle found, or ``*`` if none + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -403,17 +752,34 @@ finduser [-account] set handle [finduser "Foobar!foobar@127.0.0.1"] +.. raw:: html - Module: core +
+ +.. _tcl-userlist: ^^^^^^^^^^^^^^^^ userlist [flags] ^^^^^^^^^^^^^^^^ - Description: Returns users from the bot's user database, optionally filtered by a flag mask. + Description + Returns users from the bot's user database, optionally filtered by a flag mask. + + + Returns + a list of users on the bot. You can use the flag matching system here ([global]``{&/\|}``[chan]``{&/\|}``[bot]). '&' specifies ``and``; '|' specifies ``or``. + + .. raw:: html + +
+ + Module + ``core`` - Returns: a list of users on the bot. You can use the flag matching system here ([global]``{&/\|}``[chan]``{&/\|}``[bot]). '&' specifies ``and``; '|' specifies ``or``. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -422,16 +788,33 @@ userlist [flags] set users [userlist] +.. raw:: html + +
- Module: core +.. _tcl-passwdok: ^^^^^^^^^^^^^^^^^^^^^^^^ passwdok ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Checks the password given against the user's password. Check against the password "-" to find out if a user has no password set. + Description + Checks the password given against the user's password. Check against the password ``-`` to find out if a user has no password set. + + 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. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - 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. +
.. admonition:: Example :collapsible: closed @@ -440,47 +823,64 @@ passwdok set valid [passwdok foobar "example-password"] +.. raw:: html - Module: core +
+ +.. _tcl-getuser: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getuser [entry-type] [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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: + 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: + + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``entry-type`` + - Description + * - ``ACCOUNT`` + - returns the list of service accounts associated with the user + * - ``BOTFL`` + - returns the current bot-specific flags for the user (bot-only) + * - ``BOTADDR`` + - returns a list containing the bot's address, bot listen port, and user listen port + * - ``HOSTS`` + - returns a list of hosts for the user + * - ``LASTON`` + - returns a list containing the unixtime last seen and the last seen place. + LASTON #channel returns the time last seen time for the channel or 0 if no info + exists. + * - ``INFO`` + - returns the user's global info line + * - ``XTRA`` + - returns the user's XTRA info + * - ``COMMENT`` + - returns the master-visible only comment for the user + * - ``HANDLE`` + - returns the user's handle as it is saved in the userfile + * - ``PASS`` + - returns the user's encrypted password + + For additional custom user fields, to include the deprecated ``EMAIL`` and ``URL`` fields, reference ``scripts/userinfo.tcl.`` - .. list-table:: - :widths: 11 89 - :header-rows: 1 + Returns + info specific to each entry-type - * - ``entry-type`` - - Description - * - ``ACCOUNT`` - - returns the list of service accounts associated with the user - * - ``BOTFL`` - - returns the current bot-specific flags for the user (bot-only) - * - ``BOTADDR`` - - returns a list containing the bot's address, bot listen port, and user listen port - * - ``HOSTS`` - - returns a list of hosts for the user - * - ``LASTON`` - - returns a list containing the unixtime last seen and the last seen place. - LASTON #channel returns the time last seen time for the channel or 0 if no info - exists. - * - ``INFO`` - - returns the user's global info line - * - ``XTRA`` - - returns the user's XTRA info - * - ``COMMENT`` - - returns the master-visible only comment for the user - * - ``HANDLE`` - - returns the user's handle as it is saved in the userfile - * - ``PASS`` - - returns the user's encrypted password + .. raw:: html - For additional custom user fields, to include the deprecated "EMAIL" and "URL" fields, reference scripts/userinfo.tcl. +
- Returns: info specific to each entry-type + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -489,52 +889,69 @@ getuser [entry-type] [extra info] set hosts [getuser foobar HOSTS] +.. raw:: html + +
- Module: core +.. _tcl-setuser: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setuser [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. - .. list-table:: - :widths: 9 91 - :header-rows: 1 + .. list-table:: + :widths: 9 91 + :header-rows: 1 - * - ``entry-type`` - - Description - * - ``ACCOUNT`` - - [account] - If no value is specified, all accounts for the user will be cleared. Otherwise, only - a single account will be added to the account list - * - ``PASS`` - - ```` - Password string (Empty value will clear the password) - * - ``BOTADDR`` - - ``
`` [bot listen port] [user listen port] - Sets address, bot listen port and user listen port. If no listen ports are - specified, only the bot address is updated. If only the bot listen port is - specified, both the bot and user listen ports are set to the bot listen port. - * - ``HOSTS`` - - [hostmask] - If no value is specified, all hosts for the user will be cleared. Otherwise, only - *1* hostmask is added :P - * - ``LASTON`` - - This setting has 3 forms. + * - ``entry-type`` + - Description + * - ``ACCOUNT`` + - [account] + If no value is specified, all accounts for the user will be cleared. Otherwise, only + a single account will be added to the account list + * - ``PASS`` + - ```` + Password string (Empty value will clear the password) + * - ``BOTADDR`` + - ``
`` [bot listen port] [user listen port] + Sets address, bot listen port and user listen port. If no listen ports are + specified, only the bot address is updated. If only the bot listen port is + specified, both the bot and user listen ports are set to the bot listen port. + * - ``HOSTS`` + - [hostmask] + If no value is specified, all hosts for the user will be cleared. Otherwise, only + *1* hostmask is added :P + * - ``LASTON`` + - This setting has 3 forms. - ```` ```` - sets global LASTON time. Standard values used by Eggdrop for ```` are partyline, - linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to - anything. + ```` ```` + sets global LASTON time. Standard values used by Eggdrop for ```` are partyline, + linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to + anything. - ```` - sets global LASTON time (leaving the place field empty) + ```` + sets global LASTON time (leaving the place field empty) - ```` ```` - sets a user's LASTON time for a channel (if it is a valid channel) + ```` ```` + sets a user's LASTON time for a channel (if it is a valid channel) - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -543,16 +960,33 @@ setuser [extra info] setuser foobar INFO "Example user information" +.. raw:: html - Module: core +
+ +.. _tcl-chhandle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chhandle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Changes a user's handle. + Description + Changes a user's handle. + + Returns + ``1`` on success; ``0`` if the new handle is invalid or already used, or if the user can't be found - Returns: ``1`` on success; ``0`` if the new handle is invalid or already used, or if the user can't be found + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -561,17 +995,34 @@ chhandle set changed [chhandle foobar foobar2] +.. raw:: html + +
- Module: core +.. _tcl-chattr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Changes the attributes for a user record, if you include any. - Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are specified in the format of \| , the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too. + Description + Changes the attributes for a user record, if you include any. + Changes are of the form ``+f``, ``-o``, ``+dk``, ``-o+d``, etc. If changes are specified in the format of \|```` ````, the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too. + + 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. + + .. raw:: html - 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. +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -580,16 +1031,33 @@ chattr [changes [channel]] set flags [chattr foobar +o "#lamest"] +.. raw:: html - Module: core +
+ +.. _tcl-botattr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ botattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Similar to chattr except this modifies bot flags rather than normal user attributes. + Description + Similar to chattr except this modifies bot flags rather than normal user attributes. + + 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. + + .. raw:: html + +
- 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. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -598,24 +1066,41 @@ botattr [changes [channel]] set flags [botattr OtherBot] +.. _matchattr: + +.. raw:: html - Module: core +
-.. _matchattr: +.. _tcl-matchattr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchattr [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Checks if the flags of the specified user match the flags provided. "flags" is of the form:: + Description + Checks if the flags of the specified user match the flags provided. ``flags`` is of the form:: - [+/-][&/|[&/|]] + [+/-][&/|[&/|]] - 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. Please see `Flag Masks`_ for additional information on flag usage. + 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. Please see `Flag Masks`_ for additional information on flag usage. - Returns: ``1`` if the specified user has the flags matching the provided mask; ``0`` otherwise + Returns + ``1`` if the specified user has the flags matching the provided mask; ``0`` otherwise - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Check user flags :collapsible: closed .. code-block:: tcl @@ -624,16 +1109,33 @@ matchattr [channel] putlog "foobar has the requested flags." } +.. raw:: html + +
- Module: core +.. _tcl-adduser: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ adduser [hostmask] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Creates a new user entry with the handle and hostmask given (with no password and the default flags). + Description + Creates a new user entry with the handle and hostmask given (with no password and the default flags). + + Returns + ``1`` if successful; ``0`` if the handle already exists + + .. raw:: html - Returns: ``1`` if successful; ``0`` if the handle already exists +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -642,22 +1144,40 @@ adduser [hostmask] set added [adduser foobar "Foobar!foobar@127.0.0.1"] +.. raw:: html - Module: core +
+ +.. _tcl-addbot: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addbot
[botport [userport]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Adds a new bot to the userlist with the handle and botaddress given (with no password and no flags).
format is one of: - - ipaddress - - ipv4address:botport/userport [DEPRECATED] - - [ipv6address]:botport/userport [DEPRECATED] + Description + Adds a new bot to the userlist with the handle and botaddress given (with no password and no flags). ``
`` format is one of: + + - ipaddress + - ipv4address:botport/userport [DEPRECATED] + - [ipv6address]:botport/userport [DEPRECATED] NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments. NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored. - Returns: ``1`` if successful; ``0`` if the bot already exists or a port is invalid + Returns + ``1`` if successful; ``0`` if the bot already exists or a port is invalid + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -666,16 +1186,33 @@ NOTE 2: In the deprecated formats, an additional botport and/or userport given a set added [addbot OtherBot 127.0.0.1] +.. raw:: html - Module: core +
+ +.. _tcl-deluser: ^^^^^^^^^^^^^^^^ deluser ^^^^^^^^^^^^^^^^ - Description: Attempts to erase the user record for a handle. + Description + Attempts to erase the user record for a handle. + + Returns + ``1`` if successful, ``0`` if no such user exists + + .. raw:: html + +
- Returns: ``1`` if successful, ``0`` if no such user exists + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -684,16 +1221,33 @@ deluser set deleted [deluser foobar] +.. raw:: html + +
- Module: core +.. _tcl-delhost: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ delhost ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Deletes a hostmask from a user's host list. + Description + Deletes a hostmask from a user's host list. + + Returns + ``1`` on success; ``0`` if the hostmask (or user) doesn't exist + + .. raw:: html + +
+ + Module + ``core`` - Returns: ``1`` on success; ``0`` if the hostmask (or user) doesn't exist + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -702,16 +1256,33 @@ delhost set result [delhost foobar "Foobar!foobar@127.0.0.1"] +.. raw:: html - Module: core +
+ +.. _tcl-addchanrec: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Adds a channel record for a user. + Description + Adds a channel record for a user. + + Returns + ``1`` on success; ``0`` if the user or channel does not exist + + .. raw:: html + +
+ + Module + ``channels`` + - Returns: ``1`` on success; ``0`` if the user or channel does not exist + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -720,16 +1291,33 @@ addchanrec set added [addchanrec foobar "#lamest"] +.. raw:: html + +
- Module: channels +.. _tcl-delchanrec: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ delchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes a channel record for a user. This includes all associated channel flags. + Description + Removes a channel record for a user. This includes all associated channel flags. + + Returns + ``1`` on success; ``0`` if the user or channel does not exist + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html - Returns: ``1`` on success; ``0`` if the user or channel does not exist +
.. admonition:: Example :collapsible: closed @@ -738,17 +1326,34 @@ delchanrec set deleted [delchanrec foobar "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-haschanrec: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ haschanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Checks whether a user has a channel record for the specified channel. + Description + Checks whether a user has a channel record for the specified channel. + + + Returns + ``1`` if the given handle has a chanrec for the specified channel; ``0`` otherwise + + .. raw:: html +
- Returns: ``1`` if the given handle has a chanrec for the specified channel; ``0`` otherwise + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -757,17 +1362,34 @@ haschanrec set has_record [haschanrec foobar "#lamest"] +.. raw:: html + +
- Module: channels +.. _tcl-getchaninfo: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a user's info line for the specified channel. + Description + Returns a user's info line for the specified channel. - Returns: info line for a specific channel (behaves just like 'getinfo') + Returns + info line for a specific channel (behaves just like 'getinfo') + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -776,16 +1398,33 @@ getchaninfo set info [getchaninfo foobar "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-setchaninfo: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sets the info line on a specific channel for a user. If info is "none", it will be removed. + Description + Sets the info line on a specific channel for a user. If info is ``none``, it will be removed. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -794,57 +1433,91 @@ setchaninfo setchaninfo foobar "#lamest" "Example channel information" +.. raw:: html + +
- Module: channels +.. _tcl-newchanban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Options: + Options - .. list-table:: - :widths: 11 89 - :header-rows: 1 + .. list-table:: + :widths: 11 89 + :header-rows: 1 - * - ``options`` - - Description - * - ``sticky`` - - forces the ban to be always active on a channel, even with dynamicbans on + * - ``options`` + - Description + * - ``sticky`` + - forces the ban to be always active on a channel, even with dynamicbans on - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — Add a channel ban :collapsible: closed .. code-block:: tcl newchanban "#lamest" "*!*@127.0.0.1" foobar "Example text" +.. raw:: html + +
- Module: channels +.. _tcl-newban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + + .. list-table:: + :widths: 11 89 + :header-rows: 1 - Options: + * - ``options`` + - Description + * - ``sticky`` + - forces the ban to be always active on a channel, even with dynamicbans on - .. list-table:: - :widths: 11 89 - :header-rows: 1 + Returns + nothing - * - ``options`` - - Description - * - ``sticky`` - - forces the ban to be always active on a channel, even with dynamicbans on + .. raw:: html - Returns: nothing +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -853,27 +1526,44 @@ newban [lifetime] [options] newban "*!*@127.0.0.1" foobar "Example text" +.. raw:: html - Module: channels +
+ +.. _tcl-newchanexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the exempt to be always active on a channel, even with dynamicexempts on - Options: + Returns + nothing - .. list-table:: - :widths: 11 89 - :header-rows: 1 + .. raw:: html - * - ``options`` - - Description - * - ``sticky`` - - forces the exempt to be always active on a channel, even with dynamicexempts on +
- Returns: nothing + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -882,27 +1572,44 @@ newchanexempt [lifetime] [options] newchanexempt "#lamest" "*!*@127.0.0.1" foobar "Example text" +.. raw:: html + +
- Module: channels +.. _tcl-newexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the exempt to be always active on a channel, even with dynamicexempts on + + Returns + nothing - Options: + .. raw:: html - .. list-table:: - :widths: 11 89 - :header-rows: 1 +
- * - ``options`` - - Description - * - ``sticky`` - - forces the exempt to be always active on a channel, even with dynamicexempts on + Module + ``channels`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -911,27 +1618,44 @@ newexempt [lifetime] [options] newexempt "*!*@127.0.0.1" foobar "Example text" +.. raw:: html - Module: channels +
+ +.. _tcl-newchaninvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchaninvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the invite to be always active on a channel, even with dynamicinvites on + + Returns + nothing + + .. raw:: html - Options: +
- .. list-table:: - :widths: 11 89 - :header-rows: 1 + Module + ``channels`` - * - ``options`` - - Description - * - ``sticky`` - - forces the invite to be always active on a channel, even with dynamicinvites on - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -940,27 +1664,44 @@ newchaninvite [lifetime] [options] newchaninvite "#lamest" "*!*@127.0.0.1" foobar "Example text" +.. raw:: html + +
- Module: channels +.. _tcl-newinvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newinvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Options + + .. list-table:: + :widths: 11 89 + :header-rows: 1 + + * - ``options`` + - Description + * - ``sticky`` + - forces the invite to be always active on a channel, even with dynamicinvites on + + Returns + nothing + + .. raw:: html + +
- Options: + Module + ``channels`` - .. list-table:: - :widths: 11 89 - :header-rows: 1 - * - ``options`` - - Description - * - ``sticky`` - - forces the invite to be always active on a channel, even with dynamicinvites on + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -969,16 +1710,33 @@ newinvite [lifetime] [options] newinvite "*!*@127.0.0.1" foobar "Example text" +.. raw:: html - Module: channels +
+ +.. _tcl-stickban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. + Description + Makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
- Returns: ``1`` on success; ``0`` otherwise + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -987,16 +1745,33 @@ stickban [channel] set result [stickban "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-unstickban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description + Makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. - Returns: ``1`` on success; ``0`` otherwise + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1005,16 +1780,33 @@ unstickban [channel] set result [unstickban "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-stickexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. + Description + Makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. + + Returns + ``1`` on success; ``0`` otherwise - Returns: ``1`` on success; ``0`` otherwise + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1023,16 +1815,33 @@ stickexempt [channel] set result [stickexempt "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-unstickexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description + Makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html - Returns: ``1`` on success; ``0`` otherwise +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1041,15 +1850,33 @@ unstickexempt [channel] set result [unstickexempt "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-stickinvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. - Returns: ``1`` on success; ``0`` otherwise + Description + Makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1058,16 +1885,33 @@ stickinvite [channel] set result [stickinvite "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-unstickinvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + Description + Makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
- Returns: ``1`` on success; ``0`` otherwise + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1076,16 +1920,33 @@ unstickinvite [channel] set result [unstickinvite "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-killchanban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanban ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes a ban from the ban list for a channel. + Description + Removes a ban from the ban list for a channel. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` - Returns: ``1`` on success; ``0`` otherwise + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1094,16 +1955,33 @@ killchanban set result [killchanban "#lamest" "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-killban: ^^^^^^^^^^^^^ killban ^^^^^^^^^^^^^ - Description: Removes a ban from the global ban list. + Description + Removes a ban from the global ban list. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` + - Returns: ``1`` on success; ``0`` otherwise + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1112,16 +1990,33 @@ killban set result [killban "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-killchanexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes an exempt from the exempt list for a channel. + Description + Removes an exempt from the exempt list for a channel. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html - Returns: ``1`` on success; ``0`` otherwise +
.. admonition:: Example :collapsible: closed @@ -1130,16 +2025,33 @@ killchanexempt set result [killchanexempt "#lamest" "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-killexempt: ^^^^^^^^^^^^^^^^^^^ killexempt ^^^^^^^^^^^^^^^^^^^ - Description: Removes an exempt from the global exempt list. + Description + Removes an exempt from the global exempt list. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
- Returns: ``1`` on success; ``0`` otherwise + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1148,16 +2060,33 @@ killexempt set result [killexempt "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-killchaninvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes an invite from the invite list for a channel. + Description + Removes an invite from the invite list for a channel. - Returns: ``1`` on success; ``0`` otherwise + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1166,16 +2095,33 @@ killchaninvite set result [killchaninvite "#lamest" "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-killinvite: ^^^^^^^^^^^^^^^^^^^ killinvite ^^^^^^^^^^^^^^^^^^^ - Description: Removes an invite from the global invite list. + Description + Removes an invite from the global invite list. + + Returns + ``1`` on success; ``0`` otherwise - Returns: ``1`` on success; ``0`` otherwise + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1184,16 +2130,33 @@ killinvite set result [killinvite "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-ischanjuped: ^^^^^^^^^^^^^^^^^^^^^ ischanjuped ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the channel is juped, and the bot is unable to join; 0 otherwise. + Description + Returns ``1`` if the channel is juped, and the bot is unable to join; 0 otherwise. + + Returns + ``1`` if the channel is juped, and the bot is unable to join; ``0`` otherwise + + .. raw:: html - Returns: ``1`` if the channel is juped, and the bot is unable to join; ``0`` otherwise +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1202,16 +2165,33 @@ ischanjuped set juped [ischanjuped "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-isban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1220,16 +2200,33 @@ isban [channel [-channel]] set result [isban "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-ispermban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` - 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. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1238,16 +2235,33 @@ ispermban [channel [-channel]] set result [ispermban "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-isexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` + - 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. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1256,16 +2270,33 @@ isexempt [channel [-channel]] set result [isexempt "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-ispermexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html - 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. +
.. admonition:: Example :collapsible: closed @@ -1274,16 +2305,33 @@ ispermexempt [channel [-channel]] set result [ispermexempt "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-isinvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isinvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1292,16 +2340,33 @@ isinvite [channel [-channel]] set result [isinvite "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-isperminvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isperminvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. - 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. + 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. + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1310,16 +2375,33 @@ isperminvite [channel [-channel]] set result [isperminvite "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-isbansticky: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isbansticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. - 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. + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1328,16 +2410,33 @@ isbansticky [channel [-channel]] set result [isbansticky "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-isexemptsticky: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexemptsticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html - 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. +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1346,16 +2445,33 @@ isexemptsticky [channel [-channel]] set result [isexemptsticky "*!*@127.0.0.1"] +.. raw:: html - Module: channels +
+ +.. _tcl-isinvitesticky: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isinvitesticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1364,16 +2480,33 @@ isinvitesticky [channel [-channel]] set result [isinvitesticky "*!*@127.0.0.1"] +.. raw:: html + +
- Module: channels +.. _tcl-matchban: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` - 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. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1382,16 +2515,33 @@ matchban [channel] set banned [matchban "Foobar!foobar@127.0.0.1" "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-matchexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` + - 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. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1400,17 +2550,34 @@ matchexempt [channel] set exempt [matchexempt "Foobar!foobar@127.0.0.1" "#lamest"] +.. raw:: html + +
- Module: channels +.. _tcl-matchinvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that. + Description + Returns ``1`` if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that. + + Returns + ``1`` if the specified nick!user\@host matches an invite in the global invite list; ``0`` otherwise. If a channel is specified, that + channel's invite list is checked as well. + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html - Returns: ``1`` if the specified nick!user\@host matches an invite in the global invite list; ``0`` otherwise. If a channel is specified, that - channel's invite list is checked as well. +
.. admonition:: Example :collapsible: closed @@ -1419,16 +2586,33 @@ matchinvite [channel] set invited [matchinvite "Foobar!foobar@127.0.0.1" "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-banlist: ^^^^^^^^^^^^^^^^^ banlist [channel] ^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1437,15 +2621,33 @@ banlist [channel] set bans [banlist "#lamest"] - Module: channels +.. raw:: html + +
+ +.. _tcl-exemptlist: ^^^^^^^^^^^^^^^^^^^^ exemptlist [channel] ^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1454,16 +2656,33 @@ exemptlist [channel] set exempts [exemptlist "#lamest"] +.. raw:: html + +
- Module: channels +.. _tcl-invitelist: ^^^^^^^^^^^^^^^^^^^^ invitelist [channel] ^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. - 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. + 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. + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1472,33 +2691,68 @@ invitelist [channel] set invites [invitelist "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-newignore: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newignore [lifetime] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example :collapsible: closed .. code-block:: tcl newignore "*!*@127.0.0.1" foobar "Example ignore" 60 +.. raw:: html - Module: core +
+ +.. _tcl-killignore: ^^^^^^^^^^^^^^^^^^^^^ killignore ^^^^^^^^^^^^^^^^^^^^^ - Description: Removes an entry from the ignore list. - Returns: ``1`` if successful; ``0`` otherwise + Description + Removes an entry from the ignore list. + + Returns + ``1`` if successful; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1507,16 +2761,33 @@ killignore set removed [killignore "*!*@127.0.0.1"] +.. raw:: html + +
- Module: core +.. _tcl-ignorelist: ^^^^^^^^^^ ignorelist ^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html - 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. +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1525,16 +2796,33 @@ ignorelist set ignores [ignorelist] +.. raw:: html + +
- Module: core +.. _tcl-isignore: ^^^^^^^^^^^^^^^^^^^ isignore ^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the ignore is in the list; 0 otherwise. + Description + Returns ``1`` if the ignore is in the list; 0 otherwise. + + Returns + ``1`` if the ignore is in the list; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``core`` - Returns: ``1`` if the ignore is in the list; ``0`` otherwise + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1543,16 +2831,33 @@ isignore set ignored [isignore "*!*@127.0.0.1"] +.. raw:: html - Module: core +
+ +.. _tcl-save: ^^^^ save ^^^^ - Description: Writes the user and channel files to disk. + Description + Writes the user and channel files to disk. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1561,16 +2866,33 @@ save save +.. raw:: html + +
- Module: core +.. _tcl-reload: ^^^^^^ reload ^^^^^^ - Description: Loads the userfile from disk, replacing whatever is in memory. + Description + Loads the userfile from disk, replacing whatever is in memory. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1579,15 +2901,33 @@ reload reload +.. raw:: html + +
- Module: core +.. _tcl-backup: ^^^^^^ backup ^^^^^^ - 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. - Returns: nothing + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1596,16 +2936,33 @@ backup backup +.. raw:: html + +
- Module: core +.. _tcl-getting-users: ^^^^^^^^^^^^^ getting-users ^^^^^^^^^^^^^ - Description: 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. + Description + 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. - 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 + 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 + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1614,93 +2971,174 @@ getting-users set result [getting-users] - - Module: core - Channel Commands ---------------- +.. _tcl-channel-add: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel add [option-list] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 {}). + 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 {}). - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — Add a channel :collapsible: closed .. code-block:: tcl channel add "#lamest" +.. raw:: html + +
- Module: channels +.. _tcl-channel-set: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel set ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sets options for the channel specified. `options` is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in doc/settings/mod.channels. Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example ``channel set #lamestst need-op { putmsg ChanServ "op #lamestst" }``. + Description + Sets options for the channel specified. `options` is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in ``doc/settings/mod.channels.`` Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example ``channel set #lamestst need-op { putmsg ChanServ "op #lamestst" }``. - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — Change a channel setting :collapsible: closed .. code-block:: tcl channel set "#lamest" +autoop +.. raw:: html - Module: channels +
+ +.. _tcl-channel-info: ^^^^^^^^^^^^^^^^^^^ channel info ^^^^^^^^^^^^^^^^^^^ - Description: Returns the settings currently stored for the specified channel. + Description + Returns the settings currently stored for the specified channel. - Returns: a list of info about the specified channel's settings. + Returns + a list of info about the specified channel's settings. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — Inspect channel settings :collapsible: closed .. code-block:: tcl set info [channel info "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-channel-get: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel get [setting] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a channel setting, or all channel settings when no setting is specified. + Description + Returns a channel setting, or all channel settings when no setting is specified. - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — Read a channel setting :collapsible: closed .. code-block:: tcl set autoop [channel get "#lamest" autoop] +.. raw:: html + +
- Module: channels +.. _tcl-channel-remove: ^^^^^^^^^^^^^^^^^^^^^ channel remove ^^^^^^^^^^^^^^^^^^^^^ - Description: Removes a channel record from the bot and makes the bot no longer monitor the channel. + Description + Removes a channel record from the bot and makes the bot no longer monitor the channel. + + Returns + nothing + + .. raw:: html - Returns: nothing +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1709,16 +3147,33 @@ channel remove channel remove "#lamest" +.. raw:: html - Module: channels +
+ +.. _tcl-savechannels: ^^^^^^^^^^^^ savechannels ^^^^^^^^^^^^ - Description: Saves the channel settings to the channel-file if one is defined. + Description + Saves the channel settings to the channel-file if one is defined. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1727,15 +3182,33 @@ savechannels savechannels +.. raw:: html - Module: channels +
+ +.. _tcl-loadchannels: ^^^^^^^^^^^^ loadchannels ^^^^^^^^^^^^ - Description: Reloads the channel settings from the channel-file if one is defined. - Returns: nothing + Description + Reloads the channel settings from the channel-file if one is defined. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1744,17 +3217,34 @@ loadchannels loadchannels +.. raw:: html - Module: channels +
+ +.. _tcl-channels: ^^^^^^^^ channels ^^^^^^^^ - Description: Returns the channels for which the bot has channel records. + Description + Returns the channels for which the bot has channel records. + + + Returns + a list of the channels the bot has a channel record for + + .. raw:: html + +
+ + Module + ``channels`` - Returns: a list of the channels the bot has a channel record for + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1763,16 +3253,36 @@ channels set channel_list [channels] +.. raw:: html + +
- Module: channels +.. _tcl-channame2dname: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channame2dname ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Converts a real IRC channel name to the channel description name Eggdrop uses internally. This is primarily relevant to !channels; for other channels, the two names are the same. + Description + Converts a real IRC channel name to the channel description name Eggdrop uses internally. This is primarily relevant to !channels; for other channels, the two names are the same. + + Returns + the channel description name corresponding to + + See also + :ref:`chandname2name ` + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - Returns: the channel description name corresponding to +
.. admonition:: Example :collapsible: closed @@ -1781,17 +3291,36 @@ channame2dname set dname [channame2dname "#lamest"] - See also: chandname2name +.. raw:: html - Module: irc +
+ +.. _tcl-chandname2name: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chandname2name ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Converts an Eggdrop channel description name to the real IRC channel name used by the server. This is primarily relevant to !channels; for other channels, the two names are the same. + Description + Converts an Eggdrop channel description name to the real IRC channel name used by the server. This is primarily relevant to !channels; for other channels, the two names are the same. + + Returns + the real IRC channel name corresponding to + + See also + :ref:`channame2dname ` + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - Returns: the real IRC channel name corresponding to +
.. admonition:: Example :collapsible: closed @@ -1800,18 +3329,34 @@ chandname2name set channel_name [chandname2name "#lamest"] - See also: channame2dname +.. raw:: html - Module: irc +
+ +.. _tcl-isbotnick: ^^^^^^^^^^^^^^^^ isbotnick ^^^^^^^^^^^^^^^^ - Description: Checks whether the specified nickname is the bot's current nickname. + Description + Checks whether the specified nickname is the bot's current nickname. + + + Returns + ``1`` if the nick matches the botnick; ``0`` otherwise + + .. raw:: html + +
+ Module + ``server`` - Returns: ``1`` if the nick matches the botnick; ``0`` otherwise + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1820,16 +3365,33 @@ isbotnick set is_bot [isbotnick LamestBot] +.. raw:: html - Module: server +
+ +.. _tcl-botisop: ^^^^^^^^^^^^^^^^^ botisop [channel] ^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise. + Description + Returns ``1`` if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise. + + Returns + ``1`` if the bot has ops on the specified channel (or any channel if no channel is specified); ``0`` otherwise - Returns: ``1`` if the bot has ops on the specified channel (or any channel if no channel is specified); ``0`` otherwise + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1838,16 +3400,33 @@ botisop [channel] set opped [botisop "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-botishalfop: ^^^^^^^^^^^^^^^^^^^^^ botishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise. + Description + Returns ``1`` if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise. + + Returns + ``1`` if the bot has halfops on the specified channel (or any channel if no channel is specified); ``0`` otherwise + + .. raw:: html - Returns: ``1`` if the bot has halfops on the specified channel (or any channel if no channel is specified); ``0`` otherwise +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1856,16 +3435,33 @@ botishalfop [channel] set halfopped [botishalfop "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-botisvoice: ^^^^^^^^^^^^^^^^^^^^ botisvoice [channel] ^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise. + Description + Returns ``1`` if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise. + + Returns + ``1`` if the bot has a voice on the specified channel (or any channel if no channel is specified); ``0`` otherwise + + .. raw:: html + +
+ + Module + ``irc`` - Returns: ``1`` if the bot has a voice on the specified channel (or any channel if no channel is specified); ``0`` otherwise + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1874,16 +3470,33 @@ botisvoice [channel] set voiced [botisvoice "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-botonchan: ^^^^^^^^^^^^^^^^^^^ botonchan [channel] ^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise. + Description + Returns ``1`` if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise. + + Returns + ``1`` if the bot is on the specified channel (or any channel if no channel is specified); ``0`` otherwise + + .. raw:: html + +
+ + Module + ``irc`` + - Returns: ``1`` if the bot is on the specified channel (or any channel if no channel is specified); ``0`` otherwise + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1892,16 +3505,33 @@ botonchan [channel] set present [botonchan "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-isop: ^^^^^^^^^^^^^^^^^^^^^^^^^ isop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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 + + .. raw:: html + +
- 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 + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1910,16 +3540,33 @@ isop [channel] set opped [isop Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-ishalfop: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. - 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 + 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 + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1928,16 +3575,33 @@ ishalfop [channel] set halfopped [ishalfop Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-wasop: ^^^^^^^^^^^^^^^^^^^^^^^^^^ wasop ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise. + Description + Returns ``1`` if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise. + + Returns + ``1`` if someone that just got opped/deopped in the chan had op before the modechange; ``0`` otherwise - Returns: ``1`` if someone that just got opped/deopped in the chan had op before the modechange; ``0`` otherwise + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1946,16 +3610,33 @@ wasop set previously_opped [wasop Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-washalfop: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ washalfop ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise. + Description + Returns ``1`` if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise. + + Returns + ``1`` if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; ``0`` otherwise + + .. raw:: html + +
- Returns: ``1`` if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; ``0`` otherwise + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1964,16 +3645,33 @@ washalfop set previously_halfopped [washalfop Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-isvoice: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isvoice [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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 + + .. raw:: html + +
+ + Module + ``irc`` - 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 + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -1982,16 +3680,33 @@ isvoice [channel] set voiced [isvoice Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-isidentified: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isidentified [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses). + Description + Determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses). + + Returns + ``1`` if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); ``0`` otherwise. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - Returns: ``1`` if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); ``0`` otherwise. +
.. admonition:: Example :collapsible: closed @@ -2000,16 +3715,33 @@ isidentified [channel] set identified [isidentified Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-isaway: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ isaway [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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 w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. + 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 w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. + + Returns + ``1`` if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; ``0`` otherwise. + + .. raw:: html + +
- Returns: ``1`` if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; ``0`` otherwise. + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2018,16 +3750,33 @@ isaway [channel] set away [isaway Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-isircbot: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isircbot [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding "BOT=B" (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. + Description + Determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding ``BOT=B`` (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. - Returns: ``1`` if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; ``0`` otherwise. + Returns + ``1`` if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; ``0`` otherwise. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2036,14 +3785,32 @@ isircbot [channel] set is_bot [isircbot Foobar "#lamest"] - Module: irc +.. raw:: html + +
+ +.. _tcl-onchan: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise. - Returns: ``1`` if someone by that nickname is on the specified channel (or any channel if none is specified); ``0`` otherwise + Description + Returns ``1`` if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise. + Returns + ``1`` if someone by that nickname is on the specified channel (or any channel if none is specified); ``0`` otherwise + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2052,15 +3819,33 @@ onchan [channel] set present [onchan Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-monitor: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ monitor [nickname] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The 'add' command sends 'nickname' to the server to track. The 'delete' command removes 'nickname' from being tracked by the server (or returns an error if the nickname is not present). The 'list' command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The 'online' command returns a string of tracked nicknames that are currently online. The 'offline' command returns a list of tracked nicknames that are currently offline. - Returns: The ``add`` sub-command returns a ``1`` if the nick was successfully added, a ``0`` if the nick is already in the monitor list, and a ``2`` if the nick could not be added. The ``delete`` sub-command returns a ``1`` if the nick is removed, or an error if the nick is not found. The ``status`` sub-command returns a ``1`` if ``nickname`` is online or a ``0`` if ``nickname`` is offline. The ``clear`` command removes all nicknames from the list the server is monitoring. + Description + Interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The ``add`` command sends ``nickname`` to the server to track. The ``delete`` command removes ``nickname`` from being tracked by the server (or returns an error if the nickname is not present). The ``list`` command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The ``online`` command returns a string of tracked nicknames that are currently online. The ``offline`` command returns a list of tracked nicknames that are currently offline. + + Returns + The ``add`` sub-command returns a ``1`` if the nick was successfully added, a ``0`` if the nick is already in the monitor list, and a ``2`` if the nick could not be added. The ``delete`` sub-command returns a ``1`` if the nick is removed, or an error if the nick is not found. The ``status`` sub-command returns a ``1`` if ``nickname`` is online or a ``0`` if ``nickname`` is offline. The ``clear`` command removes all nicknames from the list the server is monitoring. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2069,16 +3854,33 @@ monitor [nickname] set added [monitor add Foobar] +.. raw:: html - Module: irc +
+ +.. _tcl-accounttracking: ^^^^^^^^^^^^^^^ accounttracking ^^^^^^^^^^^^^^^ - Description: Checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). + Description + Checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). + + Returns + a ``1`` if all three functionalities are present, a ``0`` if one or more are missing. + + .. raw:: html + +
- Returns: a ``1`` if all three functionalities are present, a ``0`` if one or more are missing. + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2087,18 +3889,35 @@ accounttracking set result [accounttracking] +.. raw:: html + +
- Module: irc +.. _tcl-getaccount: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getaccount [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. + Description + Returns the services account name associated with nickname, ``*`` if the user is not logged into services, or ``""`` if eggdrop does not know the account status of the user. + + Returns + the services account name associated with nickname, ``*`` if the user is not logged into services, or ``""`` if eggdrop does not know the account status of the user. + + NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. + + .. raw:: html + +
- Returns: the services account name associated with nickname, ``*`` if the user is not logged into services, or ``""`` if eggdrop does not know the account status of the user. + Module + ``irc`` - NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2107,15 +3926,33 @@ getaccount [channel] set account [getaccount Foobar "#lamest"] - Module: irc +.. raw:: html + +
+ +.. _tcl-nick2hand: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ nick2hand [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``irc`` + - 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. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2124,16 +3961,33 @@ nick2hand [channel] set handle [nick2hand Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-account2nicks: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ account2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - 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. +
.. admonition:: Example :collapsible: closed @@ -2142,16 +3996,33 @@ account2nicks [channel] set nicks [account2nicks foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-hand2nick: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nick [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2160,16 +4031,33 @@ hand2nick [channel] set nick [hand2nick foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-hand2nicks: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. - 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. + 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. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2178,16 +4066,33 @@ hand2nicks [channel] set nicks [hand2nicks foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-handonchan: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ handonchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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 - 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 + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2196,16 +4101,33 @@ handonchan [channel] set present [handonchan foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-ischanban: ^^^^^^^^^^^^^^^^^^^^^^^^^ ischanban ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel). + Description + Returns ``1`` if the specified ban is on the given channel's ban list (not the bot's banlist for the channel). + + Returns + ``1`` if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) + + .. raw:: html - Returns: ``1`` if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2214,16 +4136,33 @@ ischanban set result [ischanban "*!*@127.0.0.1" "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-ischanexempt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel). + Description + Returns ``1`` if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel). + + Returns + ``1`` if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) + + .. raw:: html + +
- Returns: ``1`` if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2232,16 +4171,33 @@ ischanexempt set result [ischanexempt "*!*@127.0.0.1" "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-ischaninvite: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel). + Description + Returns ``1`` if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel). + + Returns + ``1`` if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) + + .. raw:: html + +
+ + Module + ``irc`` - Returns: ``1`` if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2250,16 +4206,33 @@ ischaninvite set result [ischaninvite "*!*@127.0.0.1" "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-chanbans: ^^^^^^^^^^^^^^^^^^ chanbans ^^^^^^^^^^^^^^^^^^ - Description: Returns a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Description + Returns a list of the current bans on the channel. Each element is a sublist of the form {```` ```` ````}. age is seconds from the bot's point of view. + + Returns + a list of the current bans on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view + + .. raw:: html + +
+ + Module + ``irc`` + - Returns: a list of the current bans on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2268,16 +4241,33 @@ chanbans set bans [chanbans "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-chanexempts: ^^^^^^^^^^^^^^^^^^^^^ chanexempts ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Description + Returns a list of the current exempts on the channel. Each element is a sublist of the form {```` ```` ````}. age is seconds from the bot's point of view. + + Returns + a list of the current exempts on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - Returns: a list of the current exempts on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view +
.. admonition:: Example :collapsible: closed @@ -2286,16 +4276,33 @@ chanexempts set exempts [chanexempts "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-chaninvites: ^^^^^^^^^^^^^^^^^^^^^ chaninvites ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view. + Description + Returns a list of the current invites on the channel. Each element is a sublist of the form {```` ```` ````}. age is seconds from the bot's point of view. + + Returns + a list of the current invites on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view + + .. raw:: html + +
- Returns: a list of the current invites on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2304,16 +4311,33 @@ chaninvites set invites [chaninvites "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-resetbans: ^^^^^^^^^^^^^^^^^^^ resetbans ^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2322,16 +4346,33 @@ resetbans resetbans "#lamest" +.. raw:: html - Module: irc +
+ +.. _tcl-resetexempts: ^^^^^^^^^^^^^^^^^^^^^^ resetexempts ^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2340,16 +4381,33 @@ resetexempts resetexempts "#lamest" +.. raw:: html + +
- Module: irc +.. _tcl-resetinvites: ^^^^^^^^^^^^^^^^^^^^^^ resetinvites ^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html - Returns: nothing +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2358,16 +4416,33 @@ resetinvites resetinvites "#lamest" +.. raw:: html - Module: irc +
+ +.. _tcl-resetchanidle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanidle [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified. + Description + Resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2376,15 +4451,33 @@ resetchanidle [nick] resetchanidle Foobar "#lamest" +.. raw:: html + +
- Module: irc +.. _tcl-resetchanjoin: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanjoin [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Resets the channel join time for the given nick or for all nicks on the channel if no nick is specified. - Returns: nothing + Description + Resets the channel join time for the given nick or for all nicks on the channel if no nick is specified. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2393,33 +4486,50 @@ resetchanjoin [nick] resetchanjoin Foobar "#lamest" +.. raw:: html + +
- Module: irc +.. _tcl-resetchan: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchan [flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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: + 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: + + .. list-table:: + :widths: 14 86 + :header-rows: 1 + + * - ``flags`` + - Description + * - ``b`` + - channel bans + * - ``e`` + - channel exempts + * - ``I`` + - channel invites + * - ``m`` + - channel modes + * - ``w`` + - memberlist (who & away info) + + Returns + nothing + + .. raw:: html - .. list-table:: - :widths: 14 86 - :header-rows: 1 +
- * - ``flags`` - - Description - * - ``b`` - - channel bans - * - ``e`` - - channel exempts - * - ``I`` - - channel invites - * - ``m`` - - channel modes - * - ``w`` - - memberlist (who & away info) + Module + ``irc`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2428,35 +4538,52 @@ resetchan [flags] resetchan "#lamest" w +.. raw:: html - Module: irc +
+ +.. _tcl-refreshchan: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ refreshchan [flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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: + 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: + + .. list-table:: + :widths: 14 86 + :header-rows: 1 + + * - ``flags`` + - Description + * - ``b`` + - channel bans + * - ``e`` + - channel exempts + * - ``I`` + - channel invites + * - ``m`` + - channel modes + * - ``t`` + - channel topic + * - ``w`` + - memberlist (who & away info) + + Returns + nothing + + .. raw:: html + +
- .. list-table:: - :widths: 14 86 - :header-rows: 1 + Module + ``irc`` - * - ``flags`` - - Description - * - ``b`` - - channel bans - * - ``e`` - - channel exempts - * - ``I`` - - channel invites - * - ``m`` - - channel modes - * - ``t`` - - channel topic - * - ``w`` - - memberlist (who & away info) - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2465,16 +4592,33 @@ refreshchan [flags] refreshchan "#lamest" w +.. raw:: html + +
- Module: irc +.. _tcl-getchanhost: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanhost [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - 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. +
.. admonition:: Example :collapsible: closed @@ -2483,16 +4627,33 @@ getchanhost [channel] set host [getchanhost Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-getchanjoin: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanjoin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2501,16 +4662,33 @@ getchanjoin set joined [getchanjoin Foobar "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-onchansplit: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchansplit [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise. + Description + Returns ``1`` if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise. - Returns: ``1`` if that nick is split from the channel (or any channel if no channel is specified); ``0`` otherwise + Returns + ``1`` if that nick is split from the channel (or any channel if no channel is specified); ``0`` otherwise + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2519,18 +4697,35 @@ onchansplit [channel] set split [onchansplit Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-chanlist: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chanlist [flags][<&|>chanflags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Lists all users on a channel Eggdrop has joined. 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 `Flag Masks`_ for additional information). + Description + Lists all users on a channel Eggdrop has joined. 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 `Flag Masks`_ for additional information). + + 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. - 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. + 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. - 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. + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2539,16 +4734,33 @@ chanlist [flags][<&|>chanflags] set nicks [chanlist "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-getchanidle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanidle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns number of minutes that person has been idle; -1 if the specified user isn't on the channel. + Description + Returns number of minutes that person has been idle; -1 if the specified user isn't on the channel. + + Returns + number of minutes that person has been idle; ``-1`` if the specified user isn't on the channel + + .. raw:: html - Returns: number of minutes that person has been idle; ``-1`` if the specified user isn't on the channel +
+ + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2557,16 +4769,33 @@ getchanidle set idle [getchanidle Foobar "#lamest"] +.. raw:: html - Module: irc +
+ +.. _tcl-getchanmode: ^^^^^^^^^^^^^^^^^^^^^ getchanmode ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns string of the type "+ntik key" for the channel specified. + Description + Returns string of the type ``+ntik key`` for the channel specified. + + Returns + string of the type ``+ntik key`` for the channel specified + + .. raw:: html + +
- Returns: string of the type ``+ntik key`` for the channel specified + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2575,16 +4804,33 @@ getchanmode set modes [getchanmode "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-jump: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jump [server [[+]port [password]]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``server`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2593,16 +4839,33 @@ jump [server [[+]port [password]]] jump irc.example.net +6697 +.. raw:: html - Module: server +
+ +.. _tcl-pushmode: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pushmode [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends out a channel mode change (ex: pushmode #lamest +o Foobar) 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. + Description + Sends out a channel mode change (ex: pushmode #lamest +o Foobar) 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``irc`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2611,16 +4874,33 @@ pushmode [arg] pushmode "#lamest" +o Foobar +.. raw:: html + +
- Module: irc +.. _tcl-flushmode: ^^^^^^^^^^^^^^^^^^^ flushmode ^^^^^^^^^^^^^^^^^^^ - 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). + 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). + + Returns + nothing + + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -2629,16 +4909,33 @@ flushmode flushmode "#lamest" +.. raw:: html - Module: irc +
+ +.. _tcl-topic: ^^^^^^^^^^^^^^^ topic ^^^^^^^^^^^^^^^ - Description: Returns string containing the current topic of the specified channel. + Description + Returns string containing the current topic of the specified channel. + + Returns + string containing the current topic of the specified channel + + .. raw:: html + +
- Returns: string containing the current topic of the specified channel + Module + ``irc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2647,16 +4944,33 @@ topic set current_topic [topic "#lamest"] +.. raw:: html + +
- Module: irc +.. _tcl-validchan: ^^^^^^^^^^^^^^^^^^^ validchan ^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Returns: ``1`` if the channel exists, ``0`` if not + Returns + ``1`` if the channel exists, ``0`` if not + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2665,16 +4979,33 @@ validchan set known [validchan "#lamest"] +.. raw:: html - Module: channels +
+ +.. _tcl-isdynamic: ^^^^^^^^^^^^^^^^^^^ isdynamic ^^^^^^^^^^^^^^^^^^^ - Description: Returns 1 if the channel is a dynamic channel; 0 otherwise. + Description + Returns ``1`` if the channel is a dynamic channel; 0 otherwise. + + Returns + ``1`` if the channel is a dynamic channel; ``0`` otherwise - Returns: ``1`` if the channel is a dynamic channel; ``0`` otherwise + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2683,16 +5014,33 @@ isdynamic set dynamic [isdynamic "#lamest"] +.. raw:: html + +
- Module: channels +.. _tcl-setudef: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html - Returns: nothing +
+ + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2701,16 +5049,33 @@ setudef setudef flag example-setting +.. raw:: html - Module: channels +
+ +.. _tcl-renudef: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ renudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Renames a user defined channel flag, string, or integer setting. + Description + Renames a user defined channel flag, string, or integer setting. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``channels`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2719,16 +5084,33 @@ renudef renudef flag example-setting renamed-setting +.. raw:: html + +
- Module: channels +.. _tcl-deludef: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deludef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Deletes a user defined channel flag, string, or integer setting. + Description + Deletes a user defined channel flag, string, or integer setting. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``channels`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2737,16 +5119,33 @@ deludef deludef flag example-setting +.. raw:: html - Module: channels +
+ +.. _tcl-getudefs: ^^^^^^^^^^^^^^^^^^^^^^^ getudefs [flag/int/str] ^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a list of user defined channel settings of the given type, or all of them if no type is given. + Description + Returns a list of user defined channel settings of the given type, or all of them if no type is given. + + Returns + a list of user defined channel settings of the given type, or all of them if no type is given. + + .. raw:: html + +
+ + Module + ``channels`` + - Returns: a list of user defined channel settings of the given type, or all of them if no type is given. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2755,16 +5154,33 @@ getudefs [flag/int/str] set flags [getudefs flag] +.. raw:: html + +
- Module: channels +.. _tcl-chansettype: ^^^^^^^^^^^^^^^^^^^^^ chansettype ^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html - 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. +
.. admonition:: Example :collapsible: closed @@ -2773,18 +5189,34 @@ chansettype set type [chansettype autoop] +.. raw:: html - Module: channels +
+ +.. _tcl-isupport-get: ^^^^^^^^^^^^^^^^^^^^^^^^^ isupport get [key] ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: - - isupport get: Returns a flat key/value list (dict) of settings. - - isupport get : Returns the setting's value as a string. Throws an error if the key is not set. + Description + - isupport get: Returns a flat key/value list (dict) of settings. + - isupport get : Returns the setting's value as a string. Throws an error if the key is not set. + + Returns + string or dict, see description above + + .. raw:: html + +
- Returns: string or dict, see description above + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2793,16 +5225,33 @@ isupport get [key] set chantypes [isupport get CHANTYPES] +.. raw:: html + +
- Module: server +.. _tcl-isupport-isset: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ isupport isset ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns 0/1 depending on whether the key has a value. + Description + Returns ``0``/1 depending on whether the key has a value. - Returns: ``0`` or ``1`` + Returns + ``0`` or ``1`` + + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2811,22 +5260,34 @@ isupport isset set supported [isupport isset CHANTYPES] - - Module: server - - DCC Commands ------------ .. _putdcc: +.. _tcl-putdcc: + ^^^^^^^^^^^^^^^^^^^^^^^^^^ putdcc [-raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -2835,16 +5296,33 @@ putdcc [-raw] putdcc 0 "Hello, foobar." +.. raw:: html - Module: core +
+ +.. _tcl-putidx: ^^^^^^^^^^^^^^^^^^^^^^^^^^ putidx -[raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Alias for the putdcc_ command. + Description + Alias for the putdcc_ command. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2853,16 +5331,33 @@ putidx -[raw] putidx 0 "Hello, foobar." +.. raw:: html + +
- Module: core +.. _tcl-dccbroadcast: ^^^^^^^^^^^^^^^^^^^^^^ dccbroadcast ^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends a message to everyone on the party line across the botnet, in the form of "\*\*\* " for local users, "\*\*\* (Bot) " for users on other bots with version below 1.8.4, and "(Bot) " for users on other bots with version 1.8.4+ and console log mode 'l' enabled. + Description + Sends a message to everyone on the party line across the botnet, in the form of ``\*\*\* `` for local users, ``\*\*\* (Bot) `` for users on other bots with version below 1.8.4, and ``(Bot) `` for users on other bots with version 1.8.4+ and console log mode ``l`` enabled. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2871,16 +5366,33 @@ dccbroadcast dccbroadcast "Example botnet announcement" +.. raw:: html - Module: core +
+ +.. _tcl-dccputchan: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccputchan ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2889,15 +5401,33 @@ dccputchan dccputchan 0 "Hello from LamestBot" +.. raw:: html + +
- Module: core +.. _tcl-boot: ^^^^^^^^^^^^^^^^^^^^^^^^ boot [reason] ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Boots a user from the partyline. - Returns: nothing + Description + Boots a user from the partyline. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2906,16 +5436,33 @@ boot [reason] boot foobar@LamestBot "Requested disconnect" +.. raw:: html + +
- Module: core +.. _tcl-dccsimul: ^^^^^^^^^^^^^^^^^^^^^ dccsimul ^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html - Returns: nothing +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2924,16 +5471,33 @@ dccsimul dccsimul 0 ".who" +.. raw:: html - Module: core +
+ +.. _tcl-hand2idx: ^^^^^^^^^^^^^^^^^ hand2idx ^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2942,16 +5506,33 @@ hand2idx set idx [hand2idx foobar] +.. raw:: html + +
- Module: core +.. _tcl-idx2hand: ^^^^^^^^^^^^^^ idx2hand ^^^^^^^^^^^^^^ - Description: Returns handle of the user with the given idx. + Description + Returns handle of the user with the given idx. + + Returns + handle of the user with the given idx + + .. raw:: html + +
+ + Module + ``core`` - Returns: handle of the user with the given idx + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2960,16 +5541,33 @@ idx2hand set handle [idx2hand 0] +.. raw:: html - Module: core +
+ +.. _tcl-valididx: ^^^^^^^^^^^^^^ valididx ^^^^^^^^^^^^^^ - Description: Returns 1 if the idx currently exists; 0 otherwise. + Description + Returns ``1`` if the idx currently exists; 0 otherwise. + + Returns + ``1`` if the idx currently exists; ``0`` otherwise + + .. raw:: html + +
+ + Module + ``core`` + - Returns: ``1`` if the idx currently exists; ``0`` otherwise + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -2978,16 +5576,33 @@ valididx set valid [valididx 0] +.. raw:: html + +
- Module: core +.. _tcl-getchan: ^^^^^^^^^^^^^ getchan ^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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 + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - 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 +
.. admonition:: Example :collapsible: closed @@ -2996,16 +5611,33 @@ getchan set partyline_channel [getchan 0] +.. raw:: html - Module: core +
+ +.. _tcl-setchan: ^^^^^^^^^^^^^^^^^^^^^^^ setchan ^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3014,16 +5646,33 @@ setchan setchan 0 0 +.. raw:: html + +
- Module: core +.. _tcl-console: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ console [channel] [console-modes] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). - 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 + 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 + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3032,15 +5681,33 @@ console [channel] [console-modes] set settings [console 0 "#lamest" +mp] - Module: core +.. raw:: html + +
+ +.. _tcl-resetconsole: ^^^^^^^^^^^^^^^^^^ resetconsole ^^^^^^^^^^^^^^^^^^ - Description: Changes a dcc user's console mode to the default setting in the configfile. + Description + Changes a dcc user's console mode to the default setting in the configfile. - Returns: a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline + Returns + a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3049,16 +5716,33 @@ resetconsole set settings [resetconsole 0] +.. raw:: html - Module: core +
+ +.. _tcl-echo: ^^^^^^^^^^^^^^^^^^^ echo [status] ^^^^^^^^^^^^^^^^^^^ - Description: Turns a user's echo on or off; the status has to be a 1 or 0. + Description + Turns a user's echo on or off; the status has to be a 1 or 0. + + Returns + new value of echo for that user (or the current value, if status was omitted) - Returns: new value of echo for that user (or the current value, if status was omitted) + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3067,41 +5751,58 @@ echo [status] set echo_enabled [echo 0] +.. raw:: html + +
- Module: core +.. _tcl-strip: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strip [+/-strip-flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Modifies the strip-flags for a user. The supported strip-flags are: + Description + Modifies the strip-flags for a user. The supported strip-flags are: + + .. list-table:: + :widths: 9 91 + :header-rows: 1 + + * - ``strip-flags`` + - Description + * - ``c`` + - remove all color codes + * - ``b`` + - remove all boldface codes + * - ``r`` + - remove all reverse video codes + * - ``u`` + - remove all underline codes + * - ``a`` + - remove all ANSI codes + * - ``g`` + - remove all ctrl-g (bell) codes + * - ``o`` + - remove all ordinary codes (ctrl+o, terminates bold/color/..) + * - ``i`` + - remove all italics codes + * - ``\*`` + - remove all of the above - .. list-table:: - :widths: 9 91 - :header-rows: 1 + Returns + new strip-flags for the specified user (or the current flags, if strip-flags was omitted) - * - ``strip-flags`` - - Description - * - ``c`` - - remove all color codes - * - ``b`` - - remove all boldface codes - * - ``r`` - - remove all reverse video codes - * - ``u`` - - remove all underline codes - * - ``a`` - - remove all ANSI codes - * - ``g`` - - remove all ctrl-g (bell) codes - * - ``o`` - - remove all ordinary codes (ctrl+o, terminates bold/color/..) - * - ``i`` - - remove all italics codes - * - ``\*`` - - remove all of the above + .. raw:: html - Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted) +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3110,28 +5811,45 @@ strip [+/-strip-flags] set strip_flags [strip 0 +c] +.. raw:: html - Module: core +
+ +.. _tcl-page: ^^^^^^^^^^^^^^^^^^^ page [number] ^^^^^^^^^^^^^^^^^^^ - Description: This allows you to slow down the number of lines the bot sends. + Description + This allows you to slow down the number of lines the bot sends. + + to a user at once via the partyline. When enabled, any commands that send + + greater than the specified number of lines will stop when that number is + + reached and wait for the user to type another command (or press enter) to - to a user at once via the partyline. When enabled, any commands that send + continue. If the user has too many pending lines, he may be booted off the - greater than the specified number of lines will stop when that number is + bot. - reached and wait for the user to type another command (or press enter) to + Returns + new value of page lines for that user (or the current value, if - continue. If the user has too many pending lines, he may be booted off the + status was omitted) - bot. + .. raw:: html - Returns: new value of page lines for that user (or the current value, if +
- status was omitted) + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3140,16 +5858,33 @@ page [number] set page_lines [page 0 20] +.. raw:: html + +
- Module: core +.. _tcl-putbot: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ putbot ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored. + Description + Sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3158,16 +5893,33 @@ putbot putbot OtherBot "Hello from LamestBot" +.. raw:: html - Module: core +
+ +.. _tcl-putallbots: ^^^^^^^^^^^^^^^^^^^^ putallbots ^^^^^^^^^^^^^^^^^^^^ - Description: Sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored. + Description + Sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3176,16 +5928,33 @@ putallbots putallbots "example-message Hello" +.. raw:: html + +
- Module: core +.. _tcl-killdcc: ^^^^^^^^^^^^^ killdcc ^^^^^^^^^^^^^ - Description: Kills a partyline or file area connection. + Description + Kills a partyline or file area connection. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -3194,16 +5963,33 @@ killdcc killdcc 0 +.. raw:: html - Module: core +
+ +.. _tcl-bots: ^^^^ bots ^^^^ - Description: Returns list of the bots currently connected to the botnet. + Description + Returns list of the bots currently connected to the botnet. + + Returns + list of the bots currently connected to the botnet + + .. raw:: html + +
- Returns: list of the bots currently connected to the botnet + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3212,31 +5998,48 @@ bots set linked_bots [bots] +.. raw:: html + +
- Module: core +.. _tcl-botlist: ^^^^^^^ botlist ^^^^^^^ - Description: 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: + Description + 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: - 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``: + 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``: - .. list-table:: - :widths: 18 82 - :header-rows: 1 + .. list-table:: + :widths: 18 82 + :header-rows: 1 - * - Element - - Description - * - ``bot`` - - the bot's botnetnick - * - ``uplink`` - - the bot the bot is connected to - * - ``version`` - - it's current numeric version - * - ``sharing`` - - a ``+`` if the bot is a sharebot; ``-`` otherwise + * - Element + - Description + * - ``bot`` + - the bot's botnetnick + * - ``uplink`` + - the bot the bot is connected to + * - ``version`` + - it's current numeric version + * - ``sharing`` + - a ``+`` if the bot is a sharebot; ``-`` otherwise + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3245,16 +6048,33 @@ botlist set botnet [botlist] +.. raw:: html - Module: core +
+ +.. _tcl-islinked: ^^^^^^^^^^^^^^ islinked ^^^^^^^^^^^^^^ - Description: Returns 1 if the bot is currently linked; 0 otherwise. + Description + Returns ``1`` if the bot is currently linked; 0 otherwise. + + Returns + ``1`` if the bot is currently linked; ``0`` otherwise - Returns: ``1`` if the bot is currently linked; ``0`` otherwise + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3263,16 +6083,33 @@ islinked set linked [islinked OtherBot] +.. raw:: html + +
- Module: core +.. _tcl-dccused: ^^^^^^^ dccused ^^^^^^^ - Description: Returns number of dcc connections currently in use. + Description + Returns number of dcc connections currently in use. + + Returns + number of dcc connections currently in use + + .. raw:: html - Returns: number of dcc connections currently in use +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3281,19 +6118,36 @@ dccused set connections [dccused] +.. raw:: html - Module: core +
+ +.. _tcl-dcclist: ^^^^^^^^^^^^^^ dcclist [type] ^^^^^^^^^^^^^^ - Description: Returns a list of active connections, each item in the list is a sublist containing seven elements: + Description + Returns a list of active connections, each item in the list is a sublist containing seven elements: + + Returns + a list of active connections, each item in the list is a sublist containing seven elements: + ``{ <[+]port> {} }``. + + 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. + + .. raw:: html - Returns: a list of active connections, each item in the list is a sublist containing seven elements: - ``{ <[+]port> {} }``. +
- 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. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3302,46 +6156,51 @@ dcclist [type] set connections [dcclist chat] +.. raw:: html + +
- Module: core +.. _tcl-socklist: ^^^^^^^^^^^^^^^ socklist [type] ^^^^^^^^^^^^^^^ - Description: 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: + Description + 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: - 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: + 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: - .. list-table:: - :widths: 15 85 - :header-rows: 1 + .. list-table:: + :widths: 15 85 + :header-rows: 1 - * - Key - - Description - * - ``idx`` - - integer value assigned to Eggdrop connections - * - ``handle`` - - possible values are (telnet), (bots), (users), - (script) for a listening socket, or the handle of the - connected user for an established connection - * - ``host`` - - the hostname of the connection, if it is known; - otherwise a * - * - ``ip`` - - the ip of the connection - * - ``port`` - - the port number associated with the connection (local - port for listening connections, remote port for server - connections. - * - ``secure`` - - 1 if SSL/TLS is used for the connect; 0 otherwise - * - ``type`` - - the type of connection (TELNET, CHAT, SERVER, etc) - * - ``info`` - - extra information associated with the connection - * - ``time`` - - timestamp of when the socket was established + * - Key + - Description + * - ``idx`` + - integer value assigned to Eggdrop connections + * - ``handle`` + - possible values are (telnet), (bots), (users), + (script) for a listening socket, or the handle of the + connected user for an established connection + * - ``host`` + - the hostname of the connection, if it is known; + otherwise a * + * - ``ip`` + - the ip of the connection + * - ``port`` + - the port number associated with the connection (local + port for listening connections, remote port for server + connections. + * - ``secure`` + - 1 if SSL/TLS is used for the connect; 0 otherwise + * - ``type`` + - the type of connection (TELNET, CHAT, SERVER, etc) + * - ``info`` + - extra information associated with the connection + * - ``time`` + - timestamp of when the socket was established .. admonition:: Example :collapsible: closed @@ -3350,16 +6209,39 @@ socklist [type] set sockets [socklist] + .. raw:: html + +
Module: core +.. raw:: html + +
+ +.. _tcl-whom: + ^^^^^^^^^^^ whom ^^^^^^^^^^^ - Description: 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. + Description + 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. - 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. + 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. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3368,16 +6250,33 @@ whom set users [whom 0] +.. raw:: html - Module: core +
+ +.. _tcl-getdccidle: ^^^^^^^^^^^^^^^^ getdccidle ^^^^^^^^^^^^^^^^ - Description: Returns number of seconds the dcc chat/file system/script user has been idle. + Description + Returns number of seconds the dcc chat/file system/script user has been idle. + + Returns + number of seconds the dcc chat/file system/script user has been idle - Returns: number of seconds the dcc chat/file system/script user has been idle + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3386,16 +6285,33 @@ getdccidle set idle_seconds [getdccidle 0] +.. raw:: html + +
- Module: core +.. _tcl-getdccaway: ^^^^^^^^^^^^^^^^ getdccaway ^^^^^^^^^^^^^^^^ - Description: Returns away message for a dcc chat user (or "" if the user is not set away). + Description + Returns away message for a dcc chat user (or ``""`` if the user is not set away). + + Returns + away message for a dcc chat user (or ``""`` if the user is not set away) + + .. raw:: html - Returns: away message for a dcc chat user (or ``""`` if the user is not set away) +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3404,16 +6320,33 @@ getdccaway set away_message [getdccaway 0] +.. raw:: html - Module: core +
+ +.. _tcl-setdccaway: ^^^^^^^^^^^^^^^^^^^^^^^^^^ setdccaway ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away. + Description + Sets a party line user's away message and marks them away. If set to ``""``, the user is marked as no longer away. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3422,16 +6355,33 @@ setdccaway setdccaway 0 "Away for a moment" +.. raw:: html + +
- Module: core +.. _tcl-connect: ^^^^^^^^^^^^^^^^^^^^^^^^ connect <[+]port> ^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + idx of the new connection + + .. raw:: html + +
+ + Module + ``core`` - Returns: idx of the new connection + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3440,44 +6390,60 @@ connect <[+]port> set idx [connect 127.0.0.1 9000] +.. raw:: html - Module: core +
+ +.. _tcl-listen: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listen [ip] [options [flag]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + ``listen [ip] bots [mask]`` + + **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. + + **Returns:** port number or error message + + ``listen [ip] users [mask]`` + + **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. + + **Returns:** port number or error message - listen [ip] bots [mask] + ``listen [ip] all [mask]`` - 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. + **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. - Returns: port number or error message + **Returns:** port number or error message - listen [ip] users [mask] - - 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. + ``listen [ip] script [flag]`` - Returns: port number or error message + **Description:** accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. The optional flag parameter currently only accepts 'pub' as a value. By specifying 'pub' as a flag, Eggdrop will skip the ident check for the user regardless of settings in the config file. This will allow any user to attempt a connection, and result in Eggdrop using "-telnet!telnet@host" instead of "-telnet!@host" as a hostmask to match against the user. - listen [ip] all [mask] + **Returns:** port number or error message - 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. + ``listen [ip] off`` - Returns: port number or error message + **Description:** stop listening on a port - listen [ip] script [flag] + **Returns:** nothing - Description: accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. The optional flag parameter currently only accepts 'pub' as a value. By specifying 'pub' as a flag, Eggdrop will skip the ident check for the user regardless of settings in the config file. This will allow any user to attempt a connection, and result in Eggdrop using "-telnet!telnet@host" instead of "-telnet!@host" as a hostmask to match against the user. + .. raw:: html - Returns: port number or error message +
- listen [ip] off + Module + ``core`` - Description: stop listening on a port - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3486,16 +6452,33 @@ listen [ip] [options [flag]] set port [listen 127.0.0.1 3333 users] +.. raw:: html + +
- Module: core +.. _tcl-dccdumpfile: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccdumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -3504,21 +6487,34 @@ dccdumpfile dccdumpfile 0 help.txt - - Module: core - Notes Module ------------ +.. _tcl-notes: + ^^^^^^^^^^^^^^^^^^^^^^^^^ notes [numberlist] ^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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: + Description + 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: + + 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:: + + ``{ }`` + + .. raw:: html + +
+ + Module + ``notes`` - 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:: - ``{ }`` + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3527,16 +6523,33 @@ notes [numberlist] set note_count [notes foobar] +.. raw:: html + +
- Module: notes +.. _tcl-erasenotes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ erasenotes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Erases some or all stored notes for a user. Use '-' to erase all notes. + Description + Erases some or all stored notes for a user. Use ``-`` to erase all notes. + + Returns + ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, or number of erased notes. + + .. raw:: html + +
+ + Module + ``notes`` + + + .. raw:: html - Returns: ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, or number of erased notes. +
.. admonition:: Example :collapsible: closed @@ -3545,16 +6558,33 @@ erasenotes set erased [erasenotes foobar "1-3"] +.. raw:: html - Module: notes +
+ +.. _tcl-listnotes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listnotes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Lists existing notes according to the numberlist (ex: "2-4;8;16-"). + Description + Lists existing notes according to the numberlist (ex: ``2-4;8;16-``). + + Returns + ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, list of existing notes. + + .. raw:: html + +
- Returns: ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, list of existing notes. + Module + ``notes`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3563,16 +6593,33 @@ listnotes set notes [listnotes foobar "1-3"] +.. raw:: html + +
- Module: notes +.. _tcl-storenote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ storenote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Stores a note for later reading, notifies idx of any results (use idx -1 for no notify). + Description + Stores a note for later reading, notifies idx of any results (use idx -1 for no notify). - Returns: ``0`` on success; non-``0`` on failure + Returns + ``0`` on success; non-``0`` on failure + + .. raw:: html + +
+ + Module + ``notes`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3581,19 +6628,32 @@ storenote set status [storenote foobar foobar "Remember the meeting." -1] - - Module: notes - Assoc Module ------------ +.. _tcl-assoc: + ^^^^^^^^^^^^^^^^^^^ assoc [name] ^^^^^^^^^^^^^^^^^^^ - Description: Sets the name associated with a botnet channel, if you specify one. + Description + Sets the name associated with a botnet channel, if you specify one. + + Returns + current name for that channel, if any + + .. raw:: html + +
- Returns: current name for that channel, if any + Module + ``assoc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3602,16 +6662,33 @@ assoc [name] set name [assoc 1 lamest] +.. raw:: html + +
- Module: assoc +.. _tcl-killassoc: ^^^^^^^^^^^^^^^^ killassoc ^^^^^^^^^^^^^^^^ - Description: Removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs. + Description + Removes the name associated with a botnet channel, if any exists. Use ``killassoc &`` to kill all assocs. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``assoc`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3620,57 +6697,108 @@ killassoc killassoc 1 - - Module: assoc - Compress Module --------------- +.. _tcl-compressfile: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compressfile [-level ] [target-file] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Compresses a file. The optional level specifies the compression mode from 0 (minimum CPU usage and compression) through 9 (maximum CPU usage and compression). If target-file is omitted, src-file is overwritten. + Description + Compresses a file. The optional level specifies the compression mode from 0 (minimum CPU usage and compression) through 9 (maximum CPU usage and compression). If target-file is omitted, src-file is overwritten. - Returns: nothing + Returns + nothing - .. admonition:: Example + See also + :ref:`uncompressfile `, :ref:`iscompressed ` + + .. raw:: html + +
+ + Module + ``compress`` + + + .. raw:: html + +
+ + .. admonition:: Example — Compress a file :collapsible: closed .. code-block:: tcl compressfile -level 6 example.txt example.txt.gz - See also: uncompressfile, iscompressed +.. raw:: html + +
- Module: compress +.. _tcl-uncompressfile: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ uncompressfile [target-file] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Uncompresses a file. If target-file is omitted, src-file is overwritten. + Description + Uncompresses a file. If target-file is omitted, src-file is overwritten. - Returns: nothing + Returns + nothing - .. admonition:: Example + See also + :ref:`compressfile `, :ref:`iscompressed ` + + .. raw:: html + +
+ + Module + ``compress`` + + + .. raw:: html + +
+ + .. admonition:: Example — Uncompress a file :collapsible: closed .. code-block:: tcl uncompressfile example.txt.gz example.txt - See also: compressfile, iscompressed +.. raw:: html - Module: compress +
+ +.. _tcl-iscompressed: ^^^^^^^^^^^^^^^^^^^^^^^ iscompressed ^^^^^^^^^^^^^^^^^^^^^^^ - Description: Determines whether is gzip compressed. . + Description + Determines whether ```` is gzip compressed. . + + Returns + ``1`` if it is, ``0`` if it isn't, and ``2`` if some kind of error prevented the checks from succeeding. + + .. raw:: html + +
+ + Module + ``compress`` + - Returns: ``1`` if it is, ``0`` if it isn't, and ``2`` if some kind of error prevented the checks from succeeding. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3679,19 +6807,32 @@ iscompressed set compressed [iscompressed example.gz] - - Module: compress - Filesys Module -------------- +.. _tcl-setpwd: + ^^^^^^^^^^^^^^^^^^ setpwd ^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``filesys`` - Returns: nothing + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3700,16 +6841,33 @@ setpwd setpwd 0 / +.. raw:: html - Module: filesys +
+ +.. _tcl-getpwd: ^^^^^^^^^^^^ getpwd ^^^^^^^^^^^^ - Description: Returns the current directory of a file system user. + Description + Returns the current directory of a file system user. + + Returns + the current directory of a file system user + + .. raw:: html + +
+ + Module + ``filesys`` + - Returns: the current directory of a file system user + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3718,15 +6876,32 @@ getpwd set directory [getpwd 0] +.. raw:: html + +
- Module: filesys +.. _tcl-getfiles: ^^^^^^^^^^^^^^ getfiles ^^^^^^^^^^^^^^ - Description: Returns a list of files in the directory given; the directory is relative to dcc-path. - Returns: a list of files in the directory given; the directory is relative to dcc-path + Description + Returns a list of files in the directory given; the directory is relative to dcc-path. + Returns + a list of files in the directory given; the directory is relative to dcc-path + + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3735,16 +6910,33 @@ getfiles set files [getfiles /] +.. raw:: html - Module: filesys +
+ +.. _tcl-getdirs: ^^^^^^^^^^^^^ getdirs ^^^^^^^^^^^^^ - Description: Returns a list of subdirectories in the directory given; the directory is relative to dcc-path. + Description + Returns a list of subdirectories in the directory given; the directory is relative to dcc-path. + + Returns + a list of subdirectories in the directory given; the directory is relative to dcc-path + + .. raw:: html + +
- Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3753,36 +6945,52 @@ getdirs set directories [getdirs /] +.. raw:: html + +
- Module: filesys +.. _tcl-dccsend: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccsend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. - Returns: + Returns - .. list-table:: - :widths: 9 91 - :header-rows: 1 + .. list-table:: + :widths: 9 91 + :header-rows: 1 - * - Return value - - Description - * - ``0`` - - success - * - ``1`` - - the dcc table is full (too many connections) - * - ``2`` - - can't open a socket for the transfer - * - ``3`` - - the file doesn't exist - * - ``4`` - - the file was queued for later transfer, which means that person has - too many file transfers going right now - * - ``5`` - - the file could not be opened or temporary file could not be created + * - Return value + - Description + * - ``0`` + - success + * - ``1`` + - the dcc table is full (too many connections) + * - ``2`` + - can't open a socket for the transfer + * - ``3`` + - the file doesn't exist + * - ``4`` + - the file was queued for later transfer, which means that person has + too many file transfers going right now + * - ``5`` + - the file could not be opened or temporary file could not be created + + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3791,16 +6999,33 @@ dccsend set result [dccsend example.txt Foobar] +.. raw:: html - Module: transfer +
+ +.. _tcl-filesend: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ filesend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + ``0`` on failure; ``1`` on success (either an immediate send or a queued send) - Returns: ``0`` on failure; ``1`` on success (either an immediate send or a queued send) + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3809,16 +7034,33 @@ filesend [ircnick] set result [filesend 0 example.txt Foobar] +.. raw:: html + +
- Module: filesys +.. _tcl-fileresend: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fileresend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + ``0`` on failure; ``1`` on success (either an immediate send or a queued send) + + .. raw:: html - Returns: ``0`` on failure; ``1`` on success (either an immediate send or a queued send) +
+ + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3827,16 +7069,33 @@ fileresend [ircnick] set result [fileresend 0 example.txt Foobar] +.. raw:: html - Module: filesys +
+ +.. _tcl-setdesc: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setdesc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sets the description for a file in a file system directory; the directory is relative to dcc-path. + Description + Sets the description for a file in a file system directory; the directory is relative to dcc-path. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3845,16 +7104,33 @@ setdesc setdesc / example.txt "Example file" +.. raw:: html + +
- Module: filesys +.. _tcl-getdesc: ^^^^^^^^^^^^^^^^^^^^ getdesc ^^^^^^^^^^^^^^^^^^^^ - Description: Returns the description for a file in the file system, if one exists. + Description + Returns the description for a file in the file system, if one exists. + + Returns + the description for a file in the file system, if one exists + + .. raw:: html + +
+ + Module + ``filesys`` - Returns: the description for a file in the file system, if one exists + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3863,16 +7139,33 @@ getdesc set description [getdesc / example.txt] +.. raw:: html - Module: filesys +
+ +.. _tcl-setowner: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setowner ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Changes the owner for a file in the file system; the directory is relative to dcc-path. + Description + Changes the owner for a file in the file system; the directory is relative to dcc-path. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``filesys`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3881,16 +7174,33 @@ setowner setowner / example.txt foobar +.. raw:: html + +
- Module: filesys +.. _tcl-getowner: ^^^^^^^^^^^^^^^^^^^^^ getowner ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns the owner of a file in the file system. + Description + Returns the owner of a file in the file system. + + Returns + the owner of a file in the file system + + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html - Returns: the owner of a file in the file system +
.. admonition:: Example :collapsible: closed @@ -3899,16 +7209,33 @@ getowner set owner [getowner / example.txt] +.. raw:: html - Module: filesys +
+ +.. _tcl-setlink: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setlink ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path. + Description + Creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3917,16 +7244,33 @@ setlink setlink / example.txt OtherBot:/example.txt +.. raw:: html + +
- Module: filesys +.. _tcl-getlink: ^^^^^^^^^^^^^^^^^^^^ getlink ^^^^^^^^^^^^^^^^^^^^ - Description: Returns the link for a linked file, if it exists. + Description + Returns the link for a linked file, if it exists. - Returns: the link for a linked file, if it exists + Returns + the link for a linked file, if it exists + + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3935,16 +7279,33 @@ getlink set link [getlink / example.txt] +.. raw:: html - Module: filesys +
+ +.. _tcl-getfileq: ^^^^^^^^^^^^^^^^^ getfileq ^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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 - 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 + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3953,27 +7314,44 @@ getfileq set queued_files [getfileq foobar] +.. raw:: html + +
- Module: transfer +.. _tcl-getfilesendtime: ^^^^^^^^^^^^^^^^^^^^^ getfilesendtime ^^^^^^^^^^^^^^^^^^^^^ - Description: Returns the unixtime value from when a file transfer started, or a negative number: + Description + Returns the unixtime value from when a file transfer started, or a negative number: + + Returns + the unixtime value from when a file transfer started, or a negative number: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 - Returns: the unixtime value from when a file transfer started, or a negative number: + * - Return value + - Description + * - ``-1`` + - no matching transfer with the specified idx was found + * - ``-2`` + - the idx matches an entry which is not a file transfer - .. list-table:: - :widths: 8 92 - :header-rows: 1 + .. raw:: html - * - Return value - - Description - * - ``-1`` - - no matching transfer with the specified idx was found - * - ``-2`` - - the idx matches an entry which is not a file transfer +
+ + Module + ``transfer`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -3982,31 +7360,47 @@ getfilesendtime set result [getfilesendtime 0] +.. raw:: html - Module: transfer +
+ +.. _tcl-mkdir: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mkdir [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Creates a directory in the file system. Only users with the required flags may access it. + Description + Creates a directory in the file system. Only users with the required flags may access it. + + Returns + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``0`` + - success + * - ``1`` + - can't create directory + * - ``2`` + - directory exists but is not a directory + * - ``-3`` + - could not open filedb - Returns: + .. raw:: html - .. list-table:: - :widths: 8 92 - :header-rows: 1 +
- * - Return value - - Description - * - ``0`` - - success - * - ``1`` - - can't create directory - * - ``2`` - - directory exists but is not a directory - * - ``-3`` - - could not open filedb + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4015,16 +7409,33 @@ mkdir [ [channel]] set result [mkdir /examples] +.. raw:: html + +
- Module: filesys +.. _tcl-rmdir: ^^^^^^^^^^^^^^^^^ rmdir ^^^^^^^^^^^^^^^^^ - Description: Removes a directory from the file system. + Description + Removes a directory from the file system. + + Returns + ``0`` on success; ``1`` on failure + + .. raw:: html + +
+ + Module + ``filesys`` - Returns: ``0`` on success; ``1`` on failure + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4033,31 +7444,48 @@ rmdir set result [rmdir /examples] +.. raw:: html - Module: filesys +
+ +.. _tcl-mv: ^^^^^^^^^^^^^^^^^^^^^^^ mv ^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``-1`` + - invalid source file + * - ``-2`` + - invalid destination + * - ``-3`` + - destination file exists + * - ``-4`` + - no matches found + + .. raw:: html + +
- Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned: + Module + ``filesys`` - .. list-table:: - :widths: 8 92 - :header-rows: 1 - * - Return value - - Description - * - ``-1`` - - invalid source file - * - ``-2`` - - invalid destination - * - ``-3`` - - destination file exists - * - ``-4`` - - no matches found + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4066,31 +7494,48 @@ mv set moved [mv /incoming/example.txt /files/example.txt] +.. raw:: html + +
- Module: filesys +.. _tcl-cp: ^^^^^^^^^^^^^^^^^^^^^^^ cp ^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - Return value + - Description + * - ``-1`` + - invalid source file + * - ``-2`` + - invalid destination + * - ``-3`` + - destination file exists + * - ``-4`` + - no matches found + + .. raw:: html + +
+ + Module + ``filesys`` - Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned: - .. list-table:: - :widths: 8 92 - :header-rows: 1 + .. raw:: html - * - Return value - - Description - * - ``-1`` - - invalid source file - * - ``-2`` - - invalid destination - * - ``-3`` - - destination file exists - * - ``-4`` - - no matches found +
.. admonition:: Example :collapsible: closed @@ -4099,15 +7544,33 @@ cp set copied [cp /incoming/example.txt /files/example.txt] - Module: filesys +.. raw:: html + +
+ +.. _tcl-getflags: ^^^^^^^^^^^^^^ getflags ^^^^^^^^^^^^^^ - Description: Returns the flags required to access a directory. + Description + Returns the flags required to access a directory. + + Returns + the flags required to access a directory + + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html - Returns: the flags required to access a directory +
.. admonition:: Example :collapsible: closed @@ -4116,16 +7579,33 @@ getflags set required_flags [getflags /] +.. raw:: html - Module: filesys +
+ +.. _tcl-setflags: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setflags [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Sets the flags required to access a directory. + Description + Sets the flags required to access a directory. + + Returns + ``0`` on success; ``-1`` or ``-3`` on failure + + .. raw:: html + +
- Returns: ``0`` on success; ``-1`` or ``-3`` on failure + Module + ``filesys`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4134,20 +7614,33 @@ setflags [ [channel]] setflags /examples +o "#lamest" - - Module: filesys - PBKDF2 Module ------------- +.. _tcl-encpass2: + ^^^^^^^^^^^^^^^ encpass2 ^^^^^^^^^^^^^^^ - Description: Returns a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + Description + Returns a hash in the format of ``$pbkdf2-$rounds=$$`` where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + + + Returns + a hash in the format of ``$pbkdf2-$rounds=$$`` where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. + + .. raw:: html + +
+ + Module + ``pbkdf2`` + + .. raw:: html - Returns: a hash in the format of ``$pbkdf2-$rounds=$$`` where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. +
.. admonition:: Example :collapsible: closed @@ -4156,16 +7649,33 @@ encpass2 set hash [encpass2 "example-password"] +.. raw:: html - Module: pbkdf2 +
+ +.. _tcl-pbkdf2: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pbkdf2 [-bin] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + Description + Returns a derived key from the provided ``pass`` string using ``salt`` and ``rounds`` count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + + Returns + a derived key from the provided ``pass`` string using ``salt`` and ``rounds`` count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + + .. raw:: html + +
- Returns: a derived key from the provided ``pass`` string using ``salt`` and ``rounds`` count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. + Module + ``pbkdf2`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4174,19 +7684,32 @@ pbkdf2 [-bin] set key [pbkdf2 "example-password" "example-salt" 10000 sha256] - - Module: pbkdf2 - Miscellaneous Commands ---------------------- +.. _tcl-bind: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bind [proc-name] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). + + Returns + name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command +
.. admonition:: Example :collapsible: closed @@ -4195,16 +7718,33 @@ bind [proc-name] bind pub - !hello example_hello +.. raw:: html - Module: core +
+ +.. _tcl-unbind: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unbind ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes a previously created bind. + Description + Removes a previously created bind. + + Returns + name of the command that was removed + + .. raw:: html + +
- Returns: name of the command that was removed + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4213,17 +7753,34 @@ unbind unbind pub - !hello example_hello +.. raw:: html + +
- Module: core +.. _tcl-binds: ^^^^^^^^^^^^^^^^^ binds [type/mask] ^^^^^^^^^^^^^^^^^ - Description: By default, lists Tcl binds registered with the Eggdrop. You can specify 'all' to view all binds, 'tcl' to view Tcl binds, and 'python' to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. + Description + By default, lists Tcl binds registered with the Eggdrop. You can specify ``all`` to view all binds, ``tcl`` to view Tcl binds, and ``python`` to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. - Returns: a list of Tcl binds, each item in the list is a sublist of five elements: - ``{ }`` + Returns + a list of Tcl binds, each item in the list is a sublist of five elements: + ``{ }`` + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4232,61 +7789,78 @@ binds [type/mask] set public_binds [binds pub] +.. raw:: html - Module: core +
+ +.. _tcl-logfile: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ logfile [ ] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. - - Logfile flags: - - .. list-table:: - :widths: 7 93 - :header-rows: 1 - - * - ``modes`` - - Description - * - ``b`` - - information about bot linking and userfile sharing - * - ``c`` - - commands - * - ``d`` - - misc debug information - * - ``g`` - - raw outgoing share traffic - * - ``h`` - - raw incoming share traffic - * - ``j`` - - joins, parts, quits, topic changes, and netsplits on the channel - * - ``k`` - - kicks, bans, and mode changes on the channel - * - ``l`` - - linked bot messages - * - ``m`` - - private msgs, notices and ctcps to the bot - * - ``o`` - - misc info, errors, etc (IMPORTANT STUFF) - * - ``p`` - - public text on the channel - * - ``r`` - - raw incoming server traffic - * - ``s`` - - server connects, disconnects, and notices - * - ``t`` - - raw incoming botnet traffic - * - ``u`` - - raw outgoing botnet traffic - * - ``v`` - - raw outgoing server traffic - * - ``w`` - - wallops (make sure the bot sets +w in init-server) - * - ``x`` - - file transfers and file-area commands - - Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: ``{mco * eggdrop.log}`` ``{jp #lamest lame.log}`` + 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. + + Logfile flags: + + .. list-table:: + :widths: 7 93 + :header-rows: 1 + + * - ``modes`` + - Description + * - ``b`` + - information about bot linking and userfile sharing + * - ``c`` + - commands + * - ``d`` + - misc debug information + * - ``g`` + - raw outgoing share traffic + * - ``h`` + - raw incoming share traffic + * - ``j`` + - joins, parts, quits, topic changes, and netsplits on the channel + * - ``k`` + - kicks, bans, and mode changes on the channel + * - ``l`` + - linked bot messages + * - ``m`` + - private msgs, notices and ctcps to the bot + * - ``o`` + - misc info, errors, etc (IMPORTANT STUFF) + * - ``p`` + - public text on the channel + * - ``r`` + - raw incoming server traffic + * - ``s`` + - server connects, disconnects, and notices + * - ``t`` + - raw incoming botnet traffic + * - ``u`` + - raw outgoing botnet traffic + * - ``v`` + - raw outgoing server traffic + * - ``w`` + - wallops (make sure the bot sets +w in init-server) + * - ``x`` + - file transfers and file-area commands + + Returns + filename of logfile created, or, if no logfile is specified, a list of logfiles such as: ``{mco * eggdrop.log}`` ``{jp #lamest lame.log}`` + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4295,51 +7869,68 @@ logfile [ ] set logfiles [logfile] +.. raw:: html + +
- Module: core +.. _tcl-maskhost: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ maskhost [masktype] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Returns masked hostmask for the string given according to the masktype (the default is 3). + Description + Returns masked hostmask for the string given according to the masktype (the default is 3). + + Returns + masked hostmask for the string given according to the masktype (the default is 3). + + Available types are: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``masktype`` + - Description + * - ``0`` + - \*!user\@host + * - ``1`` + - \*!*user\@host + * - ``2`` + - \*!*\@host + * - ``3`` + - \*!*user\@*.host + * - ``4`` + - \*!*\@*.host + * - ``5`` + - nick!user\@host + * - ``6`` + - nick!*user\@host + * - ``7`` + - nick!*\@host + * - ``8`` + - nick!*user\@*.host + * - ``9`` + - nick!*\@*.host + + You can also specify types from 10 to 19 which correspond to types + 0 to 9, but instead of using a * wildcard to replace portions of the + host, only numbers in hostnames are replaced with the '?' wildcard. + Same is valid for types 20-29, but instead of '?', the '\*' wildcard + will be used. Types 30-39 set the host to '\*'. + + .. raw:: html - Returns: masked hostmask for the string given according to the masktype (the default is 3). +
- Available types are: + Module + ``core`` - .. list-table:: - :widths: 8 92 - :header-rows: 1 - * - ``masktype`` - - Description - * - ``0`` - - \*!user\@host - * - ``1`` - - \*!*user\@host - * - ``2`` - - \*!*\@host - * - ``3`` - - \*!*user\@*.host - * - ``4`` - - \*!*\@*.host - * - ``5`` - - nick!user\@host - * - ``6`` - - nick!*user\@host - * - ``7`` - - nick!*\@host - * - ``8`` - - nick!*user\@*.host - * - ``9`` - - nick!*\@*.host + .. raw:: html - You can also specify types from 10 to 19 which correspond to types - 0 to 9, but instead of using a * wildcard to replace portions of the - host, only numbers in hostnames are replaced with the '?' wildcard. - Same is valid for types 20-29, but instead of '?', the '\*' wildcard - will be used. Types 30-39 set the host to '\*'. +
.. admonition:: Example :collapsible: closed @@ -4348,52 +7939,103 @@ maskhost [masktype] set mask [maskhost "Foobar!foobar@127.0.0.1"] +.. raw:: html - Module: core +
+ +.. _tcl-timer: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ timer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of "timer". + 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. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of ``timer``. - Returns: a ``timerName`` + Returns + a ``timerName`` - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Schedule a timer :collapsible: closed .. code-block:: tcl set id [timer 5 {putlog "Example timer fired."}] +.. raw:: html - Module: core +
+ +.. _tcl-utimer: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utimer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of "timer". + 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. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of ``timer``. - Returns: a ``timerName`` + Returns + a ``timerName`` - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Schedule a short timer :collapsible: closed .. code-block:: tcl set id [utimer 30 {putlog "Example timer fired."}] +.. raw:: html - Module: core +
+ +.. _tcl-timers: ^^^^^^ timers ^^^^^^ - Description: Lists all active minutely timers. + Description + Lists all active minutely timers. + + Returns + a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + + .. raw:: html + +
- Returns: a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4402,16 +8044,33 @@ timers set active_timers [timers] +.. raw:: html + +
- Module: core +.. _tcl-utimers: ^^^^^^^ utimers ^^^^^^^ - Description: Lists all active secondly timers. + Description + Lists all active secondly timers. - Returns: a list of active secondly timers, with each timer sub-list containing the number of seconds left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + Returns + a list of active secondly timers, with each timer sub-list containing the number of seconds left until activation, the command that will be executed, the timerName, and the remaining number of repeats. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4420,15 +8079,33 @@ utimers set active_timers [utimers] - Module: core +.. raw:: html + +
+ +.. _tcl-killtimer: ^^^^^^^^^^^^^^^^^^^^^ killtimer ^^^^^^^^^^^^^^^^^^^^^ - Description: Removes the timerName minutely timer from the timer list. + Description + Removes the timerName minutely timer from the timer list. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4438,16 +8115,33 @@ killtimer set timer_id [timer 5 {putlog "Example timer fired."}] killtimer $timer_id +.. raw:: html - Module: core +
+ +.. _tcl-killutimer: ^^^^^^^^^^^^^^^^^^^^^^ killutimer ^^^^^^^^^^^^^^^^^^^^^^ - Description: Removes the timerName secondly timer from the timer list. + Description + Removes the timerName secondly timer from the timer list. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4457,17 +8151,34 @@ killutimer set timer_id [utimer 30 {putlog "Example timer fired."}] killutimer $timer_id +.. raw:: html + +
- Module: core +.. _tcl-unixtime: ^^^^^^^^ unixtime ^^^^^^^^ - Description: Returns the current Unix timestamp. + Description + Returns the current Unix timestamp. + + + Returns + a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT). + .. raw:: html - Returns: a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT). +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4476,16 +8187,33 @@ unixtime set now [unixtime] +.. raw:: html - Module: core +
+ +.. _tcl-duration: ^^^^^^^^^^^^^^^^^^ duration ^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4494,16 +8222,33 @@ duration set readable [duration 3600] +.. raw:: html + +
- Module: core +.. _tcl-strftime: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strftime [time] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
+ + Module + ``core`` - 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. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4512,16 +8257,33 @@ strftime [time] set date [strftime "%Y-%m-%d"] +.. raw:: html - Module: core +
+ +.. _tcl-ctime: ^^^^^^^^^^^^^^^^ ctime ^^^^^^^^^^^^^^^^ - Description: 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". + Description + 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``. + + 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`` + + .. raw:: html + +
+ + Module + ``core`` + - 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`` + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4530,16 +8292,33 @@ ctime set date [ctime [unixtime]] +.. raw:: html + +
- Module: core +.. _tcl-myip: ^^^^ myip ^^^^ - Description: Returns a long number representing the bot's IP address, as it might appear in (for example) a DCC request. + Description + Returns a long number representing the bot's IP address, as it might appear in (for example) a DCC request. + + Returns + a long number representing the bot's IP address, as it might appear in (for example) a DCC request + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: a long number representing the bot's IP address, as it might appear in (for example) a DCC request +
.. admonition:: Example :collapsible: closed @@ -4548,16 +8327,33 @@ myip set result [myip] +.. raw:: html - Module: core +
+ +.. _tcl-rand: ^^^^^^^^^^^^ rand ^^^^^^^^^^^^ - Description: 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. + Description + 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. + + 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. + + .. raw:: html + +
- 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. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4566,16 +8362,33 @@ rand set value [rand 100] +.. raw:: html + +
- Module: core +.. _tcl-control: ^^^^^^^^^^^^^^^^^^^^^^^ control ^^^^^^^^^^^^^^^^^^^^^^^ - 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". + 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". - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4584,35 +8397,51 @@ control control 0 example_proc +.. raw:: html - Module: core +
+ +.. _tcl-sendnote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sendnote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Simulates what happens when one user sends a note to another. + Description + Simulates what happens when one user sends a note to another. + + Returns - Returns: + .. list-table:: + :widths: 8 92 + :header-rows: 1 - .. list-table:: - :widths: 8 92 - :header-rows: 1 + * - Return value + - Description + * - ``0`` + - the send failed + * - ``1`` + - the note was delivered locally or sent to another bot + * - ``2`` + - the note was stored locally + * - ``3`` + - the user's notebox is too full to store a note + * - ``4`` + - a Tcl binding caught the note + * - ``5`` + - the note was stored because the user is away - * - Return value - - Description - * - ``0`` - - the send failed - * - ``1`` - - the note was delivered locally or sent to another bot - * - ``2`` - - the note was stored locally - * - ``3`` - - the user's notebox is too full to store a note - * - ``4`` - - a Tcl binding caught the note - * - ``5`` - - the note was stored because the user is away + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4621,34 +8450,68 @@ sendnote set result [sendnote foobar foobar "Example note"] +.. raw:: html + +
- Module: core +.. _tcl-link: ^^^^^^^^^^^^^^^^^^^^ link [via-bot] ^^^^^^^^^^^^^^^^^^^^ - Description: Attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. + Description + Attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. - Returns: ``1`` if the link will be attempted; ``0`` otherwise + Returns + ``1`` if the link will be attempted; ``0`` otherwise - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Link a bot :collapsible: closed .. code-block:: tcl set started [link OtherBot] +.. raw:: html + +
- Module: core +.. _tcl-unlink: ^^^^^^^^^^^^^^^^^^^^^^ unlink [comment] ^^^^^^^^^^^^^^^^^^^^^^ - Description: Attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. + Description + Attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. + + Returns + ``1`` on success; ``0`` otherwise + + .. raw:: html - Returns: ``1`` on success; ``0`` otherwise +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4657,16 +8520,33 @@ unlink [comment] set removed [unlink OtherBot "Maintenance"] +.. raw:: html - Module: core +
+ +.. _tcl-encrypt: ^^^^^^^^^^^^^^^^^^^^^^ encrypt ^^^^^^^^^^^^^^^^^^^^^^ - Description: 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.0. + Description + 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.0. + + 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.0. + + .. raw:: html + +
- 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.0. + Module + ``encryption`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4675,18 +8555,35 @@ encrypt set result [encrypt "example-password" "Example text"] +.. raw:: html + +
- Module: encryption +.. _tcl-decrypt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ decrypt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: 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). + Description + 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). - 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). + 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). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``encryption`` + + + .. raw:: html + +
+ + .. admonition:: Example — Encrypt and decrypt text :collapsible: closed .. code-block:: tcl @@ -4694,16 +8591,33 @@ decrypt set encrypted [encrypt "example-password" "Example text"] set plain [decrypt "example-password" $encrypted] +.. raw:: html + +
- Module: encryption +.. _tcl-encpass: ^^^^^^^^^^^^^^^^^^ encpass ^^^^^^^^^^^^^^^^^^ - Description: Returns encrypted string (using the currently loaded encryption module). + Description + Returns encrypted string (using the currently loaded encryption module). + + Returns + encrypted string (using the currently loaded encryption module) + + .. raw:: html + +
+ + Module + ``encryption`` - Returns: encrypted string (using the currently loaded encryption module) + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4712,16 +8626,33 @@ encpass set encrypted [encpass "example-password"] +.. raw:: html - Module: encryption +
+ +.. _tcl-die: ^^^^^^^^^^^^ die [reason] ^^^^^^^^^^^^ - Description: Causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used. + Description + Causes the bot to log a fatal error and exit completely. If no reason is given, ``EXIT`` is used. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4730,16 +8661,33 @@ die [reason] die +.. raw:: html + +
- Module: core +.. _tcl-unames: ^^^^^^ unames ^^^^^^ - Description: Returns the current operating system the bot is using. + Description + Returns the current operating system the bot is using. + + Returns + the current operating system the bot is using + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: the current operating system the bot is using +
.. admonition:: Example :collapsible: closed @@ -4748,24 +8696,41 @@ unames set result [unames] +.. raw:: html - Module: core +
+ +.. _tcl-dnslookup: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dnslookup [[arg1] [arg2] ... [argN]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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). + 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). - As soon as the request completes, the specified proc will be called as follows: + As soon as the request completes, the specified proc will be called as follows: - [[arg1] [arg2] ... [argN]] + [[arg1] [arg2] ... [argN]] - 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. + 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. - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Resolve a hostname :collapsible: closed .. code-block:: tcl @@ -4775,16 +8740,33 @@ dnslookup [[arg1] [arg2] ... [argN]] } dnslookup irc.example.net example_dns_result +.. raw:: html - Module: core +
+ +.. _tcl-md5: ^^^^^^^^^^^^ md5 ^^^^^^^^^^^^ - Description: Returns the 128 bit MD5 message-digest of the specified string. + Description + Returns the 128 bit MD5 message-digest of the specified string. + + Returns + the 128 bit MD5 message-digest of the specified string + + .. raw:: html + +
- Returns: the 128 bit MD5 message-digest of the specified string + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4793,16 +8775,33 @@ md5 set digest [md5 "example text"] +.. raw:: html + +
- Module: core +.. _tcl-callevent: ^^^^^^^^^^^^^^^^^ callevent ^^^^^^^^^^^^^^^^^ - 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. + 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. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4811,16 +8810,33 @@ callevent callevent example-event +.. raw:: html - Module: core +
+ +.. _tcl-traffic: ^^^^^^^ traffic ^^^^^^^ - Description: 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). + Description + 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). + + 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). - 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). + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4829,15 +8845,32 @@ traffic set usage [traffic] +.. raw:: html + +
- Module: core +.. _tcl-modules: ^^^^^^^ modules ^^^^^^^ - Description: 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. - 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. + Description + 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. + 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. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4846,16 +8879,33 @@ modules set loaded_modules [modules] +.. raw:: html - Module: core +
+ +.. _tcl-loadmodule: ^^^^^^^^^^^^^^^^^^^ loadmodule ^^^^^^^^^^^^^^^^^^^ - Description: Attempts to load the specified module. + Description + Attempts to load the specified module. + + Returns + ``Already loaded.`` if the module is already loaded, ``""`` if successful, or the reason the module couldn't be loaded. + + .. raw:: html + +
- Returns: ``Already loaded.`` if the module is already loaded, ``""`` if successful, or the reason the module couldn't be loaded. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4864,16 +8914,33 @@ loadmodule set result [loadmodule notes] +.. raw:: html + +
- Module: core +.. _tcl-unloadmodule: ^^^^^^^^^^^^^^^^^^^^^ unloadmodule ^^^^^^^^^^^^^^^^^^^^^ - Description: Attempts to unload the specified module. + Description + Attempts to unload the specified module. + + Returns + ``No such module`` if the module is not loaded, ``""`` otherwise. + + .. raw:: html + +
+ + Module + ``core`` - Returns: ``No such module`` if the module is not loaded, ``""`` otherwise. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4882,16 +8949,33 @@ unloadmodule set result [unloadmodule notes] +.. raw:: html - Module: core +
+ +.. _tcl-loadhelp: ^^^^^^^^^^^^^^^^^^^^^^^^ loadhelp ^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Attempts to load the specified help file from the help/ directory. + Description + Attempts to load the specified help file from the help/ directory. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + - Returns: nothing + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4900,16 +8984,33 @@ loadhelp loadhelp example.help +.. raw:: html + +
- Module: core +.. _tcl-unloadhelp: ^^^^^^^^^^^^^^^^^^^^^^^^^^ unloadhelp ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Attempts to unload the specified help file. + Description + Attempts to unload the specified help file. + + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: nothing +
.. admonition:: Example :collapsible: closed @@ -4918,16 +9019,33 @@ unloadhelp unloadhelp example.help +.. raw:: html - Module: core +
+ +.. _tcl-reloadhelp: ^^^^^^^^^^ reloadhelp ^^^^^^^^^^ - Description: Reloads the bot's help files. + Description + Reloads the bot's help files. + + Returns + nothing + + .. raw:: html + +
- Returns: nothing + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4936,16 +9054,33 @@ reloadhelp reloadhelp +.. raw:: html + +
- Module: core +.. _tcl-restart: ^^^^^^^ restart ^^^^^^^ - Description: Rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list. + Description + Rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list. - Returns: nothing + Returns + nothing + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4954,16 +9089,33 @@ restart restart +.. raw:: html - Module: core +
+ +.. _tcl-rehash: ^^^^^^ rehash ^^^^^^ - Description: Rehashes the bot. + Description + Rehashes the bot. + + Returns + nothing - Returns: nothing + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -4972,41 +9124,58 @@ rehash rehash +.. raw:: html + +
- Module: core +.. _tcl-stripcodes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stripcodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Strips specified control characters from the string given. strip-flags can be any combination of the following: + Description + Strips specified control characters from the string given. strip-flags can be any combination of the following: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``strip-flags`` + - Description + * - ``c`` + - remove all color codes + * - ``b`` + - remove all boldface codes + * - ``r`` + - remove all reverse video codes + * - ``u`` + - remove all underline codes + * - ``a`` + - remove all ANSI codes + * - ``g`` + - remove all ctrl-g (bell) codes + * - ``o`` + - remove all ordinary codes (ctrl+o, terminates bold/color/..) + * - ``i`` + - remove all italics codes + * - ``\*`` + - remove all of the above - .. list-table:: - :widths: 8 92 - :header-rows: 1 + Returns + the stripped string. - * - ``strip-flags`` - - Description - * - ``c`` - - remove all color codes - * - ``b`` - - remove all boldface codes - * - ``r`` - - remove all reverse video codes - * - ``u`` - - remove all underline codes - * - ``a`` - - remove all ANSI codes - * - ``g`` - - remove all ctrl-g (bell) codes - * - ``o`` - - remove all ordinary codes (ctrl+o, terminates bold/color/..) - * - ``i`` - - remove all italics codes - * - ``\*`` - - remove all of the above + .. raw:: html - Returns: the stripped string. +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5015,16 +9184,33 @@ stripcodes set clean [stripcodes c "Example text"] +.. raw:: html - Module: core +
+ +.. _tcl-matchaddr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchaddr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Checks if the address matches the hostmask given. The address should be in the form nick!user\@host. + Description + Checks if the address matches the hostmask given. The address should be in the form nick!user\@host. + + Returns + ``1`` if the address matches the hostmask, ``0`` otherwise. + + .. raw:: html + +
- Returns: ``1`` if the address matches the hostmask, ``0`` otherwise. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5033,17 +9219,34 @@ matchaddr
set matched [matchaddr "*!*@127.0.0.1" "Foobar!foobar@127.0.0.1"] +.. raw:: html + +
- Module: core +.. _tcl-matchcidr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchcidr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. + Description + Performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. + + + Returns + ``1`` if the address matches the block prefix, ``0`` otherwise. + + .. raw:: html + +
+ Module + ``core`` - Returns: ``1`` if the address matches the block prefix, ``0`` otherwise. + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5052,16 +9255,33 @@ matchcidr
set matched [matchcidr 127.0.0.0 127.0.0.1 8] +.. raw:: html - Module: core +
+ +.. _tcl-matchstr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchstr ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + ``1`` if the pattern matches the string, ``0`` if it doesn't. + + .. raw:: html + +
+ + Module + ``core`` + - Returns: ``1`` if the pattern matches the string, ``0`` if it doesn't. + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5070,16 +9290,33 @@ matchstr set matched [matchstr "Foo*" "Foobar"] +.. raw:: html + +
- Module: core +.. _tcl-rfcequal: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rfcequal ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Description: Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []\^, depending on the rfc_compliant setting. + Description + Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []\^, depending on the rfc_compliant setting. + + Returns + ``1`` if equal, ``0`` if not. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html - Returns: ``1`` if equal, ``0`` if not. +
.. admonition:: Example :collapsible: closed @@ -5088,31 +9325,48 @@ rfcequal set equal [rfcequal "Foobar" "foobar"] +.. raw:: html - Module: core +
+ +.. _tcl-status: ^^^^^^^^^^^^^ status [type] ^^^^^^^^^^^^^ - Description: Provides eggdrop status information similar to the .status command in partyline. The available types of information are: + Description + Provides eggdrop status information similar to the ``.status`` command in partyline. The available types of information are: + + .. list-table:: + :widths: 8 92 + :header-rows: 1 + + * - ``type`` + - Description + * - ``cpu`` + - total cpu time spent by eggdrop + * - ``mem`` + - dynamically allocated memory excluding the Tcl interpreter + * - ``cache`` + - user entries cache hits (in %) + * - ``ipv6`` + - shows whether IPv6 support was compiled in + + Returns + the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. - .. list-table:: - :widths: 8 92 - :header-rows: 1 + .. raw:: html - * - ``type`` - - Description - * - ``cpu`` - - total cpu time spent by eggdrop - * - ``mem`` - - dynamically allocated memory excluding the Tcl interpreter - * - ``cache`` - - user entries cache hits (in %) - * - ``ipv6`` - - shows whether IPv6 support was compiled in +
- Returns: the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5121,16 +9375,33 @@ status [type] set cpu_info [status cpu] +.. raw:: html + +
- Module: core +.. _tcl-istls: ^^^^^^^^^^^ istls ^^^^^^^^^^^ - Description: Checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. + Description + Checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. - Returns: ``1`` if the idx is a TLS connection, ``0`` if it's plaintext. + Returns + ``1`` if the idx is a TLS connection, ``0`` if it's plaintext. + + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5139,34 +9410,68 @@ istls set secure [istls 0] +.. raw:: html - Module: core +
+ +.. _tcl-starttls: ^^^^^^^^^^^^^^ starttls ^^^^^^^^^^^^^^ - 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. + 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. - Returns: nothing + Returns + nothing - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — Start TLS on a connection :collapsible: closed .. code-block:: tcl starttls 0 +.. raw:: html - Module: core +
+ +.. _tcl-tlsstatus: ^^^^^^^^^^^^^^^ tlsstatus ^^^^^^^^^^^^^^^ - 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. + 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. + + Returns + a flat list of name-value pairs - Returns: a flat list of name-value pairs + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
.. admonition:: Example :collapsible: closed @@ -5175,9 +9480,6 @@ tlsstatus set details [tlsstatus 0] - - Module: core - Global Variables ---------------- @@ -5187,130 +9489,174 @@ NOTE: All config file variables are also global. botnick ^^^^^^^ - Value: the current nickname the bot is using (for example: "LamestBot", "LamestBot1", etc.) + Value + the current nickname the bot is using (for example: "LamestBot", "LamestBot1", etc.) - Module: server + Module + ``server`` ^^^^^^^ botname ^^^^^^^ - Value: the current nick!user\@host that the server sees (for example: "LamestBot!eggdrop\@127.0.0.1") + Value + the current nick!user\@host that the server sees (for example: "LamestBot!eggdrop\@127.0.0.1") - Module: server + Module + ``server`` ^^^^^^ server ^^^^^^ - Value: the current server's real name (what server calls itself) and port bot is connected to (for example: "irc.example.net:6667") Note that this does not necessarily match the servers internet address. + Value + the current server's real name (what server calls itself) and port bot is connected to (for example: "irc.example.net:6667") Note that this does not necessarily match the servers internet address. - Module: server + Module + ``server`` ^^^^^^^^^^^^^ serveraddress ^^^^^^^^^^^^^ - 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: "irc.example.net:6667"). Note that this does not necessarily match the name server calls itself. - Module: server + 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: "irc.example.net:6667"). Note that this does not necessarily match the name server calls itself. + + Module + ``server`` ^^^^^^^ version ^^^^^^^ - Value: current bot version "1.1.2+pl1.10.2201"; first item is the text version, to include a patch string if present, and second item is a numerical version - Module: core + Value + current bot version "1.1.2+pl1.10.2201"; first item is the text version, to include a patch string if present, and second item is a numerical version + + Module + ``core`` ^^^^^^^^^^^ numversion* ^^^^^^^^^^^ - Value: the current numeric bot version (for example: "1.10.21"). Numerical version is in the format of "MNNRRPP", where: - .. list-table:: - :widths: 13 87 - :header-rows: 1 + Value + the current numeric bot version (for example: "1.10.21"). Numerical version is in the format of "MNNRRPP", where: + + .. list-table:: + :widths: 13 87 + :header-rows: 1 - * - MNNRRPP component - - Description - * - ``M`` - - major release number - * - ``NN`` - - minor release number - * - ``RR`` - - sub-release number - * - ``PP`` - - patch level for that sub-release + * - MNNRRPP component + - Description + * - ``M`` + - major release number + * - ``NN`` + - minor release number + * - ``RR`` + - sub-release number + * - ``PP`` + - patch level for that sub-release - Module: core + Module + ``core`` ^^^^^^ uptime ^^^^^^ - Value: the unixtime value for when the bot was started - Module: core + Value + the unixtime value for when the bot was started + + Module + ``core`` ^^^^^^^^^^^^^ server-online ^^^^^^^^^^^^^ - Value: the unixtime value when the bot connected to its current server, or '0' if the bot is currently disconnected from a server. - Module: server + Value + the unixtime value when the bot connected to its current server, or '0' if the bot is currently disconnected from a server. + + Module + ``server`` ^^^^^^^^ lastbind ^^^^^^^^ - Value: the last command binding which was triggered. This allows you to identify which command triggered a Tcl proc. - Module: core + Value + the last command binding which was triggered. This allows you to identify which command triggered a Tcl proc. + + Module + ``core`` ^^^^^^^ isjuped ^^^^^^^ - Value: 1 if bot's nick is juped(437); 0 otherwise - Module: server + Value + 1 if bot's nick is juped(437); 0 otherwise + + Module + ``server`` ^^^^^^^ handlen ^^^^^^^ - Value: the value of the HANDLEN define in src/eggdrop.h - Module: core + Value + the value of the HANDLEN define in src/eggdrop.h + + Module + ``core`` ^^^^^^ config ^^^^^^ - Value: the filename of the config file Eggdrop is currently using - Module: core + Value + the filename of the config file Eggdrop is currently using + + Module + ``core`` ^^^^^^^^^^^^^ configureargs ^^^^^^^^^^^^^ - Value: a string (not list) of configure arguments in shell expansion (single quotes) - Module: core + Value + a string (not list) of configure arguments in shell expansion (single quotes) + + Module + ``core`` ^^^^^^^^ language ^^^^^^^^ - 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 - Module: core + 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 + + Module + ``core`` ^^^^^^^^^^^^^^ account-extban ^^^^^^^^^^^^^^ - Value: a string containing the value of ACCOUNTEXTBAN provided by the 005 connection message. This is the raw value and, depending on the IRC server formatting, could be in multiple formats such as "a", or "a,account". - Module: channel + Value + a string containing the value of ACCOUNTEXTBAN provided by the 005 connection message. This is the raw value and, depending on the IRC server formatting, could be in multiple formats such as "a", or "a,account". + + Module + ``channel`` extban-flags ^^^^^^^^^^^^ - Value: a string containing the allowed extban flag characters advertised by EXTBAN in the 005 connection message. If EXTBAN advertises a prefix, such as "$,aUq", the prefix is omitted and this variable contains only the flags, such as "aUq". + Value + a string containing the allowed extban flag characters advertised by EXTBAN in the 005 connection message. If EXTBAN advertises a prefix, such as "$,aUq", the prefix is omitted and this variable contains only the flags, such as "aUq". - Module: channel + Module + ``channel`` Binds @@ -5321,11 +9667,13 @@ You can use the 'bind' command to attach Tcl procedures to certain events. For e ^^^^^^^^^^^^^^^ Stackable binds ^^^^^^^^^^^^^^^ + Some bind types are marked as "stackable". That means that you can bind multiple commands to the same trigger. Normally, for example, a bind such as 'bind msg - stop msg:stop' (which makes a msg-command "stop" call the Tcl proc "msg:stop") will overwrite any previous binding you had for the msg command "stop". With stackable bindings, like 'msgm' for example, you can bind the same command to multiple procs. ^^^^^^^^^^^^^^^ Removing a bind ^^^^^^^^^^^^^^^ + To remove a bind, use the 'unbind' command. For example, to remove the bind for the "stop" msg command, use 'unbind msg - stop msg:stop'. @@ -5334,6 +9682,7 @@ bind for the "stop" msg command, use 'unbind msg - stop msg:stop'. ^^^^^^^^^^ Flag Masks ^^^^^^^^^^ + In the `Bind Types`_ section (and other commands, such as `matchattr`_), you will see several references to the "flags" argument. The "flags" argument takes a flag mask, which is a value that represents the type of user that is allowed to trigger the procedure associated to that bind. The flags can be any of the standard Eggdrop flags (o, m, v, etc). Additionally, when used by itself, a "-" or "*" can be used to skip processing for a flag type. A flag mask has three sections to it- global, channel, and bot flag sections. Each section is separated by the | or & logical operators ( the | means "OR" and the & means "AND; if nothing proceeds the flag then Eggdrop assumes it to be an OR). Additionally, a '+' and '-' can be used in front of a flag to check if the user does (+) have it, or does not (-) have it. The easiest way to explain how to build a flag mask is by demonstration. A flag mask of "v" by itself means "has a global v flag". To also check for a channel flag, you would use the flag mask "v\|v". This checks if the user has a global "v" flag, OR a channel "v" flag (again, the | means "OR" and ties the two types of flags together). You could change this mask to be "v&v", which would check if the user has a global "v" flag AND a channel "v" flag. Lastly, to check if a user ONLY has a channel flag, you would use "\*|v" as a mask, which would not check global flags but does check if the user had a channel "v" flag. @@ -5387,15 +9736,30 @@ Bind Types The 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. +.. _bind-msg: + (1) MSG - bind msg + ``bind msg `` - procname + ``procname `` - Description: Used for /msg commands. The first word of the user's msg is the command, and everything else becomes the text argument. + Description + Used for ``/msg`` commands. The first word of the user's msg is the command, and everything else becomes the text argument. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — MSG trigger :collapsible: closed .. code-block:: tcl @@ -5406,22 +9770,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text /msg LamestBot !hello world Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is world - Module: server +.. _bind-dcc: (2) DCC - bind dcc + ``bind dcc `` - procname + ``procname `` - Description: Used for partyline commands; the command is the first word and everything else is 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. + Description + Used for partyline commands; the command is the first word and everything else is 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — DCC trigger :collapsible: closed .. code-block:: tcl @@ -5432,22 +9811,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, idx is $idx, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text .hello world Handle is foobar, idx is 3, text is world - Module: core +.. _bind-fil: (3) FIL - bind fil + ``bind fil `` - procname + ``procname `` - Description: The same as DCC, except this is triggered if the user is in the file area instead of the party line. + Description + The same as DCC, except this is triggered if the user is in the file area instead of the party line. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``filesys`` + + + .. raw:: html + +
+ + .. admonition:: Example — FIL trigger :collapsible: closed .. code-block:: tcl @@ -5458,22 +9852,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, idx is $idx, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text .hello world Handle is foobar, idx is 3, text is world - Module: filesys +.. _bind-pub: (4) PUB - bind pub + ``bind pub `` - procname + ``procname `` - Description: Used for commands given on a channel. The first word becomes the command and everything else is the text argument. + Description + Used for commands given on a channel. The first word becomes the command and everything else is the text argument. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — PUB trigger :collapsible: closed .. code-block:: tcl @@ -5484,22 +9893,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text !hello world Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, text is world - Module: irc +.. _bind-msgm: (5) MSGM (stackable) - bind msgm + ``bind msgm `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — MSGM trigger :collapsible: closed .. code-block:: tcl @@ -5511,22 +9935,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text /msg LamestBot hello world Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is hello world - Module: server +.. _bind-pubm: (6) PUBM (stackable) - bind pubm + ``bind pubm `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — PUBM trigger :collapsible: closed .. code-block:: tcl @@ -5538,31 +9977,46 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text hello world Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, text is hello world - Module: irc +.. _bind-notc: (7) NOTC (stackable) - bind notc + ``bind notc `` - procname + ``procname `` - 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. + 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. - New Tcl procs should be declared as:: + New Tcl procs should be declared as:: - proc notcproc {nick uhost hand text {dest ""}} { - global botnick; if {$dest == ""} {set dest $botnick} - ... - } + proc notcproc {nick uhost hand text {dest ""}} { + global botnick; if {$dest == ""} {set dest $botnick} + ... + } - for compatibility. + for compatibility. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — NOTC trigger :collapsible: closed .. code-block:: tcl @@ -5574,22 +10028,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sends NOTICE LamestBot :hello world Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, text is hello world, destination is LamestBot - Module: server +.. _bind-join: (8) JOIN (stackable) - bind join + ``bind join `` - procname + ``procname `` - Description: Triggered by someone joining the channel. The mask in the bind is matched against "#channel nick!user\@host" and can contain wildcards. + Description + Triggered by someone joining the channel. The mask in the bind is matched against ``#channel nick!user\@host`` and can contain wildcards. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — JOIN trigger :collapsible: closed .. code-block:: tcl @@ -5600,28 +10069,43 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar joins #lamest Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest - Module: irc +.. _bind-part: (9) PART (stackable) - bind part + ``bind part `` - procname + ``procname `` - 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 "". + 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 ``""``. - New Tcl procs should be declared as:: + New Tcl procs should be declared as:: - proc partproc {nick uhost hand chan {msg ""}} { ... } + proc partproc {nick uhost hand chan {msg ""}} { ... } - for compatibility. + for compatibility. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — PART trigger :collapsible: closed .. code-block:: tcl @@ -5632,22 +10116,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, message is $msg" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar parts #lamest with "Goodbye" Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Goodbye - Module: irc +.. _bind-sign: (10) SIGN (stackable) - bind sign + ``bind sign `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — SIGN trigger :collapsible: closed .. code-block:: tcl @@ -5658,22 +10157,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, reason is $reason" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar quits IRC with "Leaving" Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, reason is Leaving - Module: irc +.. _bind-topc: (11) TOPC (stackable) - bind topc + ``bind topc `` - procname + ``procname `` - Description: Triggered by a topic change. mask can contain wildcards and is matched against '#channel '. + Description + Triggered by a topic change. mask can contain wildcards and is matched against ``#channel ``. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — TOPC trigger :collapsible: closed .. code-block:: tcl @@ -5684,22 +10198,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, topic is $topic" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar changes the #lamest topic to "Example topic" Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, topic is Example topic - Module: irc +.. _bind-kick: (12) KICK (stackable) - bind kick + ``bind kick `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — KICK trigger :collapsible: closed .. code-block:: tcl @@ -5710,22 +10239,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, target is $target, reason is $reason" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar kicks Guest from #lamest with "Example reason" Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, target is Guest, reason is Example reason - Module: irc +.. _bind-nick: (13) NICK (stackable) - bind nick + ``bind nick `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — NICK trigger :collapsible: closed .. code-block:: tcl @@ -5736,42 +10280,57 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, new nick is $newnick" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar changes nick to Foobar2 Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, new nick is Foobar2 - Module: irc +.. _bind-mode: (14) MODE (stackable) - bind mode + ``bind mode `` - procname + ``procname `` - Description: Mode changes are broken down into their component parts before being sent here, so the 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. + Description + Mode changes are broken down into their component parts before being sent here, so the ```` 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. - If it is a server mode, nick will be "", user\@host is the server name, and handle is \*. - - 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. + If it is a server mode, nick will be ``""``, user\@host is the server name, and handle is \*. + + 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. - 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: + 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: - Old script looks as follows:: + Old script looks as follows:: - bind mode - * mode_proc - proc mode_proc {nick uhost hand chan mode} { ... } + bind mode - * mode_proc + proc mode_proc {nick uhost hand chan mode} { ... } - To make it work with 1.3.18+ and stay compatible with older bots, do:: + To make it work with 1.3.18+ and stay compatible with older bots, do:: - bind mode - * mode_proc_fix - proc mode_proc_fix {nick uhost hand chan mode {target ""}} { - if {$target != ""} {append mode " $target"} - mode_proc $nick $uhost $hand $chan $mode - } - proc mode_proc {nick uhost hand chan mode} { ... } + bind mode - * mode_proc_fix + proc mode_proc_fix {nick uhost hand chan mode {target ""}} { + if {$target != ""} {append mode " $target"} + mode_proc $nick $uhost $hand $chan $mode + } + proc mode_proc {nick uhost hand chan mode} { ... } - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — MODE trigger :collapsible: closed .. code-block:: tcl @@ -5782,21 +10341,36 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, mode is $mode, target is $target" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sets +o Guest on #lamest Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, mode is +o, target is Guest - Module: irc +.. _bind-ctcp: (15) CTCP (stackable) - bind ctcp - procname + ``bind ctcp `` + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — CTCP trigger :collapsible: closed .. code-block:: tcl @@ -5808,22 +10382,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sends a CTCP VERSION request to LamestBot Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, destination is LamestBot, keyword is VERSION, text is - Module: server +.. _bind-ctcr: (16) CTCR (stackable) - bind ctcr + ``bind ctcr `` - procname + ``procname `` - Description: Just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg). + Description + Just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — CTCR trigger :collapsible: closed .. code-block:: tcl @@ -5834,24 +10423,39 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, destination is $dest, keyword is $keyword, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sends a CTCP VERSION reply to LamestBot Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, destination is LamestBot, keyword is VERSION, text is Example client - Module: server +.. _bind-raw: (17) RAW (stackable) - bind raw + ``bind raw `` - procname + ``procname `` IMPORTANT: While not necessarily deprecated, this bind has been supplanted by the RAWT bind, which supports the IRCv3 message-tags capability, as of 1.9.0. You probably want to be using RAWT, not RAW. - Description: The mask can contain wildcards and is matched against the keyword, which is either a numeric, like "368", or a keyword, such as "PRIVMSG". "from" will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind). + Description + The mask can contain wildcards and is matched against the keyword, which is either a numeric, like ``368``, or a keyword, such as ``PRIVMSG``. ``from`` will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns ``1``, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — RAW trigger :collapsible: closed .. code-block:: tcl @@ -5863,22 +10467,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sends PRIVMSG LamestBot :hello world From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is LamestBot :hello world - Module: server +.. _bind-bot: (18) BOT - bind bot + ``bind bot `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — BOT trigger :collapsible: closed .. code-block:: tcl @@ -5889,22 +10508,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "From bot is $from, command is $command, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text RemoteBot sends botnet message "HELLO hello world" From bot is RemoteBot, command is HELLO, text is hello world - Module: core +.. _bind-chon: (19) CHON (stackable) - bind chon + ``bind chon `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHON trigger :collapsible: closed .. code-block:: tcl @@ -5915,22 +10549,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, idx is $idx" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar enters the party line Handle is foobar, idx is 3 - Module: core +.. _bind-chof: (20) CHOF (stackable) - bind chof + ``bind chof `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHOF trigger :collapsible: closed .. code-block:: tcl @@ -5941,22 +10590,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, idx is $idx" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar leaves the party line Handle is foobar, idx is 3 - Module: core +.. _bind-sent: (21) SENT (stackable) - bind sent + ``bind sent `` - procname + ``procname `` - 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'). + 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``). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
+ + .. admonition:: Example — SENT trigger :collapsible: closed .. code-block:: tcl @@ -5967,22 +10631,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, nick is $nick, path is $path" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar successfully downloads example.txt Handle is foobar, nick is Foobar, path is example.txt - Module: transfer +.. _bind-rcvd: (22) RCVD (stackable) - bind rcvd + ``bind rcvd `` - procname + ``procname `` - 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). + 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). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
+ + .. admonition:: Example — RCVD trigger :collapsible: closed .. code-block:: tcl @@ -5993,24 +10672,39 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, nick is $nick, path is $path" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar successfully uploads example.txt Handle is foobar, nick is Foobar, path is incoming/example.txt - Module: transfer +.. _bind-chat: (23) CHAT (stackable) - bind chat + ``bind chat `` - procname + ``procname `` - 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. Eggdrop passes the partyline channel number the user spoke on to the proc in "channel#". + 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. Eggdrop passes the partyline channel number the user spoke on to the proc in ``channel#``. - NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead. + NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHAT trigger :collapsible: closed .. code-block:: tcl @@ -6021,22 +10715,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, channel is $chan, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text hello world Handle is foobar, channel is 0, text is hello world - Module: core +.. _bind-link: (24) LINK (stackable) - bind link + ``bind link `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — LINK trigger :collapsible: closed .. code-block:: tcl @@ -6047,22 +10756,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot, via is $via" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text RemoteBot links to the botnet through LamestBot Bot is RemoteBot, via is LamestBot - Module: core +.. _bind-disc: (25) DISC (stackable) - bind disc + ``bind disc `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — DISC trigger :collapsible: closed .. code-block:: tcl @@ -6073,22 +10797,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text + + RemoteBot disconnects from the botnet + Bot is RemoteBot + +.. _bind-splt: + +(26) SPLT (stackable) + + ``bind splt `` + + ``procname `` - RemoteBot disconnects from the botnet - Bot is RemoteBot + 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. - Module: core + .. raw:: html -(26) SPLT (stackable) +
- bind splt + Module + ``irc`` - procname - 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. + .. raw:: html - .. admonition:: Example +
+ + .. admonition:: Example — SPLT trigger :collapsible: closed .. code-block:: tcl @@ -6099,22 +10838,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar is detected as split from #lamest Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest - Module: irc +.. _bind-rejn: (27) REJN (stackable) - bind rejn + ``bind rejn `` - procname + ``procname `` - Description: Someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user\@host'. + Description + Someone who was split has rejoined. mask can contain wildcards, and is matched against ``#channel nick!user\@host``. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — REJN trigger :collapsible: closed .. code-block:: tcl @@ -6125,22 +10879,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar rejoins #lamest after a split Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest - Module: irc +.. _bind-filt: (28) FILT (stackable) - bind filt + ``bind filt `` - procname + ``procname `` - Description: Party line and file system users have their text sent through filt before being processed. 'mask' is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. + Description + Party line and file system users have their text sent through filt before being processed. ``mask`` is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — FILT trigger :collapsible: closed .. code-block:: tcl @@ -6152,22 +10921,37 @@ The following is a list of bind types and how they work. Below each bind type is return $text } - Trigger and output:: + **Trigger and output** + + .. code-block:: text .who Idx is 3, text is .who - Module: core +.. _bind-need: (29) NEED (stackable) - bind need + ``bind need `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — NEED trigger :collapsible: closed .. code-block:: tcl @@ -6178,22 +10962,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Channel is $chan, type is $type" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text LamestBot determines it needs operator status on #lamest Channel is #lamest, type is op - Module: irc +.. _bind-flud: (30) FLUD (stackable) - bind flud + ``bind flud `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — FLUD trigger :collapsible: closed .. code-block:: tcl @@ -6205,22 +11004,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar triggers the configured public-message flood threshold on #lamest Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, type is pub, channel is #lamest - Module: server +.. _bind-note: (31) NOTE (stackable) - bind note + ``bind note `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — NOTE trigger :collapsible: closed .. code-block:: tcl @@ -6232,22 +11046,37 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text OtherUser sends the note "hello world" to foobar From is OtherUser, to is foobar, text is hello world - Module: core +.. _bind-act: (32) ACT (stackable) - bind act + ``bind act `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — ACT trigger :collapsible: closed .. code-block:: tcl @@ -6258,22 +11087,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, channel is $chan, action is $action" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar performs the partyline action "waves" Handle is foobar, channel is 0, action is waves - Module: core +.. _bind-wall: (33) WALL (stackable) - bind wall + ``bind wall `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — WALL trigger :collapsible: closed .. code-block:: tcl @@ -6285,23 +11129,38 @@ The following is a list of bind types and how they work. Below each bind type is return 0 } - Trigger and output:: + **Trigger and output** + + .. code-block:: text irc.example.net sends WALLOPS :Example maintenance notice From is irc.example.net, message is Example maintenance notice - Module: server +.. _bind-bcst: (34) BCST (stackable) - bind bcst - procname + ``bind bcst `` + ``procname `` - 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. - - 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'. + 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. + + 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``. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — BCST trigger :collapsible: closed .. code-block:: tcl @@ -6312,22 +11171,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot, channel is $chan, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text RemoteBot broadcasts "hello botnet" Bot is RemoteBot, channel is -1, text is hello botnet - Module: core +.. _bind-chjn: (35) CHJN (stackable) - bind chjn + ``bind chjn `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHJN trigger :collapsible: closed .. code-block:: tcl @@ -6338,22 +11212,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot, handle is $hand, channel is $chan, flag is $flag, idx is $idx, user is $user" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar joins botnet channel 0 on LamestBot Bot is LamestBot, handle is foobar, channel is 0, flag is @, idx is 3, user is foobar@127.0.0.1 - Module: core +.. _bind-chpt: (36) CHPT (stackable) - bind chpt + ``bind chpt `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHPT trigger :collapsible: closed .. code-block:: tcl @@ -6364,22 +11253,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot, handle is $hand, idx is $idx, channel is $chan" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar leaves botnet channel 0 on LamestBot Bot is LamestBot, handle is foobar, idx is 3, channel is 0 - Module: core +.. _bind-time: (37) TIME (stackable) - bind time + ``bind time `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — TIME trigger :collapsible: closed .. code-block:: tcl @@ -6390,22 +11294,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Minute is $minute, hour is $hour, day is $day, month is $month, year is $year" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The clock reaches 12:34 on September 13, 2026 Minute is 34, hour is 12, day is 13, month is 08, year is 2026 - Module: core +.. _bind-away: (38) AWAY (stackable) - bind away + ``bind away `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — AWAY trigger :collapsible: closed .. code-block:: tcl @@ -6416,22 +11335,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Bot is $bot, idx is $idx, text is $text" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text foobar sets the partyline away message to "Lunch" Bot is LamestBot, idx is 3, text is Lunch - Module: core +.. _bind-load: (39) LOAD (stackable) - bind load + ``bind load `` - procname + ``procname `` - Description: Triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. + Description + Triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — LOAD trigger :collapsible: closed .. code-block:: tcl @@ -6442,23 +11376,38 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Module is $module" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The irc module is loaded Module is irc - Module: core +.. _bind-unld: (40) UNLD (stackable) - bind unld + ``bind unld `` - procname + ``procname `` - Description: Triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards;. - flags are ignored. + Description + Triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards;. + flags are ignored. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — UNLD trigger :collapsible: closed .. code-block:: tcl @@ -6469,22 +11418,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Module is $module" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The irc module is unloaded Module is irc - Module: core +.. _bind-nkch: (41) NKCH (stackable) - bind nkch + ``bind nkch `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — NKCH trigger :collapsible: closed .. code-block:: tcl @@ -6495,43 +11459,58 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Old handle is $oldhand, new handle is $newhand" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The local handle foobar is changed to foobar2 Old handle is foobar, new handle is foobar2 - Module: core +.. _bind-evnt: (42) EVNT (stackable) - bind evnt + ``bind evnt `` - procname [arg] + ``procname [arg]`` - Description: Triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:: + Description + Triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:: - sighup - called on a kill -HUP - sigterm - called on a kill -TERM - sigill - called on a kill -ILL - sigquit - called on a kill -QUIT - save - called when the userfile is saved - rehash - called just after a rehash - prerehash - called just before a rehash - prerestart - called just before a restart - logfile - called when the logs are switched daily - loaded - called when the bot is done loading - userfile-loaded - called after userfile has been loaded - connect-server - called just before we connect to an IRC server - preinit-server - called immediately when we connect to the server - init-server - called when we actually get on our IRC server - disconnect-server - called when we disconnect from our IRC server - fail-server - called when an IRC server fails to respond - hidden-host - called after the bot's host is hidden by the server - got-chanlist - called after Eggdrop receives the channel userlist from the server. Passes a second [arg] value to the Tcl proc + sighup - called on a kill -HUP + sigterm - called on a kill -TERM + sigill - called on a kill -ILL + sigquit - called on a kill -QUIT + save - called when the userfile is saved + rehash - called just after a rehash + prerehash - called just before a rehash + prerestart - called just before a restart + logfile - called when the logs are switched daily + loaded - called when the bot is done loading + userfile-loaded - called after userfile has been loaded + connect-server - called just before we connect to an IRC server + preinit-server - called immediately when we connect to the server + init-server - called when we actually get on our IRC server + disconnect-server - called when we disconnect from our IRC server + fail-server - called when an IRC server fails to respond + hidden-host - called after the bot's host is hidden by the server + got-chanlist - called after Eggdrop receives the channel userlist from the server. Passes a second [arg] value to the Tcl proc - Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop. + Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — EVNT trigger :collapsible: closed .. code-block:: tcl @@ -6542,22 +11521,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Type is $type, arg is $arg" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text A rehash event occurs Type is rehash, arg is - Module: core +.. _bind-lost: (43) LOST (stackable) - bind lost + ``bind lost `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
+ + .. admonition:: Example — LOST trigger :collapsible: closed .. code-block:: tcl @@ -6568,22 +11562,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, nick is $nick, path is $path, bytes transferred is $bytes, file length is $length" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar aborts example.txt after 1024 of 4096 bytes Handle is foobar, nick is Foobar, path is example.txt, bytes transferred is 1024, file length is 4096 - Module: transfer +.. _bind-tout: (44) TOUT (stackable) - bind tout + ``bind tout `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``transfer`` + + + .. raw:: html + +
+ + .. admonition:: Example — TOUT trigger :collapsible: closed .. code-block:: tcl @@ -6594,22 +11603,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Handle is $hand, nick is $nick, path is $path, bytes transferred is $bytes, file length is $length" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text A DCC SEND of example.txt to Foobar times out after 1024 of 4096 bytes Handle is foobar, nick is Foobar, path is example.txt, bytes transferred is 1024, file length is 4096 - Module: transfer +.. _bind-out: (45) OUT (stackable) - bind out + ``bind out `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — OUT trigger :collapsible: closed .. code-block:: tcl @@ -6620,23 +11644,38 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Queue is $queue, message is $message, status is $status" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text putserv "PRIVMSG #lamest :Hello, Foobar!" Queue is server, message is PRIVMSG #lamest :Hello, Foobar!, status is queued Queue is server, message is PRIVMSG #lamest :Hello, Foobar!, status is sent - Module: server +.. _bind-cron: (46) CRON (stackable) - bind cron + ``bind cron `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — CRON trigger :collapsible: closed .. code-block:: tcl @@ -6647,22 +11686,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Minute is $minute, hour is $hour, day is $day, month is $month, weekday is $weekday" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The clock reaches 12:00 on September 13, 2026 Minute is 0, hour is 12, day is 13, month is 9, weekday is 0 - Module: core +.. _bind-log: (47) LOG (stackable) - bind log + ``bind log `` - procname + ``procname `` - 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 '*'. + 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 ``*``. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — LOG trigger :collapsible: closed .. code-block:: tcl @@ -6673,22 +11727,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Level is $level, channel is $channel, message is $message" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text A public message from Foobar is logged for #lamest Level is p, channel is #lamest, message is Hello! - Module: core +.. _bind-tls: (48) TLS (stackable) - bind tls + ``bind tls `` - procname + ``procname `` - Description: Triggered for TCP connections when an SSL/TLS handshake has completed and the connection is secured. The mask is matched against the idx of the connection. + Description + Triggered for TCP connections when an SSL/TLS handshake has completed and the connection is secured. The mask is matched against the idx of the connection. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — TLS trigger :collapsible: closed .. code-block:: tcl @@ -6699,22 +11768,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Idx is $idx" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text TLS negotiation completes for connection idx 3 Idx is 3 - Module: core +.. _bind-die: (49) DIE (stackable) - bind die + ``bind die `` - procname + ``procname `` - 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. + 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``core`` + + + .. raw:: html + +
+ + .. admonition:: Example — DIE trigger :collapsible: closed .. code-block:: tcl @@ -6725,22 +11809,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Shutdown reason is $reason" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Eggdrop shuts down with the reason "Maintenance" Shutdown reason is Maintenance - Module: core +.. _bind-ircaway: (50) IRCAWAY (stackable) - bind ircaway + ``bind ircaway `` - procname + ``procname `` - 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 support this capability; see the 'cap' Tcl command for more information 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, 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 with the bot. To trigger a proc only once per away change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword. + 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 support this capability; see the ``cap`` Tcl command for more information 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, 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 with the bot. To trigger a proc only once per away change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — IRCAWAY trigger :collapsible: closed .. code-block:: tcl @@ -6751,22 +11850,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $channel, message is $msg" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar sets an away message of "Lunch" while on #lamest Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Lunch - Module: irc +.. _bind-invt: (51) INVT (stackable) - bind invt + ``bind invt `` - procname + ``procname `` - Description: Triggered when Eggdrop receives 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 Eggdrop may be able to see invite messages for other people that are not the Eggdrop. + Description + Triggered when Eggdrop receives 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 Eggdrop may be able to see invite messages for other people that are not the Eggdrop. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — INVT trigger :collapsible: closed .. code-block:: tcl @@ -6777,22 +11891,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user@host is $userhost, channel is $channel, invitee is $invitee" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar invites LamestBot to #lamest Nick is Foobar, user@host is foobar@127.0.0.1, channel is #lamest, invitee is LamestBot - Module: irc +.. _bind-rawt: (52) RAWT (stackable) - bind rawt + ``bind rawt `` - procname + ``procname `` - Description: Similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like "368", or a keyword, such as "PRIVMSG" or "TAGMSG". from will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. tags is a dictionary (flat key/value list) of the message tags with "" for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns 1, Eggdrop will not process the line any further, including processing by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. + Description + Similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like ``368``, or a keyword, such as ``PRIVMSG`` or ``TAGMSG``. from will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. tags is a dictionary (flat key/value list) of the message tags with ``""`` for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns ``1``, Eggdrop will not process the line any further, including processing by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — RAWT trigger :collapsible: closed .. code-block:: tcl @@ -6803,24 +11932,39 @@ The following is a list of bind types and how they work. Below each bind type is putlog "From is $from, keyword is $keyword, text is $text, tags are $tags" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text @account=foobar :Foobar!foobar@127.0.0.1 PRIVMSG #lamest :Hello! From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is #lamest :Hello!, tags are account foobar - Module: server +.. _bind-account: (53) ACCOUNT (stackable) - bind account + ``bind account `` - procname + ``procname `` - Description: This bind will trigger when Eggdrop detects a change in the authentication status of a user's services account. The mask for the bind is in the format "#channel nick!user@hostname.com account" and accepts wildcards. account is either the account name the user is logging in to or "*" if the user is not logged in to an account. + Description + This bind will trigger when Eggdrop detects a change in the authentication status of a user's services account. The mask for the bind is in the format ``#channel nick!user@hostname.com account`` and accepts wildcards. account is either the account name the user is logging in to or ``*`` if the user is not logged in to an account. - NOTE: The three required IRC components for account tracking are the WHOX feature, the extended-join IRCv3 capability, and the account-notify IRCv3 capability. If only some of the three features are available, Eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see doc/ACCOUNTS for additional information. + NOTE: The three required IRC components for account tracking are the WHOX feature, the extended-join IRCv3 capability, and the account-notify IRCv3 capability. If only some of the three features are available, Eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see ``doc/ACCOUNTS`` for additional information. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — ACCOUNT trigger :collapsible: closed .. code-block:: tcl @@ -6831,22 +11975,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, user is $user, handle is $hand, channel is $chan, account is $account" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar identifies to services as foobar while on #lamest Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, account is foobar - Module: irc +.. _bind-isupport: (54) ISUPPORT (stackable) - bind isupport + ``bind isupport `` - procname + ``procname `` - 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 a 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. + 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 a 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. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``server`` + + + .. raw:: html + +
+ + .. admonition:: Example — ISUPPORT trigger :collapsible: closed .. code-block:: tcl @@ -6857,22 +12016,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Key is $key, isset is $isset, value is $value" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text The server advertises CHANTYPES=#& Key is CHANTYPES, isset is 1, value is #& - Module: server +.. _bind-monitor: (55) MONITOR (stackable) - bind monitor + ``bind monitor `` - procname + ``procname `` - Description: Triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is '0' if the nickname disconnected, or '1' if the nickname connected. + Description + Triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is ``0`` if the nickname disconnected, or ``1`` if the nickname connected. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — MONITOR trigger :collapsible: closed .. code-block:: tcl @@ -6883,22 +12057,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, online is $online" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar connects to the IRC network Nick is Foobar, online is 1 - Module: irc +.. _bind-chghost: (56) CHGHOST - bind chghost + ``bind chghost `` - procname + ``procname `` - Description: Triggered when a server sends an IRCv3 CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of "#channel nick!user@host" and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed, the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. + Description + Triggered when a server sends an IRCv3 CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of ``#channel nick!user@host`` and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed, the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. - .. admonition:: Example + .. raw:: html + +
+ + Module + ``irc`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHGHOST trigger :collapsible: closed .. code-block:: tcl @@ -6909,22 +12098,37 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Nick is $nick, old user@host is $oldhost, handle is $hand, channel is $channel, new user@host is $newhost" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text Foobar changes host from foobar@127.0.0.1 to foobar@example.net on #lamest Nick is Foobar, old user@host is foobar@127.0.0.1, handle is foobar, channel is #lamest, new user@host is foobar@example.net - Module: irc +.. _bind-chanset: (57) CHANSET - bind chanset + ``bind chanset `` - procname + ``procname `` - Description: Triggered when a channel setting is set via the partyline. flags is ignored, mask is the name of channel setting (not including any +/- prefix) and can contain wildcards. The proc will be called with the channel that the setting was set on, the text name of the setting that was changed, and the value it was set to (0/1 for -/+, string, or X:Y formatted value). + Description + Triggered when a channel setting is set via the partyline. flags is ignored, mask is the name of channel setting (not including any +/- prefix) and can contain wildcards. The proc will be called with the channel that the setting was set on, the text name of the setting that was changed, and the value it was set to (0/1 for -/+, string, or X:Y formatted value). - .. admonition:: Example + .. raw:: html + +
+ + Module + ``channels`` + + + .. raw:: html + +
+ + .. admonition:: Example — CHANSET trigger :collapsible: closed .. code-block:: tcl @@ -6935,10 +12139,10 @@ The following is a list of bind types and how they work. Below each bind type is putlog "Channel is $chan, setting is $setting, value is $value" } - Trigger and output:: + **Trigger and output** + + .. code-block:: text .chanset #lamest +autoop Channel is #lamest, setting is autoop, value is 1 - Module: channels - From d24565f2cbdba010a0e04716e9eaa2180742f85c Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 14:43:29 -0400 Subject: [PATCH 4/9] formatting --- doc/sphinx_source/_static/eggdrop.css | 28 +- doc/sphinx_source/eggdrop.css | 67 - doc/sphinx_source/using/tcl-commands.rst | 3462 ++++------------------ 3 files changed, 581 insertions(+), 2976 deletions(-) delete mode 100644 doc/sphinx_source/eggdrop.css diff --git a/doc/sphinx_source/_static/eggdrop.css b/doc/sphinx_source/_static/eggdrop.css index 524dee748..1a4a4c4e8 100644 --- a/doc/sphinx_source/_static/eggdrop.css +++ b/doc/sphinx_source/_static/eggdrop.css @@ -12,13 +12,14 @@ div.document { width: 85em; } +/* MMX's edit */ div.header, div.content, div.footer { - width: 97vw; /* unset to override agogo.css settings */ + width: unset; /* unset to override agogo.css settings */ } - div.content { display: flex; } +/* END of MMX's edit */ div.sidebar .caption { font-weight: bold; @@ -63,4 +64,25 @@ div.document ul { list-style-type: circle; } -div.cap +/* Tcl command reference */ + +/* + * Sphinx renders reStructuredText transitions (----) as
elements. + * Override the theme's default rule completely so command separators stay + * intentionally subtle regardless of the inherited Agogo styling. + */ +div.body hr { + border: 0 !important; + border-top: 1px solid #dddddd !important; + background: transparent !important; + color: transparent !important; + height: 0 !important; + box-shadow: none !important; + margin: 1.5rem 0 !important; +} + +/* Keep a small visual gap between Module metadata and collapsed examples. */ +div.body .admonition.tcl-example, +div.body aside.admonition.tcl-example { + margin-top: 0.6rem; +} diff --git a/doc/sphinx_source/eggdrop.css b/doc/sphinx_source/eggdrop.css deleted file mode 100644 index 95aae8b5b..000000000 --- a/doc/sphinx_source/eggdrop.css +++ /dev/null @@ -1,67 +0,0 @@ -@import url("agogo.css"); - -div.header .headertitle { - margin-bottom: 0px; - font-family: "Palatino Linotype", serif; -} -div.header .headertitle a { - color: #2F2F2F; -} - -div.document { - width: 85em; -} - -/* MMX's edit */ -div.header, div.content, div.footer { - width: unset; /* unset to override agogo.css settings */ -} -div.content { - display: flex; -} -/* END of MMX's edit */ - -div.sidebar .caption { - font-weight: bold; - color: #3465a4; -} - -div.body .toctree-wrapper { - display: none; - font-size: 1px; -} - -div.sidebar li.toctree-l1 a { - background-color: initial; -} - -div.footer, div.footer a { - color: #034f84; -} - -table { - border-collapse: collapse; - margin-bottom: 10px; - margin-top: 10px; -} - -th, td { - padding-right: 4px; - padding-left: 4px; - border: 2px solid #87bdd8; -} - -div.document li.toctree-l1 { - margin-bottom: .5em; -} - -div.document li.toctree-l1 a { - color:black; -} - -div.document ul { - margin: 1.5em; - list-style-type: circle; -} - -div.cap diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 87d9708ff..aba188eea 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -45,28 +45,20 @@ putserv [options] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putserv "PRIVMSG #lamest :Hello from LamestBot!" -.. raw:: html - -
+---- .. _tcl-puthelp: @@ -86,28 +78,20 @@ puthelp [options] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl puthelp "PRIVMSG #lamest :Hello, Foobar!" -.. raw:: html - -
+---- .. _tcl-putquick: @@ -127,28 +111,20 @@ putquick [options] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putquick "NOTICE Foobar :This message uses the quick queue." -.. raw:: html - -
+---- .. _tcl-putnow: @@ -166,28 +142,20 @@ putnow [-oneline] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putnow "PING :irc.example.net" -.. raw:: html - -
+---- .. _tcl-putkick: @@ -201,28 +169,20 @@ putkick [reason] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putkick "#lamest" Foobar "Example kick reason" -.. raw:: html - -
+---- .. _tcl-putlog: @@ -236,28 +196,20 @@ putlog Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putlog "LamestBot loaded the example script." -.. raw:: html - -
+---- .. _tcl-putcmdlog: @@ -271,28 +223,20 @@ putcmdlog Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putcmdlog "Foobar used an example command." -.. raw:: html - -
+---- .. _tcl-putxferlog: @@ -306,28 +250,20 @@ putxferlog Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putxferlog "Example file transfer completed." -.. raw:: html - -
+---- .. _tcl-putloglev: @@ -341,28 +277,20 @@ putloglev Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putloglev o "#lamest" "Example log message." -.. raw:: html - -
+---- .. _tcl-dumpfile: @@ -376,28 +304,20 @@ dumpfile Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl dumpfile Foobar help.txt -.. raw:: html - -
+---- .. _tcl-queuesize: @@ -412,28 +332,20 @@ queuesize [queue] 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set queued [queuesize server] -.. raw:: html - -
+---- .. _tcl-clearqueue: @@ -447,28 +359,20 @@ clearqueue Returns the number of deleted lines from the specified queue. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set removed [clearqueue help] -.. raw:: html - -
+---- .. _tcl-cap: @@ -482,28 +386,20 @@ cap [arg] Returns a list of CAP capabilities for the ``enabled`` and ``ls`` sub-commands; a dict of capability/value pairs for the ``values`` command or a list if ``values`` if followed by an argument; otherwise nothing. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set capabilities [cap ls] -.. raw:: html - -
+---- .. _tcl-tagmsg: @@ -518,29 +414,21 @@ tagmsg Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set tags [dict create +example value] tagmsg $tags "#lamest" -.. raw:: html - -
+---- .. _tcl-server-add: @@ -554,28 +442,20 @@ server add [[+]port [password]] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — Add a server :collapsible: closed + :class: tcl-example .. code-block:: tcl server add irc.example.net +6697 -.. raw:: html - -
+---- .. _tcl-server-remove: @@ -589,28 +469,20 @@ server remove [[+]port] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — Remove a server :collapsible: closed + :class: tcl-example .. code-block:: tcl server remove irc.example.net +6697 -.. raw:: html - -
+---- .. _tcl-server-list: @@ -624,20 +496,14 @@ server list Returns A list of lists in the format ``{{hostname} {port} {password}}`` - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -659,29 +525,21 @@ countusers Returns number of users in the bot's database - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set usercount [countusers] putlog "LamestBot has $usercount users." -.. raw:: html - -
+---- .. _tcl-validuser: @@ -696,20 +554,14 @@ validuser Returns ``1`` if a user by that name exists; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -717,9 +569,7 @@ validuser putlog "The handle foobar exists." } -.. raw:: html - -
+---- .. _tcl-finduser: @@ -733,28 +583,20 @@ finduser [-account] Returns the handle found, or ``*`` if none - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set handle [finduser "Foobar!foobar@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-userlist: @@ -769,28 +611,20 @@ userlist [flags] Returns a list of users on the bot. You can use the flag matching system here ([global]``{&/\|}``[chan]``{&/\|}``[bot]). '&' specifies ``and``; '|' specifies ``or``. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set users [userlist] -.. raw:: html - -
+---- .. _tcl-passwdok: @@ -804,28 +638,20 @@ passwdok 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set valid [passwdok foobar "example-password"] -.. raw:: html - -
+---- .. _tcl-getuser: @@ -870,28 +696,20 @@ getuser [entry-type] [extra info] Returns info specific to each entry-type - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set hosts [getuser foobar HOSTS] -.. raw:: html - -
+---- .. _tcl-setuser: @@ -941,28 +759,20 @@ setuser [extra info] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setuser foobar INFO "Example user information" -.. raw:: html - -
+---- .. _tcl-chhandle: @@ -976,28 +786,20 @@ chhandle Returns ``1`` on success; ``0`` if the new handle is invalid or already used, or if the user can't be found - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set changed [chhandle foobar foobar2] -.. raw:: html - -
+---- .. _tcl-chattr: @@ -1012,28 +814,20 @@ chattr [changes [channel]] 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set flags [chattr foobar +o "#lamest"] -.. raw:: html - -
+---- .. _tcl-botattr: @@ -1047,20 +841,14 @@ botattr [changes [channel]] 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -1068,9 +856,7 @@ botattr [changes [channel]] .. _matchattr: -.. raw:: html - -
+---- .. _tcl-matchattr: @@ -1088,20 +874,14 @@ matchattr [channel] Returns ``1`` if the specified user has the flags matching the provided mask; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Check user flags :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -1109,9 +889,7 @@ matchattr [channel] putlog "foobar has the requested flags." } -.. raw:: html - -
+---- .. _tcl-adduser: @@ -1125,28 +903,20 @@ adduser [hostmask] Returns ``1`` if successful; ``0`` if the handle already exists - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set added [adduser foobar "Foobar!foobar@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-addbot: @@ -1167,28 +937,20 @@ NOTE 2: In the deprecated formats, an additional botport and/or userport given a Returns ``1`` if successful; ``0`` if the bot already exists or a port is invalid - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set added [addbot OtherBot 127.0.0.1] -.. raw:: html - -
+---- .. _tcl-deluser: @@ -1202,28 +964,20 @@ deluser Returns ``1`` if successful, ``0`` if no such user exists - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set deleted [deluser foobar] -.. raw:: html - -
+---- .. _tcl-delhost: @@ -1237,28 +991,20 @@ delhost Returns ``1`` on success; ``0`` if the hostmask (or user) doesn't exist - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [delhost foobar "Foobar!foobar@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-addchanrec: @@ -1272,28 +1018,20 @@ addchanrec Returns ``1`` on success; ``0`` if the user or channel does not exist - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set added [addchanrec foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-delchanrec: @@ -1307,28 +1045,20 @@ delchanrec Returns ``1`` on success; ``0`` if the user or channel does not exist - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set deleted [delchanrec foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-haschanrec: @@ -1343,28 +1073,20 @@ haschanrec Returns ``1`` if the given handle has a chanrec for the specified channel; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set has_record [haschanrec foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-getchaninfo: @@ -1379,28 +1101,20 @@ getchaninfo Returns info line for a specific channel (behaves just like 'getinfo') - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set info [getchaninfo foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-setchaninfo: @@ -1414,28 +1128,20 @@ setchaninfo Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setchaninfo foobar "#lamest" "Example channel information" -.. raw:: html - -
+---- .. _tcl-newchanban: @@ -1461,28 +1167,20 @@ newchanban [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — Add a channel ban :collapsible: closed + :class: tcl-example .. code-block:: tcl newchanban "#lamest" "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-newban: @@ -1507,28 +1205,20 @@ newban [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newban "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-newchanexempt: @@ -1553,28 +1243,20 @@ newchanexempt [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newchanexempt "#lamest" "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-newexempt: @@ -1599,28 +1281,20 @@ newexempt [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newexempt "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-newchaninvite: @@ -1645,28 +1319,20 @@ newchaninvite [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newchaninvite "#lamest" "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-newinvite: @@ -1691,28 +1357,20 @@ newinvite [lifetime] [options] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newinvite "*!*@127.0.0.1" foobar "Example text" -.. raw:: html - -
+---- .. _tcl-stickban: @@ -1726,28 +1384,20 @@ stickban [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [stickban "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-unstickban: @@ -1761,28 +1411,20 @@ unstickban [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [unstickban "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-stickexempt: @@ -1796,28 +1438,20 @@ stickexempt [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [stickexempt "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-unstickexempt: @@ -1831,28 +1465,20 @@ unstickexempt [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [unstickexempt "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-stickinvite: @@ -1866,28 +1492,20 @@ stickinvite [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [stickinvite "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-unstickinvite: @@ -1901,28 +1519,20 @@ unstickinvite [channel] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [unstickinvite "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killchanban: @@ -1936,28 +1546,20 @@ killchanban Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killchanban "#lamest" "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killban: @@ -1971,28 +1573,20 @@ killban Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killban "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killchanexempt: @@ -2006,28 +1600,20 @@ killchanexempt Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killchanexempt "#lamest" "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killexempt: @@ -2041,28 +1627,20 @@ killexempt Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killexempt "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killchaninvite: @@ -2076,28 +1654,20 @@ killchaninvite Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killchaninvite "#lamest" "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-killinvite: @@ -2111,28 +1681,20 @@ killinvite Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [killinvite "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-ischanjuped: @@ -2146,28 +1708,20 @@ ischanjuped Returns ``1`` if the channel is juped, and the bot is unable to join; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set juped [ischanjuped "#lamest"] -.. raw:: html - -
+---- .. _tcl-isban: @@ -2181,28 +1735,20 @@ isban [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isban "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-ispermban: @@ -2216,28 +1762,20 @@ ispermban [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [ispermban "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isexempt: @@ -2251,28 +1789,20 @@ isexempt [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isexempt "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-ispermexempt: @@ -2286,28 +1816,20 @@ ispermexempt [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [ispermexempt "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isinvite: @@ -2321,28 +1843,20 @@ isinvite [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isinvite "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isperminvite: @@ -2356,28 +1870,20 @@ isperminvite [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isperminvite "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isbansticky: @@ -2391,28 +1897,20 @@ isbansticky [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isbansticky "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isexemptsticky: @@ -2426,28 +1924,20 @@ isexemptsticky [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isexemptsticky "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-isinvitesticky: @@ -2461,28 +1951,20 @@ isinvitesticky [channel [-channel]] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [isinvitesticky "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-matchban: @@ -2496,28 +1978,20 @@ matchban [channel] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set banned [matchban "Foobar!foobar@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-matchexempt: @@ -2531,28 +2005,20 @@ matchexempt [channel] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set exempt [matchexempt "Foobar!foobar@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-matchinvite: @@ -2567,28 +2033,20 @@ matchinvite [channel] ``1`` if the specified nick!user\@host matches an invite in the global invite list; ``0`` otherwise. If a channel is specified, that channel's invite list is checked as well. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set invited [matchinvite "Foobar!foobar@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-banlist: @@ -2602,28 +2060,20 @@ banlist [channel] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set bans [banlist "#lamest"] -.. raw:: html - -
+---- .. _tcl-exemptlist: @@ -2637,28 +2087,20 @@ exemptlist [channel] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set exempts [exemptlist "#lamest"] -.. raw:: html - -
+---- .. _tcl-invitelist: @@ -2672,28 +2114,20 @@ invitelist [channel] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set invites [invitelist "#lamest"] -.. raw:: html - -
+---- .. _tcl-newignore: @@ -2707,28 +2141,20 @@ newignore [lifetime] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl newignore "*!*@127.0.0.1" foobar "Example ignore" 60 -.. raw:: html - -
+---- .. _tcl-killignore: @@ -2742,28 +2168,20 @@ killignore Returns ``1`` if successful; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set removed [killignore "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-ignorelist: @@ -2777,28 +2195,20 @@ ignorelist 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set ignores [ignorelist] -.. raw:: html - -
+---- .. _tcl-isignore: @@ -2812,28 +2222,20 @@ isignore Returns ``1`` if the ignore is in the list; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set ignored [isignore "*!*@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-save: @@ -2847,28 +2249,20 @@ save Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl save -.. raw:: html - -
+---- .. _tcl-reload: @@ -2882,28 +2276,20 @@ reload Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl reload -.. raw:: html - -
+---- .. _tcl-backup: @@ -2917,28 +2303,20 @@ backup Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl backup -.. raw:: html - -
+---- .. _tcl-getting-users: @@ -2952,20 +2330,14 @@ getting-users 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 - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -2986,28 +2358,20 @@ channel add [option-list] Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — Add a channel :collapsible: closed + :class: tcl-example .. code-block:: tcl channel add "#lamest" -.. raw:: html - -
+---- .. _tcl-channel-set: @@ -3021,28 +2385,20 @@ channel set Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — Change a channel setting :collapsible: closed + :class: tcl-example .. code-block:: tcl channel set "#lamest" +autoop -.. raw:: html - -
+---- .. _tcl-channel-info: @@ -3057,28 +2413,20 @@ channel info Returns a list of info about the specified channel's settings. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — Inspect channel settings :collapsible: closed + :class: tcl-example .. code-block:: tcl set info [channel info "#lamest"] -.. raw:: html - -
+---- .. _tcl-channel-get: @@ -3093,28 +2441,20 @@ channel get [setting] 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — Read a channel setting :collapsible: closed + :class: tcl-example .. code-block:: tcl set autoop [channel get "#lamest" autoop] -.. raw:: html - -
+---- .. _tcl-channel-remove: @@ -3128,28 +2468,20 @@ channel remove Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl channel remove "#lamest" -.. raw:: html - -
+---- .. _tcl-savechannels: @@ -3163,28 +2495,20 @@ savechannels Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl savechannels -.. raw:: html - -
+---- .. _tcl-loadchannels: @@ -3198,28 +2522,20 @@ loadchannels Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl loadchannels -.. raw:: html - -
+---- .. _tcl-channels: @@ -3234,28 +2550,20 @@ channels Returns a list of the channels the bot has a channel record for - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set channel_list [channels] -.. raw:: html - -
+---- .. _tcl-channame2dname: @@ -3272,28 +2580,20 @@ channame2dname See also :ref:`chandname2name ` - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set dname [channame2dname "#lamest"] -.. raw:: html - -
+---- .. _tcl-chandname2name: @@ -3310,28 +2610,20 @@ chandname2name See also :ref:`channame2dname ` - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set channel_name [chandname2name "#lamest"] -.. raw:: html - -
+---- .. _tcl-isbotnick: @@ -3346,28 +2638,20 @@ isbotnick Returns ``1`` if the nick matches the botnick; ``0`` otherwise - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set is_bot [isbotnick LamestBot] -.. raw:: html - -
+---- .. _tcl-botisop: @@ -3381,28 +2665,20 @@ botisop [channel] Returns ``1`` if the bot has ops on the specified channel (or any channel if no channel is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set opped [botisop "#lamest"] -.. raw:: html - -
+---- .. _tcl-botishalfop: @@ -3416,28 +2692,20 @@ botishalfop [channel] Returns ``1`` if the bot has halfops on the specified channel (or any channel if no channel is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set halfopped [botishalfop "#lamest"] -.. raw:: html - -
+---- .. _tcl-botisvoice: @@ -3451,28 +2719,20 @@ botisvoice [channel] Returns ``1`` if the bot has a voice on the specified channel (or any channel if no channel is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set voiced [botisvoice "#lamest"] -.. raw:: html - -
+---- .. _tcl-botonchan: @@ -3486,28 +2746,20 @@ botonchan [channel] Returns ``1`` if the bot is on the specified channel (or any channel if no channel is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set present [botonchan "#lamest"] -.. raw:: html - -
+---- .. _tcl-isop: @@ -3521,28 +2773,20 @@ isop [channel] 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 - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set opped [isop Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-ishalfop: @@ -3556,28 +2800,20 @@ ishalfop [channel] 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 - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set halfopped [ishalfop Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-wasop: @@ -3591,28 +2827,20 @@ wasop Returns ``1`` if someone that just got opped/deopped in the chan had op before the modechange; ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set previously_opped [wasop Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-washalfop: @@ -3626,28 +2854,20 @@ washalfop Returns ``1`` if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set previously_halfopped [washalfop Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-isvoice: @@ -3661,28 +2881,20 @@ isvoice [channel] 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 - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set voiced [isvoice Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-isidentified: @@ -3696,28 +2908,20 @@ isidentified [channel] Returns ``1`` if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); ``0`` otherwise. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set identified [isidentified Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-isaway: @@ -3731,28 +2935,20 @@ isaway [channel] Returns ``1`` if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; ``0`` otherwise. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set away [isaway Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-isircbot: @@ -3766,28 +2962,20 @@ isircbot [channel] Returns ``1`` if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; ``0`` otherwise. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set is_bot [isircbot Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-onchan: @@ -3800,28 +2988,20 @@ onchan [channel] Returns ``1`` if someone by that nickname is on the specified channel (or any channel if none is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set present [onchan Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-monitor: @@ -3835,28 +3015,20 @@ monitor [nickname] Returns The ``add`` sub-command returns a ``1`` if the nick was successfully added, a ``0`` if the nick is already in the monitor list, and a ``2`` if the nick could not be added. The ``delete`` sub-command returns a ``1`` if the nick is removed, or an error if the nick is not found. The ``status`` sub-command returns a ``1`` if ``nickname`` is online or a ``0`` if ``nickname`` is offline. The ``clear`` command removes all nicknames from the list the server is monitoring. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set added [monitor add Foobar] -.. raw:: html - -
+---- .. _tcl-accounttracking: @@ -3870,28 +3042,20 @@ accounttracking Returns a ``1`` if all three functionalities are present, a ``0`` if one or more are missing. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [accounttracking] -.. raw:: html - -
+---- .. _tcl-getaccount: @@ -3907,28 +3071,20 @@ getaccount [channel] NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set account [getaccount Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-nick2hand: @@ -3942,28 +3098,20 @@ nick2hand [channel] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set handle [nick2hand Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-account2nicks: @@ -3977,28 +3125,20 @@ account2nicks [channel] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set nicks [account2nicks foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-hand2nick: @@ -4012,28 +3152,20 @@ hand2nick [channel] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set nick [hand2nick foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-hand2nicks: @@ -4047,28 +3179,20 @@ hand2nicks [channel] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set nicks [hand2nicks foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-handonchan: @@ -4082,28 +3206,20 @@ handonchan [channel] 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 - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set present [handonchan foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-ischanban: @@ -4117,28 +3233,20 @@ ischanban Returns ``1`` if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [ischanban "*!*@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-ischanexempt: @@ -4152,28 +3260,20 @@ ischanexempt Returns ``1`` if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [ischanexempt "*!*@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-ischaninvite: @@ -4187,28 +3287,20 @@ ischaninvite Returns ``1`` if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [ischaninvite "*!*@127.0.0.1" "#lamest"] -.. raw:: html - -
+---- .. _tcl-chanbans: @@ -4222,28 +3314,20 @@ chanbans Returns a list of the current bans on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set bans [chanbans "#lamest"] -.. raw:: html - -
+---- .. _tcl-chanexempts: @@ -4257,28 +3341,20 @@ chanexempts Returns a list of the current exempts on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set exempts [chanexempts "#lamest"] -.. raw:: html - -
+---- .. _tcl-chaninvites: @@ -4292,28 +3368,20 @@ chaninvites Returns a list of the current invites on the channel. Each element is a sublist of the form ``{ }``. age is seconds from the bot's point of view - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set invites [chaninvites "#lamest"] -.. raw:: html - -
+---- .. _tcl-resetbans: @@ -4327,28 +3395,20 @@ resetbans Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetbans "#lamest" -.. raw:: html - -
+---- .. _tcl-resetexempts: @@ -4362,28 +3422,20 @@ resetexempts Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetexempts "#lamest" -.. raw:: html - -
+---- .. _tcl-resetinvites: @@ -4397,28 +3449,20 @@ resetinvites Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetinvites "#lamest" -.. raw:: html - -
+---- .. _tcl-resetchanidle: @@ -4432,28 +3476,20 @@ resetchanidle [nick] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetchanidle Foobar "#lamest" -.. raw:: html - -
+---- .. _tcl-resetchanjoin: @@ -4467,28 +3503,20 @@ resetchanjoin [nick] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetchanjoin Foobar "#lamest" -.. raw:: html - -
+---- .. _tcl-resetchan: @@ -4519,28 +3547,20 @@ resetchan [flags] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl resetchan "#lamest" w -.. raw:: html - -
+---- .. _tcl-refreshchan: @@ -4573,28 +3593,20 @@ refreshchan [flags] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl refreshchan "#lamest" w -.. raw:: html - -
+---- .. _tcl-getchanhost: @@ -4608,28 +3620,20 @@ getchanhost [channel] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set host [getchanhost Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-getchanjoin: @@ -4643,28 +3647,20 @@ getchanjoin 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set joined [getchanjoin Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-onchansplit: @@ -4678,28 +3674,20 @@ onchansplit [channel] Returns ``1`` if that nick is split from the channel (or any channel if no channel is specified); ``0`` otherwise - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set split [onchansplit Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-chanlist: @@ -4715,28 +3703,20 @@ chanlist [flags][<&|>chanflags] 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set nicks [chanlist "#lamest"] -.. raw:: html - -
+---- .. _tcl-getchanidle: @@ -4750,28 +3730,20 @@ getchanidle Returns number of minutes that person has been idle; ``-1`` if the specified user isn't on the channel - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set idle [getchanidle Foobar "#lamest"] -.. raw:: html - -
+---- .. _tcl-getchanmode: @@ -4785,28 +3757,20 @@ getchanmode Returns string of the type ``+ntik key`` for the channel specified - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set modes [getchanmode "#lamest"] -.. raw:: html - -
+---- .. _tcl-jump: @@ -4820,28 +3784,20 @@ jump [server [[+]port [password]]] Returns nothing - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl jump irc.example.net +6697 -.. raw:: html - -
+---- .. _tcl-pushmode: @@ -4855,28 +3811,20 @@ pushmode [arg] Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl pushmode "#lamest" +o Foobar -.. raw:: html - -
+---- .. _tcl-flushmode: @@ -4890,28 +3838,20 @@ flushmode Returns nothing - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl flushmode "#lamest" -.. raw:: html - -
+---- .. _tcl-topic: @@ -4925,28 +3865,20 @@ topic Returns string containing the current topic of the specified channel - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set current_topic [topic "#lamest"] -.. raw:: html - -
+---- .. _tcl-validchan: @@ -4960,28 +3892,20 @@ validchan Returns ``1`` if the channel exists, ``0`` if not - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set known [validchan "#lamest"] -.. raw:: html - -
+---- .. _tcl-isdynamic: @@ -4995,28 +3919,20 @@ isdynamic Returns ``1`` if the channel is a dynamic channel; ``0`` otherwise - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set dynamic [isdynamic "#lamest"] -.. raw:: html - -
+---- .. _tcl-setudef: @@ -5030,28 +3946,20 @@ setudef Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setudef flag example-setting -.. raw:: html - -
+---- .. _tcl-renudef: @@ -5065,28 +3973,20 @@ renudef Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl renudef flag example-setting renamed-setting -.. raw:: html - -
+---- .. _tcl-deludef: @@ -5100,28 +4000,20 @@ deludef Returns nothing - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl deludef flag example-setting -.. raw:: html - -
+---- .. _tcl-getudefs: @@ -5135,28 +4027,20 @@ getudefs [flag/int/str] Returns a list of user defined channel settings of the given type, or all of them if no type is given. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set flags [getudefs flag] -.. raw:: html - -
+---- .. _tcl-chansettype: @@ -5170,28 +4054,20 @@ chansettype 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. - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set type [chansettype autoop] -.. raw:: html - -
+---- .. _tcl-isupport-get: @@ -5206,28 +4082,20 @@ isupport get [key] Returns string or dict, see description above - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set chantypes [isupport get CHANTYPES] -.. raw:: html - -
+---- .. _tcl-isupport-isset: @@ -5241,20 +4109,14 @@ isupport isset Returns ``0`` or ``1`` - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -5277,28 +4139,20 @@ putdcc [-raw] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putdcc 0 "Hello, foobar." -.. raw:: html - -
+---- .. _tcl-putidx: @@ -5312,28 +4166,20 @@ putidx -[raw] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putidx 0 "Hello, foobar." -.. raw:: html - -
+---- .. _tcl-dccbroadcast: @@ -5347,28 +4193,20 @@ dccbroadcast Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl dccbroadcast "Example botnet announcement" -.. raw:: html - -
+---- .. _tcl-dccputchan: @@ -5382,28 +4220,20 @@ dccputchan Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl dccputchan 0 "Hello from LamestBot" -.. raw:: html - -
+---- .. _tcl-boot: @@ -5417,28 +4247,20 @@ boot [reason] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl boot foobar@LamestBot "Requested disconnect" -.. raw:: html - -
+---- .. _tcl-dccsimul: @@ -5452,28 +4274,20 @@ dccsimul Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl dccsimul 0 ".who" -.. raw:: html - -
+---- .. _tcl-hand2idx: @@ -5487,28 +4301,20 @@ hand2idx 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set idx [hand2idx foobar] -.. raw:: html - -
+---- .. _tcl-idx2hand: @@ -5522,28 +4328,20 @@ idx2hand Returns handle of the user with the given idx - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set handle [idx2hand 0] -.. raw:: html - -
+---- .. _tcl-valididx: @@ -5557,28 +4355,20 @@ valididx Returns ``1`` if the idx currently exists; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set valid [valididx 0] -.. raw:: html - -
+---- .. _tcl-getchan: @@ -5592,28 +4382,20 @@ getchan 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 - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set partyline_channel [getchan 0] -.. raw:: html - -
+---- .. _tcl-setchan: @@ -5627,28 +4409,20 @@ setchan Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setchan 0 0 -.. raw:: html - -
+---- .. _tcl-console: @@ -5662,28 +4436,20 @@ console [channel] [console-modes] 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 - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set settings [console 0 "#lamest" +mp] -.. raw:: html - -
+---- .. _tcl-resetconsole: @@ -5697,28 +4463,20 @@ resetconsole Returns a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set settings [resetconsole 0] -.. raw:: html - -
+---- .. _tcl-echo: @@ -5732,28 +4490,20 @@ echo [status] Returns new value of echo for that user (or the current value, if status was omitted) - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set echo_enabled [echo 0] -.. raw:: html - -
+---- .. _tcl-strip: @@ -5792,28 +4542,20 @@ strip [+/-strip-flags] Returns new strip-flags for the specified user (or the current flags, if strip-flags was omitted) - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set strip_flags [strip 0 +c] -.. raw:: html - -
+---- .. _tcl-page: @@ -5839,28 +4581,20 @@ page [number] status was omitted) - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set page_lines [page 0 20] -.. raw:: html - -
+---- .. _tcl-putbot: @@ -5874,28 +4608,20 @@ putbot Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putbot OtherBot "Hello from LamestBot" -.. raw:: html - -
+---- .. _tcl-putallbots: @@ -5909,28 +4635,20 @@ putallbots Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl putallbots "example-message Hello" -.. raw:: html - -
+---- .. _tcl-killdcc: @@ -5944,28 +4662,20 @@ killdcc Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl killdcc 0 -.. raw:: html - -
+---- .. _tcl-bots: @@ -5979,28 +4689,20 @@ bots Returns list of the bots currently connected to the botnet - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set linked_bots [bots] -.. raw:: html - -
+---- .. _tcl-botlist: @@ -6029,28 +4731,20 @@ botlist * - ``sharing`` - a ``+`` if the bot is a sharebot; ``-`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set botnet [botlist] -.. raw:: html - -
+---- .. _tcl-islinked: @@ -6064,28 +4758,20 @@ islinked Returns ``1`` if the bot is currently linked; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set linked [islinked OtherBot] -.. raw:: html - -
+---- .. _tcl-dccused: @@ -6099,28 +4785,20 @@ dccused Returns number of dcc connections currently in use - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set connections [dccused] -.. raw:: html - -
+---- .. _tcl-dcclist: @@ -6137,28 +4815,20 @@ dcclist [type] 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set connections [dcclist chat] -.. raw:: html - -
+---- .. _tcl-socklist: @@ -6204,20 +4874,16 @@ socklist [type] .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set sockets [socklist] - .. raw:: html - -
Module: core -.. raw:: html - -
+---- .. _tcl-whom: @@ -6231,28 +4897,20 @@ whom 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set users [whom 0] -.. raw:: html - -
+---- .. _tcl-getdccidle: @@ -6266,28 +4924,20 @@ getdccidle Returns number of seconds the dcc chat/file system/script user has been idle - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set idle_seconds [getdccidle 0] -.. raw:: html - -
+---- .. _tcl-getdccaway: @@ -6301,28 +4951,20 @@ getdccaway Returns away message for a dcc chat user (or ``""`` if the user is not set away) - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set away_message [getdccaway 0] -.. raw:: html - -
+---- .. _tcl-setdccaway: @@ -6336,28 +4978,20 @@ setdccaway Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setdccaway 0 "Away for a moment" -.. raw:: html - -
+---- .. _tcl-connect: @@ -6371,28 +5005,20 @@ connect <[+]port> Returns idx of the new connection - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set idx [connect 127.0.0.1 9000] -.. raw:: html - -
+---- .. _tcl-listen: @@ -6433,28 +5059,20 @@ listen [ip] [options [flag]] **Returns:** nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set port [listen 127.0.0.1 3333 users] -.. raw:: html - -
+---- .. _tcl-dccdumpfile: @@ -6468,20 +5086,14 @@ dccdumpfile Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -6504,28 +5116,20 @@ notes [numberlist] ``{ }`` - .. raw:: html - -
Module ``notes`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set note_count [notes foobar] -.. raw:: html - -
+---- .. _tcl-erasenotes: @@ -6539,28 +5143,20 @@ erasenotes Returns ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, or number of erased notes. - .. raw:: html - -
Module ``notes`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set erased [erasenotes foobar "1-3"] -.. raw:: html - -
+---- .. _tcl-listnotes: @@ -6574,28 +5170,20 @@ listnotes Returns ``-1`` if no such user, ``-2`` if notefile failure, ``0`` if no such note, list of existing notes. - .. raw:: html - -
Module ``notes`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set notes [listnotes foobar "1-3"] -.. raw:: html - -
+---- .. _tcl-storenote: @@ -6609,20 +5197,14 @@ storenote Returns ``0`` on success; non-``0`` on failure - .. raw:: html - -
Module ``notes`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -6643,28 +5225,20 @@ assoc [name] Returns current name for that channel, if any - .. raw:: html - -
Module ``assoc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set name [assoc 1 lamest] -.. raw:: html - -
+---- .. _tcl-killassoc: @@ -6678,20 +5252,14 @@ killassoc Returns nothing - .. raw:: html - -
Module ``assoc`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -6715,28 +5283,20 @@ compressfile [-level ] [target-file] See also :ref:`uncompressfile `, :ref:`iscompressed ` - .. raw:: html - -
Module ``compress`` - .. raw:: html - -
- .. admonition:: Example — Compress a file :collapsible: closed + :class: tcl-example .. code-block:: tcl compressfile -level 6 example.txt example.txt.gz -.. raw:: html - -
+---- .. _tcl-uncompressfile: @@ -6753,28 +5313,20 @@ uncompressfile [target-file] See also :ref:`compressfile `, :ref:`iscompressed ` - .. raw:: html - -
Module ``compress`` - .. raw:: html - -
- .. admonition:: Example — Uncompress a file :collapsible: closed + :class: tcl-example .. code-block:: tcl uncompressfile example.txt.gz example.txt -.. raw:: html - -
+---- .. _tcl-iscompressed: @@ -6788,20 +5340,14 @@ iscompressed Returns ``1`` if it is, ``0`` if it isn't, and ``2`` if some kind of error prevented the checks from succeeding. - .. raw:: html - -
Module ``compress`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -6822,28 +5368,20 @@ setpwd Returns nothing - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setpwd 0 / -.. raw:: html - -
+---- .. _tcl-getpwd: @@ -6857,28 +5395,20 @@ getpwd Returns the current directory of a file system user - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set directory [getpwd 0] -.. raw:: html - -
+---- .. _tcl-getfiles: @@ -6891,28 +5421,20 @@ getfiles Returns a list of files in the directory given; the directory is relative to dcc-path - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set files [getfiles /] -.. raw:: html - -
+---- .. _tcl-getdirs: @@ -6926,28 +5448,20 @@ getdirs Returns a list of subdirectories in the directory given; the directory is relative to dcc-path - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set directories [getdirs /] -.. raw:: html - -
+---- .. _tcl-dccsend: @@ -6980,28 +5494,20 @@ dccsend * - ``5`` - the file could not be opened or temporary file could not be created - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [dccsend example.txt Foobar] -.. raw:: html - -
+---- .. _tcl-filesend: @@ -7015,28 +5521,20 @@ filesend [ircnick] Returns ``0`` on failure; ``1`` on success (either an immediate send or a queued send) - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [filesend 0 example.txt Foobar] -.. raw:: html - -
+---- .. _tcl-fileresend: @@ -7050,28 +5548,20 @@ fileresend [ircnick] Returns ``0`` on failure; ``1`` on success (either an immediate send or a queued send) - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [fileresend 0 example.txt Foobar] -.. raw:: html - -
+---- .. _tcl-setdesc: @@ -7085,28 +5575,20 @@ setdesc Returns nothing - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setdesc / example.txt "Example file" -.. raw:: html - -
+---- .. _tcl-getdesc: @@ -7120,28 +5602,20 @@ getdesc Returns the description for a file in the file system, if one exists - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set description [getdesc / example.txt] -.. raw:: html - -
+---- .. _tcl-setowner: @@ -7155,28 +5629,20 @@ setowner Returns nothing - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setowner / example.txt foobar -.. raw:: html - -
+---- .. _tcl-getowner: @@ -7190,28 +5656,20 @@ getowner Returns the owner of a file in the file system - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set owner [getowner / example.txt] -.. raw:: html - -
+---- .. _tcl-setlink: @@ -7225,28 +5683,20 @@ setlink Returns nothing - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl setlink / example.txt OtherBot:/example.txt -.. raw:: html - -
+---- .. _tcl-getlink: @@ -7260,28 +5710,20 @@ getlink Returns the link for a linked file, if it exists - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set link [getlink / example.txt] -.. raw:: html - -
+---- .. _tcl-getfileq: @@ -7295,28 +5737,20 @@ getfileq 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 - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set queued_files [getfileq foobar] -.. raw:: html - -
+---- .. _tcl-getfilesendtime: @@ -7341,28 +5775,20 @@ getfilesendtime * - ``-2`` - the idx matches an entry which is not a file transfer - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [getfilesendtime 0] -.. raw:: html - -
+---- .. _tcl-mkdir: @@ -7390,28 +5816,20 @@ mkdir [ [channel]] * - ``-3`` - could not open filedb - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [mkdir /examples] -.. raw:: html - -
+---- .. _tcl-rmdir: @@ -7425,28 +5843,20 @@ rmdir Returns ``0`` on success; ``1`` on failure - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [rmdir /examples] -.. raw:: html - -
+---- .. _tcl-mv: @@ -7475,28 +5885,20 @@ mv * - ``-4`` - no matches found - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set moved [mv /incoming/example.txt /files/example.txt] -.. raw:: html - -
+---- .. _tcl-cp: @@ -7525,28 +5927,20 @@ cp * - ``-4`` - no matches found - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set copied [cp /incoming/example.txt /files/example.txt] -.. raw:: html - -
+---- .. _tcl-getflags: @@ -7560,28 +5954,20 @@ getflags Returns the flags required to access a directory - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set required_flags [getflags /] -.. raw:: html - -
+---- .. _tcl-setflags: @@ -7595,20 +5981,14 @@ setflags [ [channel]] Returns ``0`` on success; ``-1`` or ``-3`` on failure - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -7630,28 +6010,20 @@ encpass2 Returns a hash in the format of ``$pbkdf2-$rounds=$$`` where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. - .. raw:: html - -
Module ``pbkdf2`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set hash [encpass2 "example-password"] -.. raw:: html - -
+---- .. _tcl-pbkdf2: @@ -7665,20 +6037,14 @@ pbkdf2 [-bin] Returns a derived key from the provided ``pass`` string using ``salt`` and ``rounds`` count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. - .. raw:: html - -
Module ``pbkdf2`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -7699,28 +6065,20 @@ bind [proc-name] Returns name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl bind pub - !hello example_hello -.. raw:: html - -
+---- .. _tcl-unbind: @@ -7734,28 +6092,20 @@ unbind Returns name of the command that was removed - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl unbind pub - !hello example_hello -.. raw:: html - -
+---- .. _tcl-binds: @@ -7770,28 +6120,20 @@ binds [type/mask] a list of Tcl binds, each item in the list is a sublist of five elements: ``{ }`` - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set public_binds [binds pub] -.. raw:: html - -
+---- .. _tcl-logfile: @@ -7850,28 +6192,20 @@ logfile [ ] Returns filename of logfile created, or, if no logfile is specified, a list of logfiles such as: ``{mco * eggdrop.log}`` ``{jp #lamest lame.log}`` - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set logfiles [logfile] -.. raw:: html - -
+---- .. _tcl-maskhost: @@ -7920,28 +6254,20 @@ maskhost [masktype] Same is valid for types 20-29, but instead of '?', the '\*' wildcard will be used. Types 30-39 set the host to '\*'. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set mask [maskhost "Foobar!foobar@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-timer: @@ -7955,28 +6281,20 @@ timer [count [timerName]] Returns a ``timerName`` - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Schedule a timer :collapsible: closed + :class: tcl-example .. code-block:: tcl set id [timer 5 {putlog "Example timer fired."}] -.. raw:: html - -
+---- .. _tcl-utimer: @@ -7990,28 +6308,20 @@ utimer [count [timerName]] Returns a ``timerName`` - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Schedule a short timer :collapsible: closed + :class: tcl-example .. code-block:: tcl set id [utimer 30 {putlog "Example timer fired."}] -.. raw:: html - -
+---- .. _tcl-timers: @@ -8025,28 +6335,20 @@ timers Returns a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set active_timers [timers] -.. raw:: html - -
+---- .. _tcl-utimers: @@ -8060,28 +6362,20 @@ utimers Returns a list of active secondly timers, with each timer sub-list containing the number of seconds left until activation, the command that will be executed, the timerName, and the remaining number of repeats. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set active_timers [utimers] -.. raw:: html - -
+---- .. _tcl-killtimer: @@ -8095,29 +6389,21 @@ killtimer Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set timer_id [timer 5 {putlog "Example timer fired."}] killtimer $timer_id -.. raw:: html - -
+---- .. _tcl-killutimer: @@ -8131,29 +6417,21 @@ killutimer Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set timer_id [utimer 30 {putlog "Example timer fired."}] killutimer $timer_id -.. raw:: html - -
+---- .. _tcl-unixtime: @@ -8168,28 +6446,20 @@ unixtime Returns a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT). - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set now [unixtime] -.. raw:: html - -
+---- .. _tcl-duration: @@ -8203,28 +6473,20 @@ duration 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set readable [duration 3600] -.. raw:: html - -
+---- .. _tcl-strftime: @@ -8238,28 +6500,20 @@ strftime [time] 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set date [strftime "%Y-%m-%d"] -.. raw:: html - -
+---- .. _tcl-ctime: @@ -8273,28 +6527,20 @@ ctime 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`` - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set date [ctime [unixtime]] -.. raw:: html - -
+---- .. _tcl-myip: @@ -8308,28 +6554,20 @@ myip Returns a long number representing the bot's IP address, as it might appear in (for example) a DCC request - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [myip] -.. raw:: html - -
+---- .. _tcl-rand: @@ -8343,28 +6581,20 @@ rand 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set value [rand 100] -.. raw:: html - -
+---- .. _tcl-control: @@ -8378,28 +6608,20 @@ control Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl control 0 example_proc -.. raw:: html - -
+---- .. _tcl-sendnote: @@ -8431,28 +6653,20 @@ sendnote * - ``5`` - the note was stored because the user is away - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [sendnote foobar foobar "Example note"] -.. raw:: html - -
+---- .. _tcl-link: @@ -8466,28 +6680,20 @@ link [via-bot] Returns ``1`` if the link will be attempted; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Link a bot :collapsible: closed + :class: tcl-example .. code-block:: tcl set started [link OtherBot] -.. raw:: html - -
+---- .. _tcl-unlink: @@ -8501,28 +6707,20 @@ unlink [comment] Returns ``1`` on success; ``0`` otherwise - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set removed [unlink OtherBot "Maintenance"] -.. raw:: html - -
+---- .. _tcl-encrypt: @@ -8536,28 +6734,20 @@ encrypt 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.0. - .. raw:: html - -
Module ``encryption`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [encrypt "example-password" "Example text"] -.. raw:: html - -
+---- .. _tcl-decrypt: @@ -8571,29 +6761,21 @@ decrypt 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). - .. raw:: html - -
Module ``encryption`` - .. raw:: html - -
- .. admonition:: Example — Encrypt and decrypt text :collapsible: closed + :class: tcl-example .. code-block:: tcl set encrypted [encrypt "example-password" "Example text"] set plain [decrypt "example-password" $encrypted] -.. raw:: html - -
+---- .. _tcl-encpass: @@ -8607,28 +6789,20 @@ encpass Returns encrypted string (using the currently loaded encryption module) - .. raw:: html - -
Module ``encryption`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set encrypted [encpass "example-password"] -.. raw:: html - -
+---- .. _tcl-die: @@ -8642,28 +6816,20 @@ die [reason] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl die -.. raw:: html - -
+---- .. _tcl-unames: @@ -8677,28 +6843,20 @@ unames Returns the current operating system the bot is using - .. raw:: html - -
Module - ``core`` - - - .. raw:: html + ``core`` -
.. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [unames] -.. raw:: html - -
+---- .. _tcl-dnslookup: @@ -8718,20 +6876,14 @@ dnslookup [[arg1] [arg2] ... [argN]] Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Resolve a hostname :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -8740,9 +6892,7 @@ dnslookup [[arg1] [arg2] ... [argN]] } dnslookup irc.example.net example_dns_result -.. raw:: html - -
+---- .. _tcl-md5: @@ -8756,28 +6906,20 @@ md5 Returns the 128 bit MD5 message-digest of the specified string - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set digest [md5 "example text"] -.. raw:: html - -
+---- .. _tcl-callevent: @@ -8791,28 +6933,20 @@ callevent Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl callevent example-event -.. raw:: html - -
+---- .. _tcl-traffic: @@ -8826,28 +6960,20 @@ traffic 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). - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set usage [traffic] -.. raw:: html - -
+---- .. _tcl-modules: @@ -8860,28 +6986,20 @@ modules 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set loaded_modules [modules] -.. raw:: html - -
+---- .. _tcl-loadmodule: @@ -8895,28 +7013,20 @@ loadmodule Returns ``Already loaded.`` if the module is already loaded, ``""`` if successful, or the reason the module couldn't be loaded. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [loadmodule notes] -.. raw:: html - -
+---- .. _tcl-unloadmodule: @@ -8930,28 +7040,20 @@ unloadmodule Returns ``No such module`` if the module is not loaded, ``""`` otherwise. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set result [unloadmodule notes] -.. raw:: html - -
+---- .. _tcl-loadhelp: @@ -8965,28 +7067,20 @@ loadhelp Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl loadhelp example.help -.. raw:: html - -
+---- .. _tcl-unloadhelp: @@ -9000,28 +7094,20 @@ unloadhelp Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl unloadhelp example.help -.. raw:: html - -
+---- .. _tcl-reloadhelp: @@ -9035,28 +7121,20 @@ reloadhelp Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl reloadhelp -.. raw:: html - -
+---- .. _tcl-restart: @@ -9070,28 +7148,20 @@ restart Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl restart -.. raw:: html - -
+---- .. _tcl-rehash: @@ -9105,28 +7175,20 @@ rehash Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl rehash -.. raw:: html - -
+---- .. _tcl-stripcodes: @@ -9165,28 +7227,20 @@ stripcodes Returns the stripped string. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set clean [stripcodes c "Example text"] -.. raw:: html - -
+---- .. _tcl-matchaddr: @@ -9200,28 +7254,20 @@ matchaddr
Returns ``1`` if the address matches the hostmask, ``0`` otherwise. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set matched [matchaddr "*!*@127.0.0.1" "Foobar!foobar@127.0.0.1"] -.. raw:: html - -
+---- .. _tcl-matchcidr: @@ -9236,28 +7282,20 @@ matchcidr
Returns ``1`` if the address matches the block prefix, ``0`` otherwise. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set matched [matchcidr 127.0.0.0 127.0.0.1 8] -.. raw:: html - -
+---- .. _tcl-matchstr: @@ -9271,28 +7309,20 @@ matchstr Returns ``1`` if the pattern matches the string, ``0`` if it doesn't. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set matched [matchstr "Foo*" "Foobar"] -.. raw:: html - -
+---- .. _tcl-rfcequal: @@ -9306,28 +7336,20 @@ rfcequal Returns ``1`` if equal, ``0`` if not. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set equal [rfcequal "Foobar" "foobar"] -.. raw:: html - -
+---- .. _tcl-status: @@ -9356,28 +7378,20 @@ status [type] Returns the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set cpu_info [status cpu] -.. raw:: html - -
+---- .. _tcl-istls: @@ -9391,28 +7405,20 @@ istls Returns ``1`` if the idx is a TLS connection, ``0`` if it's plaintext. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl set secure [istls 0] -.. raw:: html - -
+---- .. _tcl-starttls: @@ -9426,28 +7432,20 @@ starttls Returns nothing - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — Start TLS on a connection :collapsible: closed + :class: tcl-example .. code-block:: tcl starttls 0 -.. raw:: html - -
+---- .. _tcl-tlsstatus: @@ -9461,20 +7459,14 @@ tlsstatus Returns a flat list of name-value pairs - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9747,20 +7739,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Used for ``/msg`` commands. The first word of the user's msg is the command, and everything else becomes the text argument. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — MSG trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9788,20 +7774,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Used for partyline commands; the command is the first word and everything else is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — DCC trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9829,20 +7809,14 @@ The following is a list of bind types and how they work. Below each bind type is Description The same as DCC, except this is triggered if the user is in the file area instead of the party line. - .. raw:: html - -
Module ``filesys`` - .. raw:: html - -
- .. admonition:: Example — FIL trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9870,20 +7844,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Used for commands given on a channel. The first word becomes the command and everything else is the text argument. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — PUB trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9911,20 +7879,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — MSGM trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -9953,20 +7915,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — PUBM trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10004,20 +7960,14 @@ The following is a list of bind types and how they work. Below each bind type is for compatibility. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — NOTC trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10046,20 +7996,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered by someone joining the channel. The mask in the bind is matched against ``#channel nick!user\@host`` and can contain wildcards. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — JOIN trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10093,20 +8037,14 @@ The following is a list of bind types and how they work. Below each bind type is for compatibility. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — PART trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10134,20 +8072,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — SIGN trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10175,20 +8107,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered by a topic change. mask can contain wildcards and is matched against ``#channel ``. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — TOPC trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10216,20 +8142,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — KICK trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10257,20 +8177,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — NICK trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10318,20 +8232,14 @@ The following is a list of bind types and how they work. Below each bind type is } proc mode_proc {nick uhost hand chan mode} { ... } - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — MODE trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10358,20 +8266,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — CTCP trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10400,20 +8302,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg). - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — CTCR trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10443,20 +8339,14 @@ The following is a list of bind types and how they work. Below each bind type is Description The mask can contain wildcards and is matched against the keyword, which is either a numeric, like ``368``, or a keyword, such as ``PRIVMSG``. ``from`` will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns ``1``, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind). - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — RAW trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10485,20 +8375,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — BOT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10526,20 +8410,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CHON trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10567,20 +8445,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CHOF trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10608,20 +8480,14 @@ The following is a list of bind types and how they work. Below each bind type is 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``). - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example — SENT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10649,20 +8515,14 @@ The following is a list of bind types and how they work. Below each bind type is 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). - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example — RCVD trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10692,20 +8552,14 @@ The following is a list of bind types and how they work. Below each bind type is NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CHAT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10733,20 +8587,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — LINK trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10774,20 +8622,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — DISC trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10815,20 +8657,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — SPLT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10856,20 +8692,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Someone who was split has rejoined. mask can contain wildcards, and is matched against ``#channel nick!user\@host``. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — REJN trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10897,20 +8727,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Party line and file system users have their text sent through filt before being processed. ``mask`` is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — FILT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10939,20 +8763,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — NEED trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -10980,20 +8798,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — FLUD trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11022,20 +8834,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — NOTE trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11064,20 +8870,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — ACT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11105,20 +8905,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — WALL trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11148,20 +8942,14 @@ The following is a list of bind types and how they work. Below each bind type is 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``. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — BCST trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11189,20 +8977,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CHJN trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11230,20 +9012,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CHPT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11271,20 +9047,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — TIME trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11312,20 +9082,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — AWAY trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11353,20 +9117,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — LOAD trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11395,20 +9153,14 @@ The following is a list of bind types and how they work. Below each bind type is Triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards;. flags are ignored. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — UNLD trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11436,20 +9188,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — NKCH trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11498,20 +9244,14 @@ The following is a list of bind types and how they work. Below each bind type is Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — EVNT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11539,20 +9279,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example — LOST trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11580,20 +9314,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``transfer`` - .. raw:: html - -
- .. admonition:: Example — TOUT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11621,20 +9349,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — OUT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11663,20 +9385,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — CRON trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11704,20 +9420,14 @@ The following is a list of bind types and how they work. Below each bind type is 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 ``*``. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — LOG trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11745,20 +9455,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered for TCP connections when an SSL/TLS handshake has completed and the connection is secured. The mask is matched against the idx of the connection. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — TLS trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11786,20 +9490,14 @@ The following is a list of bind types and how they work. Below each bind type is 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. - .. raw:: html - -
Module ``core`` - .. raw:: html - -
- .. admonition:: Example — DIE trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11827,20 +9525,14 @@ The following is a list of bind types and how they work. Below each bind type is 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 support this capability; see the ``cap`` Tcl command for more information 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, 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 with the bot. To trigger a proc only once per away change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — IRCAWAY trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11868,20 +9560,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered when Eggdrop receives 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 Eggdrop may be able to see invite messages for other people that are not the Eggdrop. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — INVT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11909,20 +9595,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like ``368``, or a keyword, such as ``PRIVMSG`` or ``TAGMSG``. from will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. tags is a dictionary (flat key/value list) of the message tags with ``""`` for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns ``1``, Eggdrop will not process the line any further, including processing by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — RAWT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11952,20 +9632,14 @@ The following is a list of bind types and how they work. Below each bind type is NOTE: The three required IRC components for account tracking are the WHOX feature, the extended-join IRCv3 capability, and the account-notify IRCv3 capability. If only some of the three features are available, Eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see ``doc/ACCOUNTS`` for additional information. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — ACCOUNT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -11993,20 +9667,14 @@ The following is a list of bind types and how they work. Below each bind type is 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 a 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. - .. raw:: html - -
Module ``server`` - .. raw:: html - -
- .. admonition:: Example — ISUPPORT trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -12034,20 +9702,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is ``0`` if the nickname disconnected, or ``1`` if the nickname connected. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — MONITOR trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -12075,20 +9737,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered when a server sends an IRCv3 CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of ``#channel nick!user@host`` and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed, the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. - .. raw:: html - -
Module ``irc`` - .. raw:: html - -
- .. admonition:: Example — CHGHOST trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl @@ -12116,20 +9772,14 @@ The following is a list of bind types and how they work. Below each bind type is Description Triggered when a channel setting is set via the partyline. flags is ignored, mask is the name of channel setting (not including any +/- prefix) and can contain wildcards. The proc will be called with the channel that the setting was set on, the text name of the setting that was changed, and the value it was set to (0/1 for -/+, string, or X:Y formatted value). - .. raw:: html - -
Module ``channels`` - .. raw:: html - -
- .. admonition:: Example — CHANSET trigger :collapsible: closed + :class: tcl-example .. code-block:: tcl From 9c92b9af2eac5bb90a0031862b5436f922062da5 Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 19:24:46 -0400 Subject: [PATCH 5/9] set minimum sphinx version --- doc/sphinx_source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx_source/conf.py b/doc/sphinx_source/conf.py index 41d81bf43..0a3bfe334 100644 --- a/doc/sphinx_source/conf.py +++ b/doc/sphinx_source/conf.py @@ -21,7 +21,7 @@ # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +needs_sphinx = '8.2' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom From ebe0b0ef918c56104c4494d1a8ffb9a790807589 Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 19:25:29 -0400 Subject: [PATCH 6/9] replace return values --- doc/sphinx_source/using/tcl-commands.rst | 85 ++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index aba188eea..6908f19bb 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -9796,3 +9796,88 @@ The following is a list of bind types and how they work. Below each bind type is .chanset #lamest +autoop Channel is #lamest, setting is autoop, value is 1 +^^^^^^^^^^^^^ +Return Values +^^^^^^^^^^^^^ + +Several bind types pay attention to the value returned by the Tcl proc using +``return ``. Unless otherwise noted, these binds generally expect +``0`` or ``1``, and an empty return is interpreted as ``0``. If a proc omits +an explicit ``return`` statement, Tcl returns the result of the last command +executed, which may cause unintended bind behavior. + +The following bind types use their proc's return value: + +#. ``MSG`` — Return ``1`` to make Eggdrop log the command as: + + .. code-block:: text + + (nick!user@host) !handle! command + +#. ``DCC`` — Return ``1`` to make Eggdrop log the command as: + + .. code-block:: text + + #handle# command + +#. ``FIL`` — Return ``1`` to make Eggdrop log the command as: + + .. code-block:: text + + #handle# files: command + +#. ``PUB`` — Return ``1`` to make Eggdrop log the command as: + + .. code-block:: text + + <> !handle! command + +#. ``CTCP`` — Return ``1`` to ask the bot not to process the CTCP command on + its own. Otherwise, it may send its own response to the CTCP, including an + error response for an unrecognized CTCP command. + +#. ``FILT`` — Return ``""`` to indicate the text has been processed and should + be ignored by the bot. Otherwise, the bot treats the returned text normally. + +#. ``FLUD`` — Return ``1`` to ask the bot not to take action on the flood. + Otherwise, it performs its normal flood punishment. + +#. ``RAW`` — Return ``1`` to ask the bot not to process the server text. This + can cause Eggdrop to miss events it would normally act on. + +#. ``CHON`` — Return ``1`` to ask the bot not to process the partyline join + event. + +#. ``CHOF`` — Return ``1`` to ask the bot not to process the partyline part + event. + +#. ``WALL`` — Return ``1`` to make Eggdrop not log the message that triggered + this bind. + +#. ``NOTE`` — Return ``1`` to make Eggdrop stop processing the note. This + includes stacked note bindings that would otherwise run afterward, as well + as Eggdrop's built-in note handling routines. + +#. ``MSGM`` — Return ``1`` to make Eggdrop not log the message that triggered + this bind. + +#. ``PUBM`` — Return ``1`` to make Eggdrop not log the message that triggered + this bind. + +#. ``NOTC`` — Return ``1`` to make Eggdrop not log the message that triggered + this bind. + +#. ``OUT`` — Return ``1`` to make Eggdrop drop the message instead of sending + it. This is only meaningful for messages whose status is ``queued``. + +#. ``EVNT`` — Return ``1`` to make Eggdrop skip its default action for the + event. This is used for signal-type events and ignored for other events. + +#. ``TLS`` — Return ``1`` to disable verbose SSL information for the + handshake. + +#. ``RAWT`` — Return ``1`` to ask the bot not to process the server text. + This can cause Eggdrop to miss events it would normally act on. + +#. ``CHANSET`` — Return ``1`` to prevent the channel setting from being + changed. From e373cb759b364f8725dcdc550dcd3cf1c7237dde Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 19:28:10 -0400 Subject: [PATCH 7/9] replace wildcard matching --- doc/sphinx_source/using/tcl-commands.rst | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 6908f19bb..12aaaa653 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -9796,6 +9796,36 @@ The following is a list of bind types and how they work. Below each bind type is .chanset #lamest +autoop Channel is #lamest, setting is autoop, value is 1 +.. _wildcards: + +Match Characters +---------------- + +Many bind types allow special match characters in their mask arguments. The +following characters have special meaning: + +.. list-table:: + :widths: 15 85 + :header-rows: 1 + + * - Match character + - Description + * - ``?`` + - Matches any single character. + * - ``*`` + - Matches zero or more characters of any type. + * - ``%`` + - Matches zero or more non-space characters and can be used to match a + single word. This character works only in binds, not in regular + matching. + * - ``~`` + - Matches one or more space characters and can be used for whitespace + between words. This character works only in binds, not in regular + matching. + * - ``\*`` + - Matches a literal ``*``. Tcl also requires escaping, so a bind mask + must use ``"\\*"`` or ``{\*}``. + ^^^^^^^^^^^^^ Return Values ^^^^^^^^^^^^^ From d2a796ecca3cb652471df7d6ddb53b41bca1139f Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 19:30:43 -0400 Subject: [PATCH 8/9] fix tcp connection wording --- doc/sphinx_source/using/tcl-commands.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index 12aaaa653..d9c3ab96e 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -5000,10 +5000,10 @@ connect <[+]port> ^^^^^^^^^^^^^^^^^^^^^^^^ 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. + Makes a non-blocking outgoing connection attempt and creates a DCC entry for it. The returned idx identifies that DCC entry; it does **not** mean the remote TCP connection has completed successfully. A ``control`` command should be attached to the new idx immediately so input and connection-status events are not missed. If hostname resolution succeeds but the subsequent connection attempt fails, the failure is delivered asynchronously to the control callback as an EOF. If the port is prefixed with a plus sign, an SSL-encrypted connection will be attempted. Returns - idx of the new connection + idx of the new DCC entry after the connection attempt is started. The returned idx is not confirmation that the remote connection has been established. Module From 578230ac4819469590a673d80a22566d74742abf Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 13 Sep 2026 19:35:03 -0400 Subject: [PATCH 9/9] Fix bind documentation --- doc/sphinx_source/using/tcl-commands.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/sphinx_source/using/tcl-commands.rst b/doc/sphinx_source/using/tcl-commands.rst index d9c3ab96e..8ee1fc574 100644 --- a/doc/sphinx_source/using/tcl-commands.rst +++ b/doc/sphinx_source/using/tcl-commands.rst @@ -8362,7 +8362,7 @@ The following is a list of bind types and how they work. Below each bind type is .. code-block:: text Foobar sends PRIVMSG LamestBot :hello world - From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is LamestBot :hello world + From is foobar@127.0.0.1, keyword is PRIVMSG, text is LamestBot :hello world .. _bind-bot: @@ -9547,7 +9547,7 @@ The following is a list of bind types and how they work. Below each bind type is .. code-block:: text Foobar sets an away message of "Lunch" while on #lamest - Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Lunch + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, message is Lunch .. _bind-invt: @@ -9616,8 +9616,8 @@ The following is a list of bind types and how they work. Below each bind type is .. code-block:: text - @account=foobar :Foobar!foobar@127.0.0.1 PRIVMSG #lamest :Hello! - From is Foobar!foobar@127.0.0.1, keyword is PRIVMSG, text is #lamest :Hello!, tags are account foobar + @account=foobar :foobar@127.0.0.1 PRIVMSG #lamest :Hello! + From is foobar@127.0.0.1, keyword is PRIVMSG, text is #lamest :Hello!, tags are account foobar .. _bind-account: @@ -9654,7 +9654,7 @@ The following is a list of bind types and how they work. Below each bind type is .. code-block:: text Foobar identifies to services as foobar while on #lamest - Nick is Foobar, user is Foobar!foobar@127.0.0.1, handle is foobar, channel is #lamest, account is foobar + Nick is Foobar, user is foobar@127.0.0.1, handle is foobar, channel is #lamest, account is foobar .. _bind-isupport: