diff --git a/doc/sphinx_source/_static/eggdrop.css b/doc/sphinx_source/_static/eggdrop.css
index 524dee748f..1a4a4c4e89 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/conf.py b/doc/sphinx_source/conf.py
index 41d81bf432..0a3bfe334c 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
diff --git a/doc/sphinx_source/eggdrop.css b/doc/sphinx_source/eggdrop.css
deleted file mode 100644
index 95aae8b5b6..0000000000
--- 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 5ae8be558a..8ee1fc574f 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
@@ -17,3811 +17,9897 @@ 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
+
+
+ Module
+ ``server``
+
- Options:
- -next push messages to the front of the queue
- -normal no effect
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: nothing
+ .. code-block:: tcl
- Module: server
+ putserv "PRIVMSG #lamest :Hello from LamestBot!"
+
+----
+
+.. _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
+
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Options:
- -next push messages to the front of the queue
- -normal no effect
+ .. code-block:: tcl
- Returns: nothing
+ puthelp "PRIVMSG #lamest :Hello, Foobar!"
- 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
+
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
- Options:
- -next push messages to the front of the queue
- -normal no effect
+ putquick "NOTICE Foobar :This message uses the quick queue."
- Returns: nothing
+----
- 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
- Module: server
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ putnow "PING :irc.example.net"
+
+----
+
+.. _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
- Module: irc
+ Module
+ ``irc``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ putkick "#lamest" Foobar "Example kick reason"
+
+----
+
+.. _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
+
- Returns: nothing
+ Module
+ ``core``
- Module: core
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ putlog "LamestBot loaded the example script."
+
+----
+
+.. _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
+
+
+ Module
+ ``core``
- Returns: nothing
- Module: core
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ putcmdlog "Foobar used an example command."
+
+----
+
+.. _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
+
+
+ Module
+ ``core``
+
- Returns: nothing
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: core
+ .. code-block:: tcl
+
+ putxferlog "Example file transfer completed."
+
+----
+
+.. _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
+
+
+ Module
+ ``core``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: nothing
+ .. code-block:: tcl
- Module: core
+ putloglev o "#lamest" "Example log message."
+
+----
+
+.. _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
+
+
+ Module
+ ``core``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
- Returns: nothing
+ dumpfile Foobar help.txt
- Module: core
+----
+
+.. _tcl-queuesize:
^^^^^^^^^^^^^^^^^
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.
+ 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.
+
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
- Module: server
+ set queued [queuesize 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.
+
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
- Returns: the number of deleted lines from the specified queue.
+ set removed [clearqueue help]
- 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.
+
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ set capabilities [cap ls]
- 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.
+----
- 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.
- Examples:
- set mytags [dict create +foo bar moo baa +last ""]; tagmsg $mytags #channel
- tagmsg "+foo bar moo baa +last {}" #channel
- Returns: nothing
+ Returns
+ nothing
- Module: server
+
+ Module
+ ``server``
+
+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ set tags [dict create +example value]
+ tagmsg $tags "#lamest"
+
+----
+
+.. _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
- Module: server
+ Module
+ ``server``
+
+
+ .. admonition:: Example — Add a server
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ server add irc.example.net +6697
+
+----
+
+.. _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
+ Module
+ ``server``
- Module: server
+
+ .. admonition:: Example — Remove a server
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ server remove irc.example.net +6697
+
+----
+
+.. _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}}``
+
+
+ Module
+ ``server``
- Returns: A list of lists in the format {{hostname} {port} {password}}
- Module: server
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
+
+ .. code-block:: tcl
+
+ set servers [server list]
User Record Manipulation Commands
---------------------------------
+.. _tcl-countusers:
+
^^^^^^^^^^
countusers
^^^^^^^^^^
- Returns: number of users in the bot's database
-
- Module: core
-
-^^^^^^^^^^^^^^^^^^
-validuser
-^^^^^^^^^^^^^^^^^^
+ Description
+ Returns the number of users in the bot's user database.
- Returns: 1 if a user by that name exists; 0 otherwise
- Module: core
+ Returns
+ number of users in the bot's database
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ Module
+ ``core``
- Returns: the handle found, or "*" if none
- Module: core
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^
-userlist [flags]
-^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/\|}[chan]{&/\|}[bot]). '&' specifies "and"; '|' specifies "or".
+ set usercount [countusers]
+ putlog "LamestBot has $usercount users."
- Module: core
+----
-^^^^^^^^^^^^^^^^^^^^^^^^
-passwdok
-^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-validuser:
- Description: checks the password given against the user's password. Check against the password "-" to find out if a user has no password set.
+^^^^^^^^^^^^^^^^^^
+validuser
+^^^^^^^^^^^^^^^^^^
- 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.
+ Description
+ Checks whether a user with the specified handle exists in the bot's user database.
- Module: core
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-getuser [entry-type] [extra info]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` if a user by that name exists; ``0`` otherwise
- 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 |
- +----------+-------------------------------------------------------------------------------------+
-
- 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
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-setuser [extra info]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``core``
- 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) |
- +---------+---------------------------------------------------------------------------------------+
-
- Returns: nothing
-
- Module: core
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-chhandle
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Description: changes a user's handle
+ .. code-block:: tcl
- Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can't be found
+ if {[validuser foobar]} {
+ putlog "The handle foobar exists."
+ }
- Module: core
+----
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-chattr [changes [channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-finduser:
- 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.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+finduser [-account]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 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.
+ 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.
- Module: core
+ Returns
+ the handle found, or ``*`` if none
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-botattr [changes [channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: similar to chattr except this modifies bot flags rather than normal user attributes.
+ Module
+ ``core``
- 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
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-.. _matchattr:
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-matchattr [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ set handle [finduser "Foobar!foobar@127.0.0.1"]
- Description: checks if the flags of the specified user match the flags provided. "flags" is of the form::
+----
- [+/-][&/|[&/|]]
+.. _tcl-userlist:
- 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.
+^^^^^^^^^^^^^^^^
+userlist [flags]
+^^^^^^^^^^^^^^^^
- Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise
+ Description
+ Returns users from the bot's user database, optionally filtered by a flag mask.
- Module: core
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-adduser [hostmask]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ a list of users on the bot. You can use the flag matching system here ([global]``{&/\|}``[chan]``{&/\|}``[bot]). '&' specifies ``and``; '|' specifies ``or``.
- 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
+ Module
+ ``core``
- 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:
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- - ipaddress
- - ipv4address:botport/userport [DEPRECATED]
- - [ipv6address]:botport/userport [DEPRECATED]
+ .. code-block:: tcl
-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.
+ set users [userlist]
- Returns: 1 if successful; 0 if the bot already exists or a port is invalid
+----
- Module: core
+.. _tcl-passwdok:
-^^^^^^^^^^^^^^^^
-deluser
-^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^
+passwdok
+^^^^^^^^^^^^^^^^^^^^^^^^
- Description: attempts to erase the user record for a handle
+ 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 successful, 0 if no such user exists
+ 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.
- Module: core
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-delhost
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``core``
- 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
+ :class: tcl-example
- Module: core
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-addchanrec
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ set valid [passwdok foobar "example-password"]
- Description: adds a channel record for a user
+----
- Returns: 1 on success; 0 if the user or channel does not exist
+.. _tcl-getuser:
- Module: channels
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+getuser [entry-type] [extra info]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-delchanrec
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 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: removes a channel record for a user. This includes all associated channel flags.
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- Returns: 1 on success; 0 if the user or channel does not exist
+ * - ``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
- Module: channels
+ For additional custom user fields, to include the deprecated ``EMAIL`` and ``URL`` fields, reference ``scripts/userinfo.tcl.``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-haschanrec
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ info specific to each entry-type
- Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise
- Module: channels
+ Module
+ ``core``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-getchaninfo
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Returns: info line for a specific channel (behaves just like 'getinfo')
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: channels
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-setchaninfo
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ set hosts [getuser foobar HOSTS]
- Description: sets the info line on a specific channel for a user. If info is "none", it will be removed.
+----
- Returns: nothing
+.. _tcl-setuser:
- Module: channels
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+setuser [extra info]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-newchanban [lifetime] [options]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 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: 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.
+ .. list-table::
+ :widths: 9 91
+ :header-rows: 1
- Options:
+ * - ``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.
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the ban to be always active on a channel, even with dynamicbans on |
- +-----------+-------------------------------------------------------------------------------------+
+ ```` ````
+ 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)
- Returns: nothing
+ ```` ````
+ sets a user's LASTON time for a channel (if it is a valid channel)
- Module: channels
+ Returns
+ nothing
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ Module
+ ``core``
- Options:
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the ban to be always active on a channel, even with dynamicbans on |
- +-----------+-------------------------------------------------------------------------------------+
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: nothing
+ .. code-block:: tcl
- Module: channels
+ setuser foobar INFO "Example user information"
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+.. _tcl-chhandle:
- Options:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+chhandle
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on |
- +-----------+-------------------------------------------------------------------------------------+
+ Description
+ Changes a user's handle.
- Returns: nothing
+ Returns
+ ``1`` on success; ``0`` if the new handle is invalid or already used, or if the user can't be found
- Module: channels
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-newexempt [lifetime] [options]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``core``
- 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:
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on |
- +-----------+-------------------------------------------------------------------------------------+
+ .. code-block:: tcl
- Returns: nothing
+ set changed [chhandle foobar foobar2]
- Module: channels
+----
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-newchaninvite [lifetime] [options]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-chattr:
- 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.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+chattr [changes [channel]]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Options:
+ 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.
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the invite to be always active on a channel, even with dynamicinvites on |
- +-----------+-------------------------------------------------------------------------------------+
+ 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: nothing
- Module: channels
+ Module
+ ``core``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Options:
+ .. code-block:: tcl
- +-----------+-------------------------------------------------------------------------------------+
- | sticky | forces the invite to be always active on a channel, even with dynamicinvites on |
- +-----------+-------------------------------------------------------------------------------------+
+ set flags [chattr foobar +o "#lamest"]
- Returns: nothing
+----
- Module: channels
+.. _tcl-botattr:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-stickban [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+botattr [changes [channel]]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.
+ Description
+ Similar to chattr except this modifies bot flags rather than normal user attributes.
- Returns: 1 on success; 0 otherwise
+ 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: channels
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-unstickban [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``core``
- 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
+ :class: tcl-example
- Module: channels
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-stickexempt [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ set flags [botattr OtherBot]
- Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.
+.. _matchattr:
- Returns: 1 on success; 0 otherwise
+----
- Module: channels
+.. _tcl-matchattr:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-unstickexempt [channel]
+matchattr [channel]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
+ Description
+ Checks if the flags of the specified user match the flags provided. ``flags`` is of the form::
- Returns: 1 on success; 0 otherwise
+ [+/-][&/|[&/|]]
- Module: channels
+ 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.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-stickinvite [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.
+ Returns
+ ``1`` if the specified user has the flags matching the provided mask; ``0`` otherwise
- Returns: 1 on success; 0 otherwise
- Module: channels
+ Module
+ ``core``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-unstickinvite [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
+ .. admonition:: Example — Check user flags
+ :collapsible: closed
+ :class: tcl-example
- Returns: 1 on success; 0 otherwise
+ .. code-block:: tcl
- Module: channels
+ if {[matchattr foobar o "#lamest"]} {
+ putlog "foobar has the requested flags."
+ }
+
+----
+
+.. _tcl-adduser:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-killchanban
+adduser [hostmask]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: removes a ban from the ban list for a channel
+ Description
+ Creates a new user entry with the handle and hostmask given (with no password and the default flags).
- Returns: 1 on success; 0 otherwise
+ Returns
+ ``1`` if successful; ``0`` if the handle already exists
- Module: channels
-^^^^^^^^^^^^^
-killban
-^^^^^^^^^^^^^
+ Module
+ ``core``
- Description: removes a ban from the global ban list
- Returns: 1 on success; 0 otherwise
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: channels
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-killchanexempt
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- Description: removes an exempt from the exempt list for a channel
-
- Returns: 1 on success; 0 otherwise
-
- Module: channels
-
-^^^^^^^^^^^^^^^^^^^
-killexempt
-^^^^^^^^^^^^^^^^^^^
-
- Description: removes an exempt from the global exempt list
+ set added [adduser foobar "Foobar!foobar@127.0.0.1"]
- Returns: 1 on success; 0 otherwise
+----
- Module: channels
+.. _tcl-addbot:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-killchaninvite
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+addbot [botport [userport]]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: removes an invite from the invite list for a channel
+ Description
+ Adds a new bot to the userlist with the handle and botaddress given (with no password and no flags). ```` format is one of:
- Returns: 1 on success; 0 otherwise
+ - ipaddress
+ - ipv4address:botport/userport [DEPRECATED]
+ - [ipv6address]:botport/userport [DEPRECATED]
- Module: channels
+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.
-^^^^^^^^^^^^^^^^^^^
-killinvite
-^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` if successful; ``0`` if the bot already exists or a port is invalid
- Description: removes an invite from the global invite list
- Returns: 1 on success; 0 otherwise
+ Module
+ ``core``
- Module: channels
-^^^^^^^^^^^^^^^^^^^^^
-ischanjuped
-^^^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise
+ .. code-block:: tcl
- Module: channels
+ set added [addbot OtherBot 127.0.0.1]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+.. _tcl-deluser:
- Module: channels
+^^^^^^^^^^^^^^^^
+deluser
+^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-ispermban [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Description
+ Attempts to erase the user record for a handle.
- 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 successful, ``0`` if no such user exists
- Module: channels
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isexempt [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``core``
- 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.
- Module: channels
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-ispermexempt [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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.
+ set deleted [deluser foobar]
- Module: channels
+----
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isinvite [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-delhost:
- 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.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+delhost
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: channels
+ Description
+ Deletes a hostmask from a user's host list.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isperminvite [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` on success; ``0`` if the hostmask (or user) doesn't exist
- 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.
- Module: channels
+ Module
+ ``core``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: channels
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isexemptsticky [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ set result [delhost foobar "Foobar!foobar@127.0.0.1"]
- 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
+.. _tcl-addchanrec:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isinvitesticky [channel [-channel]]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+addchanrec
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 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
+ Adds a channel record for a user.
- Module: channels
+ Returns
+ ``1`` on success; ``0`` if the user or channel does not exist
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ Module
+ ``channels``
- Module: channels
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-matchexempt [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- 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.
+ .. code-block:: tcl
- Module: channels
+ set added [addchanrec foobar "#lamest"]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-matchinvite [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----
- 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.
+.. _tcl-delchanrec:
- Module: channels
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+delchanrec
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^
-banlist [channel]
-^^^^^^^^^^^^^^^^^
+ Description
+ Removes a channel record for a user. This includes all associated channel flags.
- 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
+ ``1`` on success; ``0`` if the user or channel does not exist
- Module: channels
-^^^^^^^^^^^^^^^^^^^^
-exemptlist [channel]
-^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``channels``
- 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
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^
-invitelist [channel]
-^^^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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.
+ set deleted [delchanrec foobar "#lamest"]
- Module: channels
+----
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-newignore [lifetime]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-haschanrec:
- 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.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+haschanrec
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Returns: nothing
+ Description
+ Checks whether a user has a channel record for the specified channel.
- Module: core
-^^^^^^^^^^^^^^^^^^^^^
-killignore
-^^^^^^^^^^^^^^^^^^^^^
- Description: removes an entry from the ignore list
+ Returns
+ ``1`` if the given handle has a chanrec for the specified channel; ``0`` otherwise
- Returns: 1 if successful; 0 otherwise
- Module: core
+ Module
+ ``channels``
-^^^^^^^^^^
-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.
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: core
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^
-isignore
-^^^^^^^^^^^^^^^^^^^
+ set has_record [haschanrec foobar "#lamest"]
- Returns: 1 if the ignore is in the list; 0 otherwise
+----
- Module: core
+.. _tcl-getchaninfo:
-^^^^
-save
-^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+getchaninfo
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Description: writes the user and channel files to disk
+ Description
+ Returns a user's info line for the specified channel.
- Returns: nothing
- Module: core
+ Returns
+ info line for a specific channel (behaves just like 'getinfo')
-^^^^^^
-reload
-^^^^^^
- Description: loads the userfile from disk, replacing whatever is in memory
+ Module
+ ``channels``
- Returns: nothing
- Module: core
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^
-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.
+ .. code-block:: tcl
- Returns: nothing
+ set info [getchaninfo foobar "#lamest"]
- Module: core
+----
-^^^^^^^^^^^^^
-getting-users
-^^^^^^^^^^^^^
+.. _tcl-setchaninfo:
- 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
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+setchaninfo
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: core
+ Description
+ Sets the info line on a specific channel for a user. If info is ``none``, it will be removed.
-Channel Commands
-----------------
+ Returns
+ nothing
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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 {}).
+ Module
+ ``channels``
- Returns: nothing
- Module: channels
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-channel set
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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" }``
+ setchaninfo foobar "#lamest" "Example channel information"
- Returns: nothing
+----
- Module: channels
+.. _tcl-newchanban:
-^^^^^^^^^^^^^^^^^^^
-channel info
-^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newchanban [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Returns: a list of info about the specified channel's settings.
+ 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.
- Module: channels
+ Options
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-channel get [setting]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- 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.
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the ban to be always active on a channel, even with dynamicbans on
- Module: channels
-^^^^^^^^^^^^^^^^^^^^^
-channel remove
-^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ nothing
- Description: removes a channel record from the bot and makes the bot no longer monitor the channel
- Returns: nothing
+ Module
+ ``channels``
- Module: channels
-^^^^^^^^^^^^
-savechannels
-^^^^^^^^^^^^
+ .. admonition:: Example — Add a channel ban
+ :collapsible: closed
+ :class: tcl-example
- Description: saves the channel settings to the channel-file if one is defined.
+ .. code-block:: tcl
- Returns: nothing
+ newchanban "#lamest" "*!*@127.0.0.1" foobar "Example text"
- Module: channels
+----
-^^^^^^^^^^^^
-loadchannels
-^^^^^^^^^^^^
- Description: reloads the channel settings from the channel-file if one is defined.
+.. _tcl-newban:
- Returns: nothing
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newban [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: channels
+ 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.
-^^^^^^^^
-channels
-^^^^^^^^
+ Options
- Returns: a list of the channels the bot has a channel record for
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- Module: channels
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the ban to be always active on a channel, even with dynamicbans on
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-channame2dname
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-chandname2name
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ nothing
- 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".
- 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.
+ Module
+ ``channels``
- If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.
- NOTE: For non-!channels, chan dname and chan name are the same.
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: irc
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^
-isbotnick
-^^^^^^^^^^^^^^^^
+ newban "*!*@127.0.0.1" foobar "Example text"
- Returns: 1 if the nick matches the botnick; 0 otherwise
+----
- Module: server
+.. _tcl-newchanexempt:
-^^^^^^^^^^^^^^^^^
-botisop [channel]
-^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newchanexempt [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise
+ 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.
- Module: irc
+ Options
-^^^^^^^^^^^^^^^^^^^^^
-botishalfop [channel]
-^^^^^^^^^^^^^^^^^^^^^
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the exempt to be always active on a channel, even with dynamicexempts on
- Module: irc
+ Returns
+ nothing
-^^^^^^^^^^^^^^^^^^^^
-botisvoice [channel]
-^^^^^^^^^^^^^^^^^^^^
- Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise
+ Module
+ ``channels``
- Module: irc
-^^^^^^^^^^^^^^^^^^^
-botonchan [channel]
-^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise
+ .. code-block:: tcl
- Module: irc
+ newchanexempt "#lamest" "*!*@127.0.0.1" foobar "Example text"
-^^^^^^^^^^^^^^^^^^^^^^^^^
-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
+.. _tcl-newexempt:
- Module: irc
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newexempt [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-ishalfop [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 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.
- 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
+ Options
- Module: irc
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-wasop
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the exempt to be always active on a channel, even with dynamicexempts on
- Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise
+ Returns
+ nothing
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-washalfop
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``channels``
- Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise
- Module: irc
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isvoice [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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
+ newexempt "*!*@127.0.0.1" foobar "Example text"
- Module: irc
+----
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isidentified [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-newchaninvite:
- 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)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newchaninvite [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 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.
+ 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.
- Module: irc
+ Options
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isaway [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- 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.
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the invite to be always active on a channel, even with dynamicinvites on
- 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
+ nothing
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-isircbot [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``channels``
- 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
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-onchan [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise
+ .. code-block:: tcl
- Module: irc
+ newchaninvite "#lamest" "*!*@127.0.0.1" foobar "Example text"
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+.. _tcl-newinvite:
- Module: irc
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+newinvite [lifetime] [options]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^
-accounttracking
-^^^^^^^^^^^^^^^
+ 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: 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).
+ Options
- Returns: a '1' if all three functionalities are present, a '0' if one or more are missing.
+ .. list-table::
+ :widths: 11 89
+ :header-rows: 1
- Module: irc
+ * - ``options``
+ - Description
+ * - ``sticky``
+ - forces the invite to be always active on a channel, even with dynamicinvites on
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-getaccount [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ nothing
- 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.
+ Module
+ ``channels``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Module: irc
+ .. code-block:: tcl
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-account2nicks [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ newinvite "*!*@127.0.0.1" foobar "Example text"
- 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.
+----
- Module: irc
+.. _tcl-stickban:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-hand2nick [channel]
+stickban [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.
+ Description
+ Makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.
- Module: irc
+ Returns
+ ``1`` on success; ``0`` otherwise
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-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.
+ Module
+ ``channels``
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-handonchan [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- 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
+ .. code-block:: tcl
- Module: irc
+ set result [stickban "*!*@127.0.0.1"]
-^^^^^^^^^^^^^^^^^^^^^^^^^
-ischanban
-^^^^^^^^^^^^^^^^^^^^^^^^^
+----
- Returns: 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel)
+.. _tcl-unstickban:
- Module: irc
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+unstickban [channel]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-ischanexempt
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Description
+ Makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
- Returns: 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel)
+ Returns
+ ``1`` on success; ``0`` otherwise
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-ischaninvite
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Module
+ ``channels``
- Returns: 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel)
- Module: irc
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^
-chanbans
-^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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
+ set result [unstickban "*!*@127.0.0.1"]
- Module: irc
+----
-^^^^^^^^^^^^^^^^^^^^^
-chanexempts
-^^^^^^^^^^^^^^^^^^^^^
+.. _tcl-stickexempt:
- 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
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+stickexempt [channel]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: irc
+ Description
+ Makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.
-^^^^^^^^^^^^^^^^^^^^^
-chaninvites
-^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` on success; ``0`` otherwise
- 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
+ Module
+ ``channels``
-^^^^^^^^^^^^^^^^^^^
-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
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Returns: nothing
+ .. code-block:: tcl
- Module: irc
+ set result [stickexempt "*!*@127.0.0.1"]
-^^^^^^^^^^^^^^^^^^^^^^
-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
+.. _tcl-unstickexempt:
- Returns: nothing
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+unstickexempt [channel]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: irc
+ Description
+ Makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
-^^^^^^^^^^^^^^^^^^^^^^
-resetinvites
-^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` on success; ``0`` otherwise
- 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
+ Module
+ ``channels``
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-resetchanidle [nick]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
- Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified.
+ .. code-block:: tcl
- Returns: nothing
+ set result [unstickexempt "*!*@127.0.0.1"]
- 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.
+.. _tcl-stickinvite:
- Returns: nothing
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+stickinvite [channel]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Module: irc
+ Description
+ Makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-resetchan [flags]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Returns
+ ``1`` on success; ``0`` otherwise
- 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) |
- +-----+------------------------------+
+ Module
+ ``channels``
- Returns: nothing
- Module: irc
+ .. admonition:: Example
+ :collapsible: closed
+ :class: tcl-example
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-refreshchan [flags]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ .. code-block:: tcl
- 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:
+ set result [stickinvite "*!*@127.0.0.1"]
- +-----+------------------------------+
- | b | channel bans |
- +-----+------------------------------+
- | e | channel exempts |
- +-----+------------------------------+
- | I | channel invites |
- +-----+------------------------------+
- | m | channel modes |
- +-----+------------------------------+
- | t | channel topic |
- +-----+------------------------------+
- | w | memberlist (who & away info) |
- +-----+------------------------------+
+----
- Returns: nothing
+.. _tcl-unstickinvite:
- Module: irc
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+unstickinvite [channel]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-getchanhost [channel]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Description
+ Makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
- 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
+ ``1`` on success; ``0`` otherwise
- Module: irc
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-getchanjoin