Tcl commands

From Eggdrop Wiki

(Difference between revisions)
Jump to: navigation, search
(need to format this more)
m (DCC commands)
 
(23 intermediate revisions not shown)
Line 1: Line 1:
-
{{stub|it needs more formatting love}}
+
{{stub|missing sections needs to be filled}}
 +
<p>This is an exhaustive list of all the Tcl commands added to Eggdrop.
 +
All 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.</p>
-
    <div align="center">
+
<p>This list is accurate for Eggdrop v1.6.19. Scripts written for
-
      <p><strong>Eggdrop Tcl Commands</strong></p>
+
v1.3/v1.4 series of Eggdrop should probably work with a few minor
-
    </div>
+
modifications depending on the script. Scripts which were written for
-
    <hr>
+
v0.9, v1.0, v1.1 or v1.2 will probably not work without modification.
-
 
+
Commands which have been changed in this version of Eggdrop (or are
-
    <p>This is an exhaustive list of all the Tcl commands added to Eggdrop.
+
just new commands) are marked with an asterisk (*).</p>
-
    All 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.</p>
+
-
 
+
-
    <p>This list is accurate for Eggdrop v1.6.14. Scripts written for
+
-
    v1.3/v1.4 series of Eggdrop should probably work with a few minor
+
-
    modifications depending on the script. Scripts which were written for
+
-
    v0.9, v1.0, v1.1 or v1.2 will probably not work without modification.
+
-
    Commands which have been changed in this version of Eggdrop (or are
+
-
    just new commands) are marked with an asterisk (*).</p>
+
__TOC__
__TOC__
-
    <hr>
 
== Output commands ==
== Output commands ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = putserv <text> [options]
-
        <dt><strong>putserv &lt;text&gt; [options]</strong></dt>
+
| desc    = 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.
-
 
+
| opt1    = '''-next:''' push messages to the front of the queue
-
        <dd>
+
| opt2    = '''-normal:''' no effect
-
          <p><strong>Description:</strong> sends text to the server, like
+
| returns = nothing
-
          &#39;.dump&#39; (intended for direct server commands); output is
+
| mod    = server
-
          queued so that the bot won&#39;t flood itself off the server.</p>
+
}}
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>-next</strong>: push messages to the front of the
+
-
            queue<br>
+
-
            <strong>-normal</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> server</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>puthelp &lt;text&gt; [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the server, like
+
-
          &#39;putserv&#39;, but it uses a different queue intended for
+
-
          sending messages to channels or people.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>-next</strong>: push messages to the front of the
+
-
            queue<br>
+
-
            <strong>-normal</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> server</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putquick &lt;text&gt; [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the server, like
+
-
          &#39;putserv&#39;, but it uses a different (and faster) queue.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>-next</strong>: push messages to the front of the
+
-
            queue<br>
+
-
            <strong>-normal</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> server</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putkick &lt;channel&gt; &lt;nick,nick,...&gt;
+
-
        [reason]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends kicks to the server and
+
-
          tries to put as many nicks into one kick command as possible.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putlog &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the bot&#39;s
+
-
          logfile, marked as &#39;misc&#39; (o)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putcmdlog &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the bot&#39;s
+
-
          logfile, marked as &#39;command&#39; (c)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putxferlog &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the bot&#39;s
+
-
          logfile, marked as &#39;file-area&#39; (x)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putloglev &lt;level(s)&gt; &lt;channel&gt;
+
-
        &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the bot&#39;s
+
-
          logfile, tagged with all of the valid levels given. Use
+
-
          &quot;*&quot; to indicate all log levels.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dumpfile &lt;nick&gt; &lt;filename&gt;</strong></dt>
+
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> dumps file from the help/text
+
| command = puthelp <text> [options]
-
          directory to a user on IRC via msg (one line per msg). The user
+
| desc    = sends text to the server, like "putserv", but it uses a different queue intended for sending messages to channels or people.
-
          has no flags, so the flag bindings won&#39;t work within the
+
| opt1    = '''-next:''' push messages to the front of the queue
-
          file.</p>
+
| opt2    = '''-normal:''' no effect
 +
| returns = nothing
 +
| mod    = server
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = putquick <text> [options]
 +
| desc    = sends text to the server, like 'putserv', but it uses a different (and faster) queue.
 +
| opt1    = '''-next:''' push messages to the front of the queue
 +
| opt2    = '''-normal:''' no effect
 +
| returns = nothing
 +
| mod    = server
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = putkick <channel> <nick,nick,...> [reason]
 +
| desc    = sends kicks to the server and tries to put as many nicks into one kick command as possible.
 +
| returns = nothing
 +
| mod    = irc
 +
}}
-
        <dt><strong>queuesize [queue]</strong></dt>
+
{{Tcl_command
 +
| command = putlog <text>
 +
| desc    = sends text to the bot's logfile, marked as 'misc' (o)
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> the number of messages in all queues.
+
| command = putcmdlog <text>
-
          If a queue is specified, only the size of this queue is returned.
+
| desc    = sends text to the bot's logfile, marked as 'command' (c)
-
          Valid queues are: mode, server, help.</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> server</p>
+
{{Tcl_command
-
        </dd>
+
| command = putxferlog <text>
 +
| desc    = sends text to the bot's logfile, marked as 'file-area' (x)
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>clearqueue &lt;queue&gt;</strong></dt>
+
{{Tcl_command
 +
| command = putloglev <level(s)> <channel> <text>
 +
| desc    = sends text to the bot's logfile, tagged with all of the valid levels given. Use "*" to indicate all log levels.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> removes all messages from a
+
| command = dumpfile <nick> <filename>
-
          queue. Valid arguments are: mode, server, help, or all.</p>
+
| desc    = 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
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> the number of deleted lines from
+
{{Tcl_command
-
          the specified queue.</p>
+
| command = 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.
 +
| mod    = server
 +
}}
-
          <p><strong>Module:</strong> server</p>
+
{{Tcl_command
-
        </dd>
+
| command = clearqueue <queue>
-
      </dl>
+
| desc    = removes all messages from a queue. Valid arguments are: mode, server, help, or all.
-
    </blockquote>
+
| returns = the number of deleted lines from the specified queue.
 +
| mod    = server
 +
}}
== User record manipulation commands ==
== User record manipulation commands ==
 +
{{Tcl_command
 +
| command = countusers
 +
| returns = number of users in the bot's database
 +
| mod    = core
 +
}}
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = validuser <handle>
-
        <dt><strong>countusers</strong></dt>
+
| returns = 1 if a user by that name exists; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> number of users in the bot&#39;s
+
| command = finduser <nick!user@host>
-
          database</p>
+
| desc    = finds the user record which most closely matches the given nick!user@host
 +
| returns = the handle found, or "*" if none
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = 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".
 +
| mod    = core
 +
}}
-
        <dt><strong>validuser &lt;handle&gt;</strong></dt>
+
{{Tcl_command
 +
| command = passwdok <handle> <pass>
 +
| desc    = checks the password given against the user's password. Check against the password "" (a blank string) or "-" to find out if a user has no password set.
 +
| returns = 1 if the password matches for that user; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if a user by that name exists;
+
| command = getuser <handle> <entry-type> [extra info]
-
          0 otherwise</p>
+
| desc    = an interface to the new generic userfile support. Valid entry types are:
 +
| a1      = BOTFL
 +
| b1      = returns the current bot-specific flags for the user (bot-only)
 +
| a2      = BOTADDR
 +
| b2      = returns a list containing the bot's address, telnet port, and relay port (bot-only)
 +
| a3      = HOSTS
 +
| b3      = returns a list of hosts for the user
 +
| a4      = LASTON
 +
| b4      = 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.
 +
| a5      = INFO
 +
| b5      = returns the user's global info line
 +
| a6      = XTRA
 +
| b6      = returns the user's XTRA info
 +
| a7      = COMMENT
 +
| b7      = returns the master-visible only comment for the user
 +
| a8      = EMAIL
 +
| b8      = returns the user's e-mail address
 +
| a9      = URL
 +
| b9      = returns the user's url
 +
| a10    = HANDLE
 +
| b10    = returns the user's handle as it is saved in the userfile
 +
| a11    =  PASS
 +
| b11    = returns the user's encrypted password
 +
| returns = info specific to each entry-type
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = setuser <handle> <entry-type> [extra info]
 +
| desc    = 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.
 +
| a1      = HOSTS
 +
| b1      = if used with no third arg, all hosts for the user will be cleared. Otherwise, *1* hostmask is added :P
 +
| a2      = LASTON
 +
| b2      = This setting has 3 forms. "setuser <handle> LASTON <unixtime> <place>" sets global LASTON time, "setuser <handle> LASTON <unixtime>" sets global LASTON time (leaving the place field empty), and "setuser <handle> LASTON <unixtime> <channel>" sets a users LASTON time for a channel (if it is a valid channel).
 +
| a3      = PASS
 +
| b3      = sets a users password (no third arg will clear it)
 +
| returns = info specific to each entry-type
 +
| mod    = core
 +
}}
-
        <dt><strong>finduser &lt;nick!user@host&gt;</strong></dt>
+
{{Tcl_command
 +
| command = chhandle <old-handle> <new-handle>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> finds the user record which most
+
| command = chattr <handle> [changes [channel]]
-
          closely matches the given nick!user@host</p>
+
| desc    = 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 <changes> <channel<, 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.
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> the handle found, or &quot;*&quot;
+
{{Tcl_command
-
          if none</p>
+
| command = botattr <handle> [changes [channel]]
 +
| desc    = 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.
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = matchattr <handle> <flags> [channel]
 +
| returns = 1 if the specified user has the specified flags; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dt><strong>userlist [flags]</strong></dt>
+
{{Tcl_command
 +
| command = adduser <handle> [hostmask]
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of users on the bot. You
+
| command = addbot <handle> <address>
-
          can use the flag matching system here
+
| desc    = adds a new bot to the userlist with the handle and bot address given (with no password and no flags)
-
          ([global]{&/|}[chan]{&/|}[bot]). &#39;&&#39; specifies
+
| returns = 1 if successful; 0 if the bot already exists
-
          &quot;and&quot;; &#39;|&#39; specifies &quot;or&quot;.</p>
+
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = deluser <handle>
 +
| desc    = attempts to erase the user record for a handle
 +
| returns = 1 if successful, 0 if no such user exists
 +
| mod    = core
 +
}}
-
        <dt><strong>passwdok &lt;handle&gt; &lt;pass&gt;</strong></dt>
+
{{Tcl_command
 +
| command = delhost <handle> <hostmask>
 +
| desc    = deletes a hostmask from a user's host list
 +
| returns = 1 on success; 0 if the hostmask (or user) doesn't exist
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> checks the password given against
+
| command = addchanrec <handle> <channel>
-
          the user&#39;s password. Check against the password &quot;&quot;
+
| desc    = adds a channel record for a user
-
          (a blank string) or &quot;-&quot; to find out if a user has no
+
| returns = 1 on success; 0 if the user or channel does not exist
-
          password set.</p>
+
| mod    = channels
 +
}}
-
          <p><strong>Returns:</strong> 1 if the password matches for that
+
{{Tcl_command
-
          user; 0 otherwise</p>
+
| command = delchanrec <handle> <channel>
 +
| desc    = 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
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = haschanrec <handle> <channel>
 +
| returns = 1 if the given handle has a chanrec for the specified channel; 0 otherwise
 +
| mod    = channels
 +
}}
-
        <dt><strong>getuser &lt;handle&gt; &lt;entry-type&gt;
+
{{Tcl_command
-
        [extra info]</strong></dt>
+
| command = getchaninfo <handle> <channel>
 +
| returns = info line for a specific channel (behaves just like 'getinfo')
 +
| mod    = channels
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> an interface to the new generic
+
| command = setchaninfo <handle> <channel> <info>
-
          userfile support. Valid entry types are:</p>
+
| desc    = sets the info line on a specific channel for a user. If info is "none", it will be removed.
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
          <blockquote>
+
{{Tcl_command
-
            <table>
+
| command = newchanban <channel> <ban> <creator> <comment> [lifetime] [options]
-
              <tr valign="top">
+
| desc    = 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.
-
                <td>
+
| opt1    = '''sticky:''' forces the ban to be always active on a channel, even with dynamicbans on
-
                  <p><strong>BOTFL</strong></p>
+
| opt2    = '''none:''' no effect
-
                </td>
+
| returns = nothing
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the current bot-specific flags for the user
+
| command = newban <ban> <creator> <comment>  [lifetime] [options]
-
                  (bot-only)</p>
+
| desc    = 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, global-ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.
-
                </td>
+
| opt1    = '''sticky:''' forces the ban to be always active on a channel, even with dynamicbans on
-
              </tr>
+
| opt2    = '''none:''' no effect
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = newchanexempt <channel> <exempt> <creator> <comment> [lifetime] [options]
-
                  <p><strong>BOTADDR</strong></p>
+
| desc    = 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.
-
                </td>
+
| opt1    = '''sticky:''' forces the exempt to be always active on a channel, even with dynamicexempts on
 +
| opt2    = '''none:''' no effect
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns a list containing the bot&#39;s address, telnet
+
| command = newexempt <exempt> <creator> <comment>  [lifetime] [options]
-
                  port, and relay port (bot-only)</p>
+
| desc    = 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.
-
                </td>
+
| opt1    = '''sticky:''' forces the exempt to be always active on a channel, even with dynamicexempts on
-
              </tr>
+
| opt2    = '''none:''' no effect
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = newchaninvite <channel> <invite> <creator> <comment> [lifetime] [options]
-
                  <p><strong>HOSTS</strong></p>
+
| desc    = 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.
-
                </td>
+
| opt1    = '''sticky:''' forces the invite to be always active on a channel, even with dynamicinvites on
 +
| opt2    = '''none:''' no effect
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns a list of hosts for the user</p>
+
| command = newinvite <invite> <creator> <comment>  [lifetime] [options]
-
                </td>
+
| desc    = 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.
-
              </tr>
+
| opt1    = '''sticky:''' forces the invite to be always active on a channel, even with dynamicinvites on
 +
| opt2    = '''none:''' no effect
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = stick <banmask> [channel]
-
                  <p><strong>LASTON</strong></p>
+
| desc    = makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns a list containing the unixtime last seen and
+
| command = unstick <banmask> [channel]
-
                  the last seen place. LASTON #channel returns the time
+
| desc    = makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
-
                  last seen time for the channel or 0 if no info exists.</p>
+
| returns = 1 on success; 0 otherwise
-
                </td>
+
| mod    = channels
-
              </tr>
+
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = stickexempt <exemptmask> [channel]
-
                  <p><strong>INFO</strong></p>
+
| desc    = makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s global info line</p>
+
| command = unstickexempt <exemptmask> [channel]
-
                </td>
+
| desc    = makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
-
              </tr>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = stickinvite <invitemask> [channel]
-
                  <p><strong>XTRA</strong></p>
+
| desc    = makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s XTRA info</p>
+
| command = unstickinvite <invitemask> [channel]
-
                </td>
+
| desc    = makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.
-
              </tr>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = killchanban <channel> <ban>
-
                  <p><strong>COMMENT</strong></p>
+
| desc    = removes a ban from the ban list for a channel
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the master-visible only comment for the user</p>
+
| command = killban <ban>
-
                </td>
+
| desc    = removes a ban from the global ban list
-
              </tr>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = killchanexempt <channel> <exempt>
-
                  <p><strong>EMAIL</strong></p>
+
| desc    = removes an exempt from the exempt list for a channel
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s e-mail address</p>
+
| command = killexempt <exempt>
-
                </td>
+
| desc    = removes an exempt from the global exempt list
-
              </tr>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = killchaninvite <channel> <invite>
-
                  <p><strong>URL</strong></p>
+
| desc    = removes an invite from the invite list for a channel
-
                </td>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s url</p>
+
| command = killinvite <invite>
-
                </td>
+
| desc    = removes an invite from the global invite list
-
              </tr>
+
| returns = 1 on success; 0 otherwise
 +
| mod    = channels
 +
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = ischanjuped <channel>
-
                  <p><strong>HANDLE</strong></p>
+
| returns = 1 if the channel is juped, and the bot is unable to join; 0 otherwise
-
                </td>
+
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s handle as it is saved in the
+
| command = ispermban <ban> [channel]
-
                  userfile</p>
+
| 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.
-
                </td>
+
| mod    = channels
-
              </tr>
+
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = isexempt <exempt> [channel]
-
                  <p><strong>PASS</strong></p>
+
| 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.
-
                </td>
+
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>returns the user&#39;s encrypted password</p>
+
| command = ispermexempt <exempt> [channel]
-
                </td>
+
| 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.
-
              </tr>
+
| mod    = channels
-
            </table>
+
}}
-
          </blockquote>
+
-
          <p><strong>Returns:</strong> info specific to each entry-type</p>
+
{{Tcl_command
 +
| command = isinvite <invite> [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.
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = isperminvite <invite> [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.
 +
| mod    = channels
 +
}}
-
        <dt><strong>setuser &lt;handle&gt; &lt;entry-type&gt;
+
{{Tcl_command
-
        [extra info]</strong></dt>
+
| command = isbansticky <ban> [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.
 +
| mod    = channels
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> this is the counterpart of
+
| command = isexemptsticky <exempt> [channel]
-
          getuser. It lets you set the various values. Other then the ones
+
| 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.
-
          listed below, the entry-types are the same as getuser&#39;s.</p>
+
| mod    = channels
 +
}}
-
          <blockquote>
+
{{Tcl_command
-
            <table>
+
| command = isinvitesticky <invite> [channel]
-
              <tr valign="top">
+
| 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.
-
                <td>
+
| mod    = channels
-
                  <p><strong>HOSTS</strong></p>
+
}}
-
                </td>
+
-
                <td>
+
{{Tcl_command
-
                  <p>if used with no third arg, all hosts for the user will
+
| command = matchban <nick!user@host> [channel]
-
                  be cleared. Otherwise, *1* hostmask is added :P</p>
+
| 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.
-
                </td>
+
| mod    = channels
-
              </tr>
+
}}
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = matchexempt <nick!user@host> [channel]
-
                  <p><strong>LASTON</strong></p>
+
| 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.
-
                </td>
+
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>This setting has 3 forms. &quot;setuser &lt;handle&gt;
+
| command = matchinvite <nick!user@host> [channel]
-
                  LASTON &lt;unixtime&gt; &lt;place&gt;&quot; sets global
+
| 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.
-
                  LASTON time, &quot;setuser &lt;handle&gt; LASTON
+
| mod    = channels
-
                  &lt;unixtime&gt;&quot; sets global LASTON time (leaving the
+
}}
-
                  place field empty), and &quot;setuser &lt;handle&gt; LASTON
+
-
                  &lt;unixtime&gt; &lt;channel&gt;&quot; sets a users LASTON
+
-
                  time for a channel (if it is a  valid channel).</p>
+
-
                </td>
+
-
              </tr>
+
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = banlist [channel]
-
                  <p><strong>PASS</strong></p>
+
| 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.
-
                </td>
+
| mod    = channels
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>sets a users password (no third arg will clear it)</p>
+
| command = exemptlist [channel]
-
                </td>
+
| 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.
-
              </tr>
+
| mod    = channels
-
            </table>
+
}}
-
          </blockquote>
+
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = 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.
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = newignore <hostmask> <creator> <comment> [lifetime]
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>chhandle &lt;old-handle&gt;
+
{{Tcl_command
-
        &lt;new-handle&gt;</strong></dt>
+
| command = killignore <hostmask>
 +
| desc    = removes an entry from the ignore list
 +
| returns = 1 if successful; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> changes a user&#39;s handle</p>
+
| command = 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.
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> 1 on success; 0 if the new handle is
+
{{Tcl_command
-
          invalid or already used, or if the user can&#39;t be found</p>
+
| command = isignore <hostmask>
 +
| returns = 1 if the ignore is in the list; 0 otherwise
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = save
 +
| desc    = writes the user and channel files to disk
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>chattr &lt;handle&gt; [changes [channel]]</strong></dt>
+
{{Tcl_command
 +
| command = reload
 +
| desc    = loads the userfile from disk, replacing whatever is in memory
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> changes the attributes for a user
+
| command = backup
-
          record, if you include any. Changes are of the form &#39;+f&#39;,
+
| desc    = 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.
-
          &#39;-o&#39;, &#39;+dk&#39;, &#39;-o+d&#39;, etc. If changes are
+
| returns = nothing
-
          specified in the format of |<changes> <channel>, the channel-specific
+
| mod    = core
-
          flags for that channel are altered. You can now use the +o|-o
+
}}
-
          #channel format here too.</p>
+
-
          <p><strong>Returns:</strong>  new flags for the user (if you made
+
{{Tcl_command
-
          no changes, the current flags are returned). If a channel was
+
  | command = getting-users
-
          specified, the global AND the channel-specific flags for that
+
| 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
-
          channel are returned in the format of globalflags|channelflags.
+
| mod    = core
-
          &quot;*&quot; is returned if the specified user does not exist.</p>
+
}}
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>botattr &lt;handle&gt; [changes [channel]]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> similar to chattr except this
+
-
          modifies bot flags rather than normal user attributes.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 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.
+
-
          &quot;*&quot; is returned if the specified bot does not exist.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>matchattr &lt;handle&gt; &lt;flags&gt;
+
-
        [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified user has the
+
-
          specified flags; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>adduser &lt;handle&gt; [hostmask]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> creates a new user entry with the
+
-
          handle and hostmask given (with no password and the default
+
-
          flags)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 if successful; 0 if the handle
+
-
          already exists</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>addbot &lt;handle&gt; &lt;address&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> adds a new bot to the userlist
+
-
          with the handle and bot address given (with no password and no
+
-
          flags)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 if successful; 0 if the bot
+
-
          already exists</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>deluser &lt;handle&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> attempts to erase the user record
+
-
          for a handle</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 if successful, 0 if no such user
+
-
          exists</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>delhost &lt;handle&gt; &lt;hostmask&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> deletes a hostmask from a
+
-
          user&#39;s host list</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 if the hostmask (or
+
-
          user) doesn&#39;t exist</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>addchanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> adds a channel record for a
+
-
          user</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 if the user or channel
+
-
          does not exist</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>delchanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes a channel record for a
+
-
          user. This includes all associated channel flags.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 if the user or channel
+
-
          does not exist</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>haschanrec &lt;handle&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the given handle has a chanrec
+
-
          for the specified channel; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchaninfo &lt;handle&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> info line for a specific channel
+
-
          (behaves just like &#39;getinfo&#39;)</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setchaninfo &lt;handle&gt; &lt;channel&gt;
+
-
        &lt;info&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sets the info line on a specific
+
-
          channel for a user. If info is &quot;none&quot;, it will be
+
-
          removed.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newchanban &lt;channel&gt; &lt;ban&gt; &lt;creator&gt;
+
-
        &lt;comment&gt; [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the ban to be always active
+
-
            on a channel, even with dynamicbans on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newban &lt;ban&gt; &lt;creator&gt; &lt;comment&gt;
+
-
        [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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, global-ban-time (usually 60) is used.
+
-
          Setting the lifetime to 0 makes it a permanent ban.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the ban to be always active
+
-
            on a channel, even with dynamicbans on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newchanexempt &lt;channel&gt; &lt;exempt&gt;
+
-
        &lt;creator&gt; &lt;comment&gt; [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the exempt to be always active
+
-
            on a channel, even with dynamicexempts on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newexempt &lt;exempt&gt; &lt;creator&gt; &lt;comment&gt;
+
-
        [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the exempt to be always active
+
-
            on a channel, even with dynamicexempts on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newchaninvite &lt;channel&gt; &lt;invite&gt;
+
-
        &lt;creator&gt; &lt;comment&gt; [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the invite to be always active
+
-
            on a channel, even with dynamicinvites on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newinvite &lt;invite&gt; &lt;creator&gt; &lt;comment&gt;
+
-
        [lifetime] [options]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Options:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <p><strong>sticky</strong>: forces the invite to be always active
+
-
            on a channel, even with dynamicinvites on<br>
+
-
            <strong>none</strong>: no effect</p>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>stick &lt;banmask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes a ban sticky, or, if a
+
-
          channel is specified, then it is set sticky on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>unstick &lt;banmask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes a ban no longer sticky,
+
-
          or, if a channel is specified, then it is unstuck on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>stickexempt &lt;exemptmask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes an exempt sticky, or, if
+
-
          a channel is specified, then it is set sticky on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>unstickexempt &lt;exemptmask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes an exempt no longer sticky,
+
-
          or, if a channel is specified, then it is unstuck on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>stickinvite &lt;invitemask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes an invite sticky, or, if
+
-
          a channel is specified, then it is set sticky on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>unstickinvite &lt;invitemask&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes an invite no longer sticky,
+
-
          or, if a channel is specified, then it is unstuck on that channel
+
-
          only.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killchanban &lt;channel&gt; &lt;ban&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes a ban from the ban list
+
-
          for a channel</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killban &lt;ban&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes a ban from the global
+
-
          ban list</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killchanexempt &lt;channel&gt;
+
-
        &lt;exempt&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes an exempt from the exempt
+
-
          list for a channel</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killexempt &lt;exempt&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes an exempt from the global
+
-
          exempt list</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killchaninvite &lt;channel&gt; &lt;invite&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes an invite from the invite
+
-
          list for a channel</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killinvite &lt;invite&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes an invite from the global
+
-
          invite list</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 on success; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>ischanjuped &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the channel is juped, and the
+
-
          bot is unable to join; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isban &lt;ban&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified ban is in the
+
-
          global ban list; 0 otherwise. If a channel is specified, that
+
-
          channel&#39;s ban list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>ispermban &lt;ban&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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&#39;s ban list is checked as
+
-
          well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isexempt &lt;exempt&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified exempt is in the
+
-
          global exempt list; 0 otherwise. If a channel is specified, that
+
-
          channel&#39;s exempt list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>ispermexempt &lt;exempt&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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&#39;s exempt list is checked
+
-
          as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isinvite &lt;invite&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified invite is in
+
-
          the global invite list; 0 otherwise. If a channel is specified,
+
-
          that channel&#39;s invite list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isperminvite &lt;invite&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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&#39;s invite list is
+
-
          checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isbansticky &lt;ban&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified ban is marked as
+
-
          sticky in the global ban list; 0 otherwise. If a channel is
+
-
          specified, that channel&#39;s ban list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isexemptsticky &lt;exempt&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified exempt is marked
+
-
          as sticky in the global exempt list; 0 otherwise. If a channel is
+
-
          specified, that channel&#39;s exempt list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isinvitesticky &lt;invite&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified invite is marked
+
-
          as sticky in the global invite list; 0 otherwise. If a channel
+
-
          is specified, that channel&#39;s invite list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>matchban &lt;nick!user@host&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
+
-
          matches a ban in the global ban list; 0 otherwise. If a channel
+
-
          is specified, that channel&#39;s ban list is checked as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>matchexempt &lt;nick!user@host&gt;
+
-
        [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
+
-
          matches an exempt in the global exempt list; 0 otherwise. If a
+
-
          channel is specified, that channel&#39;s exempt list is checked
+
-
          as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>matchinvite &lt;nick!user@host&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the specified nick!user@host
+
-
          matches an invite in the global invite list; 0 otherwise. If a
+
-
          channel is specified, that channel&#39;s invite list is checked
+
-
          as well.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>banlist [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>exemptlist [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>invitelist [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>newignore &lt;hostmask&gt; &lt;creator&gt;
+
-
        &lt;comment&gt; [lifetime]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killignore &lt;hostmask&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes an entry from the ignore
+
-
          list</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 if successful; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>ignorelist</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of ignores. Each entry is a
+
-
          sublist containing: hostmask, comment, expiration timestamp, time
+
-
          added, and creator. The timestamps are in unixtime format.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isignore &lt;hostmask&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the ignore is in the list;
+
-
          0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>save</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> writes the user and channel files
+
-
          to disk</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>reload</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> loads the userfile from disk,
+
-
          replacing whatever is in memory</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>backup</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes a simple backup of the
+
-
          userfile that&#39;s on disk. If the channels module is loaded,
+
-
          this also makes a simple backup of the channel file.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getting-users</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the bot is currently downloading
+
-
          a userfile from a sharebot (and hence, user records are about to
+
-
          drastically change); 0 if not</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
== Channel commands ==
== Channel commands ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = channel add <name> [option-list]
-
        <dt><strong>channel add &lt;name&gt; &lt;option-list&gt;</strong></dt>
+
| desc    = 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
 +
| mod    = channels
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> adds a channel record for the
+
| command = channel set <name> <options...>
-
          bot to monitor. The full list of possible options are given in
+
| desc    = sets options for the channel specified. The full list of possible options are given in doc/settings/mod.channels.
-
          doc/settings.mod.channels. Note that the channel options must be
+
| returns = nothing
-
          in a list (enclosed in {}).</p>
+
| mod    = channels
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = channel info <name>
 +
| returns = a list of info about the specified channel's settings.
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = channel get <name> <setting>
 +
| returns = The value of the setting you specify. For flags, a value of 0 means it is disabled (-), and non-zero means enabled (+).
 +
| mod    = channels
 +
}}
-
        <dt><strong>channel set &lt;name&gt; &lt;options...&gt;</strong></dt>
+
{{Tcl_command
 +
| command = channel remove <name>
 +
| desc    = removes a channel record from the bot and makes the bot no longer monitor the channel
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> sets options for the channel
+
| command = savechannels
-
          specified. The full list of possible options are given in
+
| desc    = saves the channel settings to the channel-file if one is defined.
-
          doc/settings.mod.channels.</p>
+
| returns = nothing
 +
| mod     = channels
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = loadchannels
 +
| desc    = reloads the channel settings from the channel-file if one is defined.
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = channels
 +
| returns = a list of the channels the bot has a channel record for
 +
| mod    = channels
 +
}}
-
        <dt><strong>channel info &lt;name&gt;</strong></dt>
+
{{Tcl_command
 +
| command = channame2dname <channel-name><br \>chandname2name <channel-dname>
 +
| desc    = 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".<br \><br \>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.<br \><br \>If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.<br \><br \>For non-!channels, chan dname and chan name are the same.
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of info about the specified
+
| command = isbotnick <nick>
-
          channel&#39;s settings.</p>
+
| returns = 1 if the nick matches the botnick; 0 otherwise
 +
| mod    = server
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = botisop [channel]
 +
| returns = 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise
 +
| mod    = irc
 +
}}
-
        <dt><strong>channel get &lt;name&gt; &lt;setting&gt;</strong></dt>
+
{{Tcl_command
 +
| command = botishalfop [channel]
 +
| returns = 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> The value of the setting you specify.
+
| command = botisvoice [channel]
-
          For flags, a value of 0 means it is disabled (-), and non-zero means
+
| returns = 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise
-
          enabled (+).</p>
+
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = botonchan [channel]
 +
| returns = 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise
 +
| mod    = irc
 +
}}
-
        <dt><strong>channel remove &lt;name&gt;</strong></dt>
+
{{Tcl_command
 +
| command = isop <nickname> [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
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> removes a channel record from
+
| command = ishalfop <nickname> [channel]
-
          the bot and makes the bot no longer monitor the channel</p>
+
| 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
 +
| mod    = irc
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = wasop <nickname> <channel>
 +
| returns = 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = washalfop <nickname> <channel>
 +
| returns = 1 if someone that just got halfopped/dehalopped in the chan had halfop before the modechange; 0 otherwise
 +
| mod    = irc
 +
}}
-
        <dt><strong>savechannels</strong></dt>
+
{{Tcl_command
 +
| command = isvoice <nickname> [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
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> saves the channel settings to
+
| command = onchan <nickname> [channel]
-
          the channel-file if one is defined.</p>
+
| returns = 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise
 +
| mod    = irc
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = nick2hand <nickname> [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.
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = hand2nick <handle> [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.
 +
| mod    = irc
 +
}}
-
        <dt><strong>loadchannels</strong></dt>
+
{{Tcl_command
 +
| command = handonchan <handle> [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
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> reloads the channel settings from
+
| command = ischanban <ban> <channel>
-
          the channel-file if one is defined.</p>
+
| returns = 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel)
 +
| mod    = irc
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = ischanexempt <exempt> <channel>
 +
| returns = 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel)
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = ischaninvite <invite> <channel>
 +
| returns = 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel)
 +
| mod    = irc
 +
}}
-
        <dt><strong>channels</strong></dt>
+
{{Tcl_command
 +
| command = chanbans <channel>
 +
| returns = a list of the current bans on the channel. Each element is a sublist of the form {<ban> <bywho> <age>}. age is seconds from the bot's point of view
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of the channels the bot has
+
| command = chanexempts <channel>
-
          a channel record for</p>
+
| returns = a list of the current exempts on the channel. Each element is a sublist of the form {<exempts> <bywho> <age>}. age is seconds from the bot's point of view
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> channels</p>
+
{{Tcl_command
-
        </dd>
+
| command = chaninvites <channel>
 +
| returns = a list of the current invites on the channel. Each element is a sublist of the form {<invites> <bywho> <age>}. age is seconds from the bot's point of view
 +
| mod    = irc
 +
}}
-
        <dt><strong>channame2dname &lt;channel-name&gt;</strong></dt>
+
{{Tcl_command
-
        <dt><strong>chandname2name &lt;channel-dname&gt;</strong></dt>
+
| command = resetbans <channel>
 +
| desc    = 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
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> these two functions are important
+
| command = resetexempts [channel]
-
          to correctly support !channels. The bot differentiates between
+
| desc    = 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
-
          channel description names (chan dnames) and real channel names
+
| returns = nothing
-
          (chan names). The chan dnames are what you would normally call
+
| mod    = irc
-
          the channel, such as &quot;!channel&quot;. 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
+
-
          &quot;!ABCDEchannel&quot;.</p>
+
-
          <p>For bot functions like isop, isvoice, etc. you need to know
+
{{Tcl_command
-
          the chan dnames. If you communicate with the server, you usually
+
| command = resetinvites [channel]
-
          get the chan name, though. That&#39;s what you need the
+
| desc    = 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
-
          channame2dname function for.</p>
+
| returns = nothing
 +
| mod    = irc
 +
}}
-
          <p>If you only have the chan dname and want to directly send raw
+
{{Tcl_command
-
          server commands, use the chandname2name command.</p>
+
| command = resetchan <channel>
 +
| desc    = rereads the channel info from the server
 +
| returns = nothing
 +
| mod    = irc
 +
}}
-
          <p>For non-!channels, chan dname and chan name are the same.</p>
+
{{Tcl_command
 +
| command = getchanhost <nickname> [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.
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = getchanjoin <nickname> <channel>
 +
| returns = timestamp (unixtime format) of when the specified nickname joined the channel
 +
| mod    = irc
 +
}}
-
        <dt><strong>isbotnick &lt;nick&gt;</strong></dt>
+
{{Tcl_command
 +
| command = chanlist <channel> [flags[&chanflags]]
 +
| desc    = flags are any global flags; the '&' denotes to look for channel specific flags. Examples:
 +
| a1      = n
 +
| b1      = Global Owner
 +
| a2      = &n
 +
| b2      = Channel Owner
 +
| a3      = o&m
 +
| b3      = Global Op, Channel Master
 +
| returns = list of nicknames currently on the bot's channel that have all of the flags specified;. If no flags are given, all of the nicknames 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.
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if the nick matches the botnick;
+
| command = getchanidle <nickname> <channel>
-
          0 otherwise</p>
+
| returns = number of minutes that person has been idle; 0 if the specified user isn't on the channel
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> server</p>
+
{{Tcl_command
-
        </dd>
+
| command = getchanmode <channel>
 +
| returns = string of the type "+ntik key" for the channel specified
 +
| mod    = irc
 +
}}
-
        <dt><strong>botisop [channel]</strong></dt>
+
{{Tcl_command
 +
| command = jump [server [port [password]]]
 +
| desc    = jumps to the server specified, or (if none is specified) the next server in the bot's serverlist
 +
| returns = nothing
 +
| mod    = server
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if the bot has ops on the specified
+
| command = pushmode <channel> <mode> [arg]
-
          channel (or any channel if no channel is specified); 0
+
| desc    = 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.
-
          otherwise</p>
+
| returns = nothing
 +
| mod    = irc
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = flushmode <channel>
 +
| desc    = 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
 +
| mod    = irc
 +
}}
-
        <dt><strong>botishalfop [channel]</strong></dt>
+
{{Tcl_command
 +
| command = topic <channel>
 +
| returns = string containing the current topic of the specified channel
 +
| mod    = irc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if the bot has halfops on the
+
| command = validchan <channel>
-
          specified channel (or any channel if no channel is specified); 0
+
| desc    = 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.
-
          otherwise</p>
+
| returns = 1 if the channel exists, 0 if not
 +
| mod    = nothing
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = isdynamic <channel>
 +
| returns = 1 if the channel is a dynamic channel; 0 otherwise
 +
| mod    = channels
 +
}}
-
        <dt><strong>botisvoice [channel]</strong></dt>
+
{{Tcl_command
 +
| command = setudef <flag/int/str> <name>
 +
| desc    = 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
 +
| mod    = channels
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if the bot has a voice on the
+
| command = renudef <flag/int/str> <oldname> <newname>
-
          specified channel (or any channel if no channel is specified); 0
+
| desc    = renames a user defined channel flag, string, or integer setting.
-
          otherwise</p>
+
| returns = nothing
 +
| mod    = channels
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = deludef <flag/int/str> <name>
 +
| desc    = deletes a user defined channel flag, string, or integer setting.
 +
| returns = nothing
 +
| mod    = channels
 +
}}
-
        <dt><strong>botonchan [channel]</strong></dt>
+
== DCC commands ==
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if the bot is on the specified
+
| command = putdcc <idx> <text>
-
          channel (or any channel if no channel is specified); 0
+
| desc    = sends text to the idx specified
-
          otherwise</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = dccbroadcast <message>
 +
| desc    = sends a message to everyone on the party line across the botnet, in the form of "*** <message>" for local users and "*** (Bot) <message>" for users on other bots
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>isop &lt;nickname&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = dccputchan <channel> <message>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone by the specified
+
| command = boot <user@bot> [reason]
-
          nickname is on the channel (or any channel if no channel name is
+
| desc    = boots a user from the partyline
-
          specified) and has ops; 0 otherwise</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = dccsimul <idx> <text>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>ishalfop &lt;nickname&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = hand2idx <handle>
 +
| 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.
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone by the specified
+
| command = idx2hand <idx>
-
          nickname is on the channel (or any channel if no channel name is
+
| returns = handle of the user with the given idx
-
          specified) and has halfops; 0 otherwise</p>
+
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = valididx <idx>
 +
| returns = 1 if the idx currently exists; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dt><strong>wasop &lt;nickname&gt; &lt;channel&gt;</strong></dt>
+
{{Tcl_command
 +
| command = getchan <idx>
 +
| 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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone that just got
+
| command = setchan <idx> <channel>
-
          opped/deopped in the chan had op before the modechange; 0
+
| desc    = 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).
-
          otherwise</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = console <idx> [channel] [console-modes]
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>washalfop &lt;nickname&gt; &lt;channel&gt;</strong></dt>
+
{{Tcl_command
 +
| command = echo <idx> [status]
 +
| desc    = 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)
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone that just got
+
| command = strip <idx> [+/-strip-flags]
-
          halfopped/dehalopped in the chan had halfop before the modechange; 0
+
| desc    =  modifies the strip-flags for a user. The supported strip-flags are:
-
          otherwise</p>
+
| a1      = b
 +
| b1      = remove all boldface codes
 +
| a2      = c
 +
| b2      = remove all color codes
 +
| a3      = r
 +
| b3      = remove all reverse video codes
 +
| a4      = u
 +
| b4      = remove all underline codes
 +
| a5      = a
 +
| b5      = remove all ANSI codes
 +
| a6      = g
 +
| b6      = remove all ctrl-g (bell) codes
 +
| returns = new strip-flags for the specified user (or the current flags, if strip-flags was omitted)
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = putbot <bot-nick> <message>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>isvoice &lt;nickname&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = putallbots <message>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone by that nickname is on
+
| command = killdcc <idx>
-
          the channel (or any channel if no channel is specified) and has
+
| desc    = kills a partyline or file area connection
-
          voice (+v); 0 otherwise</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = bots
 +
| returns = list of the bots currently connected to the botnet
 +
| mod    = core
 +
}}
-
        <dt><strong>onchan &lt;nickname&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = botlist
 +
| returns = a list of bots currently on the botnet. Each item in the list is a sublist with four elements: bot, uplink, version, sharing status:
 +
| rettop  = True
 +
| a1      = bot
 +
| b1      = the bot's botnetnick
 +
| a2      = uplink
 +
| b2      = the bot the bot is connected to
 +
| a3      = version
 +
| b3      = its current numeric version
 +
| a4      = sharing
 +
| b4      = a "+" if the bot is a sharebot; "-" otherwise
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> 1 if someone by that nickname is on
+
| command = killdcc <idx>
-
          the specified channel (or any channel if none is specified); 0
+
| desc    = kills a partyline or file area connection
-
          otherwise</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = islinked <bot>
 +
| returns = 1 if the bot is currently linked; 0 otherwise
 +
| mod    = core
 +
}}
-
        <dt><strong>nick2hand &lt;nickname&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = dccused
 +
| returns = number of dcc connections currently in use
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> the handle of a nickname on a channel.
+
| command = dcclist [type]
-
          If a channel is not specified, the bot will check all of its
+
| returns = a list of active connections, each item in the list is a sublist containing six elements: {<idx> <handle> <hostname> <type> {<other>} <timestamp>}<br /><br />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.
-
          channels. If the nick is not found, &quot;&quot; is returned. If
+
| mod    = core
-
          the nick is found but does not have a handle, &quot;*&quot; is
+
}}
-
          returned.</p>
+
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = whom <chan>
 +
| 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.
 +
| mod    = core
 +
}}
-
        <dt><strong>hand2nick &lt;handle&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = getdccidle <idx>
 +
| returns = number of seconds the dcc chat/file system/script user has been idle
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> nickname of the first person on the
+
| command = getdccaway <idx>
-
          specified channel (if one is specified) whose nick!user@host
+
| returns = away message for a dcc chat user (or "" if the user is not set away)
-
          matches the given handle; &quot;&quot; is returned if no match
+
| mod    = core
-
          is found. If no channel is specified, all channels are checked.</p>
+
}}
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = setdccaway <idx> <message>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>handonchan &lt;handle&gt; [channel]</strong></dt>
+
{{Tcl_command
 +
| command = connect <host> <port>
 +
| desc    = 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.
 +
| returns = idx of the new connection
 +
| mod    = core
 +
}}
-
        <dd>
+
:'''listen <port> <type> [options] [flag]'''
-
          <p><strong>Returns:</strong> 1 if the the nick!user@host for
+
::'''Description:''' opens a listening port to accept incoming telnets; type must be one of "bots", "all", "users", "script", or "off":
-
          someone on the channel (or any channel if no channel name is
+
-
          specified) matches for the handle given; 0 otherwise</p>
+
-
          <p><strong>Module:</strong> irc</p>
+
:::'''listen <port> bots [mask]'''
-
        </dd>
+
::::'''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
-
        <dt><strong>ischanban &lt;ban&gt; &lt;channel&gt;</strong></dt>
+
:::'''listen <port> 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
-
        <dd>
+
:::'''listen <port> all [mask]'''
-
          <p><strong>Returns:</strong> 1 if the specified ban is on the
+
::::'''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.
-
          given channel&#39;s ban list (not the bot&#39;s banlist for the
+
::::'''Returns:''' port number
-
          channel)</p>
+
-
          <p><strong>Module:</strong> irc</p>
+
:::'''listen <port> script <proc> [flag]'''
-
        </dd>
+
::::'''Description:''' accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. Flag may currently only be 'pub', which makes the bot allow anyone to connect.
 +
::::'''Returns:''' port number
-
        <dt><strong>ischanexempt &lt;exempt&gt; &lt;channel&gt;</strong></dt>
+
:::'''listen <port> off'''
 +
::::'''Description:''' stop listening on a port
 +
::::'''Returns:''' nothing
-
        <dd>
+
::'''Module:''' core
-
          <p><strong>Returns:</strong> 1 if the specified exempt is on the
+
-
          given channel&#39;s exempt list (not the bot&#39;s exemptlist for
+
-
          the channel)</p>
+
-
          <p><strong>Module:</strong> irc</p>
+
{{Tcl_command
-
        </dd>
+
| command = dccdumpfile <idx> <filename>
-
 
+
| desc    = dumps out a file from the text directory to a dcc chat user. The flag matching that's used everywhere else works here, too.
-
        <dt><strong>ischaninvite &lt;invite&gt; &lt;channel&gt;</strong></dt>
+
| returns = nothing
-
 
+
| mod    = core
-
        <dd>
+
}}
-
          <p><strong>Returns:</strong> 1 if the specified invite is on the
+
-
          given channel&#39;s invite list (not the bot&#39;s invitelist for
+
-
          the channel)</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>chanbans &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of the current bans on the
+
-
          channel. Each element is a sublist of the form {&lt;ban&gt;
+
-
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
+
-
          POV.</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>chanexempts &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of the current exempts on the
+
-
          channel. Each element is a sublist of the form {&lt;exempts&gt;
+
-
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
+
-
          POV.</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>chaninvites &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of the current invites on the
+
-
          channel. Each element is a sublist of the form {&lt;invites&gt;
+
-
          &lt;bywho&gt; &lt;age&gt;}. age is seconds from the bot&#39;s
+
-
          POV.</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>resetbans &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes all bans on the channel
+
-
          that aren&#39;t in the bot&#39;s ban list and refreshes any bans
+
-
          that should be on the channel but aren&#39;t</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>resetexempts [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes all exempt on the channel
+
-
          that aren&#39;t in the bot&#39;s exempt list and refreshes any
+
-
          exempts that should be on the channel but aren&#39;t</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>resetinvites [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes all invites on the channel
+
-
          that aren&#39;t in the bot&#39;s invite list and refreshes any
+
-
          invites that should be on the channel but aren&#39;t</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>resetchan &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> </p>
+
-
 
+
-
          <p><strong>Returns:</strong> rereads in the channel info from the
+
-
          server</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchanhost &lt;nickname&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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), &quot;&quot; is returned.</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchanjoin &lt;nickname&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> timestamp (unixtime format) of when
+
-
          the specified nickname joined the channel</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>onchansplit &lt;nick&gt; [channel]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if that nick is split from the
+
-
          channel (or any channel if no channel is specified); 0
+
-
          otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>chanlist &lt;channel&gt; [flags[&chanflags]]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> flags are any global flags; the
+
-
          &#39;&&#39; denotes to look for channel specific flags.
+
-
          Examples:</p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>n</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>Global Owner</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>&n</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>Channel Owner</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>o&m</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>Global Op, Channel Master</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Returns:</strong> list of nicknames currently on the
+
-
          bot&#39;s channel that have all of the flags specified;. If no
+
-
          flags are given, all of the nicknames are returned. Please note
+
-
          that if you&#39;re executing chanlist after a part or sign bind,
+
-
          the gone user will still be listed, so you can check for wasop,
+
-
          isop, etc.</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchanidle &lt;nickname&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> number of minutes that person has
+
-
          been idle; 0 if the specified user isn&#39;t on the channel</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchanmode &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> string of the type &quot;+ntik
+
-
          key&quot; for the channel specified</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>jump [server [port [password]]]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> jumps to the server specified,
+
-
          or (if none is specified) the next server in the bot&#39;s
+
-
          serverlist</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> server</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>pushmode &lt;channel&gt; &lt;mode&gt; [arg]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends out a channel mode change
+
-
          (ex: pushmode #lame +o goober) through the bot&#39;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 &#39;flushmode&#39; is called.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>flushmode &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>topic &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> string containing the current topic
+
-
          of the specified channel</p>
+
-
 
+
-
          <p><strong>Module:</strong> irc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>validchan &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 1 if the channel exists, 0 if not</p>
+
-
 
+
-
          <p><strong>Module:</strong> nothing</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>isdynamic &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the channel is a dynamic
+
-
          channel; 0 otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>* setudef &lt;flag/int/str&gt; &lt;name&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> initializes a user defined channel
+
-
          flag, string, or integer setting. You can use it like any other
+
-
          flag/setting. IMPORTANT: Don&#39;t forget to reinitialize your
+
-
          flags/settings after a restart, or it&#39;ll be lost.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>* renudef &lt;flag/int/str&gt; &lt;oldname&gt;
+
-
        &lt;newname&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> renames a user defined channel
+
-
          flag, string, or integer setting.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>* deludef &lt;flag/int/str&gt; &lt;name&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> deletes a user defined channel
+
-
          flag, string, or integer setting.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> channels</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
-
 
+
-
== Dcc commands==
+
-
 
+
-
    <blockquote>
+
-
      <dl>
+
-
        <dt><strong>putdcc &lt;idx&gt; &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends text to the idx specified</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dccbroadcast &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends a message to everyone on
+
-
          the party line across the botnet, in the form of &quot;***
+
-
          &lt;message&gt;&quot; for local users and &quot;*** (Bot)
+
-
          &lt;message&gt;&quot; for users on other bots</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dccputchan &lt;channel&gt; &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>boot &lt;user@bot&gt; [reason]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> boots a user from the partyline</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dccsimul &lt;idx&gt; &lt;text&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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 &#39;.&#39; to be
+
-
          simulated.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>hand2idx &lt;handle&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>idx2hand &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> handle of the user with the given
+
-
          idx</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>valididx &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the idx currently exists; 0
+
-
          otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getchan &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the current party line channel
+
-
          for a user on the party line; &quot;0&quot; indicates he&#39;s
+
-
          on the group party line, &quot;-1&quot; means he has chat off,
+
-
          and a value from 1 to 99999 is a private channel</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setchan &lt;idx&gt; &lt;channel&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sets a party line user&#39;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).</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>console &lt;idx&gt; [channel]
+
-
        [console-modes]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> changes a dcc user&#39;s console
+
-
          mode, either to an absolute mode (like &quot;mpj&quot;) or just
+
-
          adding/removing flags (like &quot;+pj&quot; or &quot;-moc&quot;
+
-
          or &quot;+mp-c&quot;). The user&#39;s console channel view can be
+
-
          changed also (as long as the new channel is a valid channel).</p>
+
-
 
+
-
          <p><strong>Returns:</strong> a list containing the user&#39;s (new)
+
-
          channel view and (new) console modes, or nothing if that user
+
-
          isn&#39;t currently on the partyline</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>echo &lt;idx&gt; [status]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> turns a user&#39;s echo on or
+
-
          off; the status has to be a 1 or 0</p>
+
-
 
+
-
          <p><strong>Returns:</strong> new value of echo for that user (or
+
-
          the current value, if status was omitted)</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>strip &lt;idx&gt; [+/-strip-flags]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> modifies the strip-flags for a
+
-
          user</p>
+
-
 
+
-
          <p><strong>Returns:</strong> new strip-flags for the specified user
+
-
          (or the current flags, if strip-flags was omitted)</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putbot &lt;bot-nick&gt; &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends a message across the
+
-
          botnet to another bot. If no script intercepts the message on
+
-
          the other end, the message is ignored.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>putallbots &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sends a message across the botnet
+
-
          to all bots. If no script intercepts the message on the other end,
+
-
          the message is ignored.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killdcc &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> kills a partyline or file area
+
-
          connection</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>bots</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> list of the bots currently connected
+
-
          to the botnet</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>botlist</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of bots currently on the
+
-
          botnet. Each item in the list is a sublist with four elements:
+
-
          bot, uplink, version, sharing status:</p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>bot</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the bot&#39;s botnetnick</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>uplink</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the bot the bot is connected to</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>version</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>its current numeric version</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>sharing</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>a &quot;+&quot; if the bot is a sharebot; &quot;-&quot;
+
-
                  otherwise</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killdcc &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> kills a partyline or file area
+
-
          connection</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>islinked &lt;bot&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 1 if the bot is currently linked; 0
+
-
          otherwise</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dccused</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> number of dcc connections currently
+
-
          in use</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dcclist ?type?</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a list of active connections, each
+
-
          item in the list is a sublist containing six elements: {&lt;idx&gt;
+
-
          &lt;handle&gt; &lt;hostname&gt; &lt;type&gt; {&lt;other&gt;}
+
-
          &lt;timestamp&gt;}</p>
+
-
 
+
-
          <p>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 &#39;control&#39;), telnet, and server.
+
-
          The timestamp is in unixtime format.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>whom &lt;chan&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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 (&#39;-&#39;, &#39;@&#39;, &#39;+&#39;, or
+
-
          &#39;*&#39;), 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getdccidle &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> number of seconds the dcc chat/file
+
-
          system/script user has been idle</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getdccaway &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> away message for a dcc chat user
+
-
          (or &quot;&quot; if the user is not set away)</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setdccaway &lt;idx&gt; &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sets a party line user&#39;s away
+
-
          message and marks them away. If set to &quot;&quot;, the user is
+
-
          marked as no longer away.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>connect &lt;host&gt; &lt;port&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> makes an outgoing connection
+
-
          attempt and creates a dcc entry for it. A &#39;control&#39;
+
-
          command should be used immediately after a successful
+
-
          &#39;connect&#39; so no input is lost.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> idx of the new connection</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>listen &lt;port&gt; &lt;type&gt; [options]
+
-
        [flag]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> opens a listening port to accept
+
-
          incoming telnets; type must be one of &quot;bots&quot;,
+
-
          &quot;all&quot;, &quot;users&quot;, &quot;script&quot;, or
+
-
          &quot;off&quot;:</p>
+
-
 
+
-
          <blockquote>
+
-
            <dl>
+
-
              <dt><strong>listen &lt;port&gt; bots [mask]</strong></dt>
+
-
 
+
-
              <dd>
+
-
                <p><strong>Description:</strong> accepts connections from
+
-
                bots only; the optional mask is used to identify permitted
+
-
                bot names. If the mask begins with &#39;@&#39;, it is
+
-
                interpreted to be a mask of permitted hosts to accept
+
-
                connections from.</p>
+
-
 
+
-
                <p><strong>Returns:</strong> port number</p>
+
-
              </dd>
+
-
 
+
-
              <dt><strong>listen &lt;port&gt; users [mask]</strong></dt>
+
-
 
+
-
              <dd>
+
-
                <p><strong>Description:</strong> accepts connections from
+
-
                users only (no bots); the optional mask is used to identify
+
-
                permitted nicknames. If the mask begins with &#39;@&#39;, it
+
-
                is interpreted to be a mask of permitted hosts to accept
+
-
                connections from.</p>
+
-
 
+
-
                <p><strong>Returns:</strong> port number</p>
+
-
              </dd>
+
-
 
+
-
              <dt><strong>listen &lt;port&gt; all [mask]</strong></dt>
+
-
 
+
-
              <dd>
+
-
                <p><strong>Description:</strong> accepts connections from
+
-
                anyone; the optional mask is used to identify permitted
+
-
                nicknames/botnames. If the mask begins with &#39;@&#39;,
+
-
                it is interpreted to be a mask of permitted hosts to accept
+
-
                connections from.</p>
+
-
 
+
-
                <p><strong>Returns:</strong> port number</p>
+
-
              </dd>
+
-
 
+
-
              <dt><strong>listen &lt;port&gt; script &lt;proc&gt;
+
-
              [flag]</strong></dt>
+
-
 
+
-
              <dd>
+
-
                <p><strong>Description:</strong> accepts connections which
+
-
                are immediately routed to a proc. The proc is called with
+
-
                one parameter: the idx of the new connection. Flag may
+
-
                currently only be &#39;pub&#39;, which makes the bot allow
+
-
                anyone to connect.</p>
+
-
 
+
-
                <p><strong>Returns:</strong> port number</p>
+
-
              </dd>
+
-
 
+
-
              <dt><strong>listen &lt;port&gt; off</strong></dt>
+
-
 
+
-
              <dd>
+
-
                <p><strong>Description:</strong> stop listening on a port</p>
+
-
 
+
-
                <p><strong>Returns:</strong> nothing</p>
+
-
              </dd>
+
-
            </dl>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>dccdumpfile &lt;idx&gt; &lt;filename&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> dumps out a file from the text
+
-
          directory to a dcc chat user. The flag matching that&#39;s used
+
-
          everywhere else works here, too.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
== Notes module ==
== Notes module ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = notes <user> [numberlist]
-
        <dt><strong>notes &lt;user&gt; [numberlist]</strong></dt>
+
| 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: {<from> <timestamp> <note text>}.
 +
| mod    = notes
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
+
| command = erasenotes <user> <numberlist>
-
          failure. If a numberlist is not specified, the number of notes
+
| desc    = erases some or all stored notes for a user. Use '-' to erase all notes.
-
          stored for the user is returned. Otherwise, a list of sublists
+
| returns = -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes.
-
          containing information about notes stored for the user is
+
| mod    = notes
-
          returned. Each sublist is in the format of: {&lt;from&gt;
+
}}
-
          &lt;timestamp&gt; &lt;note text&gt;}.</p>
+
-
          <p><strong>Module:</strong> notes</p>
+
{{Tcl_command
-
        </dd>
+
| command = listnotes <user> <numberlist>
 +
| desc    = 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.
 +
| mod    = notes
 +
}}
-
        <dt><strong>erasenotes &lt;user&gt; &lt;numberlist&gt;</strong></dt>
+
{{Tcl_command
-
 
+
| command = storenote <from> <to> <msg> <idx>
-
        <dd>
+
| desc    = stores a note for later reading, notifies idx of any results (use idx -1 for no notify).
-
          <p><strong>Description:</strong> erases some or all stored notes
+
| returns = 0 on success; non-0 on failure
-
          for a user. Use &#39;-&#39; to erase all notes.</p>
+
| mod    = notes
-
 
+
}}
-
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
+
-
          failure, 0 if no such note, or number of erased notes.</p>
+
-
 
+
-
          <p><strong>Module:</strong> notes</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>listnotes &lt;user&gt; &lt;numberlist&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> lists existing notes according
+
-
          to the numberlist (ex: &quot;2-4;8;16-&quot;)</p>
+
-
 
+
-
          <p><strong>Returns:</strong> -1 if no such user, -2 if notefile
+
-
          failure, 0 if no such note, list of existing notes.</p>
+
-
 
+
-
          <p><strong>Module:</strong> notes</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>storenote &lt;from&gt; &lt;to&gt; &lt;msg&gt;
+
-
        &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> stores a note for later reading,
+
-
          notifies idx of any results (use idx -1 for no notify).</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 0 on success; non-0 on failure</p>
+
-
 
+
-
          <p><strong>Module:</strong> notes</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
== Assoc module ==
== Assoc module ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = assoc <chan> [name]
-
        <dt><strong>assoc &lt;chan&gt; [name]</strong></dt>
+
| desc    = sets the name associated with a botnet channel, if you specify one
 +
| returns = current name for that channel, if any
 +
| mod    = assoc
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> sets the name associated with a
+
| command = killassoc <chan>
-
          botnet channel, if you specify one</p>
+
| desc    = removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs.
-
 
+
| returns = nothing
-
          <p><strong>Returns:</strong> current name for that channel, if
+
| mod    = assoc
-
          any</p>
+
}}
-
 
+
-
          <p><strong>Module:</strong> assoc</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>killassoc &lt;chan&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes the name associated
+
-
          with a botnet channel, if any exists. Use &#39;killassoc &&#39;
+
-
          to kill all assocs.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> assoc</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
== Compress module ==
== Compress module ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = compressfile [-level <level>] <src-file[target-file]<br />uncompressfile <src-file> [target-file]
-
        <dt><strong>compressfile [-level &lt;level&gt;] &lt;src-file&gt;
+
| desc    = 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.
-
        [target-file]<br>
+
| returns = nothing
-
        uncompressfile &lt;src-file&gt; [target-file]</strong></dt>
+
| mod    = compress
-
 
+
}}
-
        <dd>
+
-
          <p><strong>Description:</strong> 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&#39;t specify the target-file,
+
-
          the src-file will be overwritten.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> compress</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>iscompressed &lt;filename&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> determines whether
+
-
          &lt;filename&gt; is gzip compressed. Returns 1 if it is, 0 if it
+
-
          isn&#39;t, and 2 if some kind of error prevented the checks from
+
-
          succeeding.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
          <p><strong>Module:</strong> compress</p>
+
{{Tcl_command
-
        </dd>
+
| command = iscompressed <filename>
-
      </dl>
+
| desc    = determines whether <filename> 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.
-
     </blockquote>
+
| returns = nothing
 +
| mod     = compress
 +
}}
== Filesys module ==
== Filesys module ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = setpwd <idx> <dir>
-
        <dt><strong>setpwd &lt;idx&gt; &lt;dir&gt;</strong></dt>
+
| desc    = 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
 +
| mod    = filesys
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> changes the directory of a file
+
| command = getpwd <idx>
-
          system user, in exactly the same way as a &#39;cd&#39; command
+
| returns = the current directory of a file system user
-
          would. The directory can be specified relative or absolute.</p>
+
| mod    = filesys
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = getfiles <dir>
 +
| returns = a list of files in the directory given; the directory is relative to dcc-path
 +
| mod    = filesys
 +
}}
-
          <p><strong>Module:</strong> filesys</p>
+
{{Tcl_command
-
        </dd>
+
| command = getdirs <dir>
 +
| returns = a list of subdirectories in the directory given; the directory is relative to dcc-path
 +
| mod    = filesys
 +
}}
-
        <dt><strong>getpwd &lt;idx&gt;</strong></dt>
+
:'''dccsend <filename> <ircnick>'''
 +
::'''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:'''
 +
:::{|
 +
|-
 +
  |'''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'''
 +
  |copy-to-tmp is enabled and the file already exists in the temp directory
 +
|}
 +
::'''Module:''' transfer
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> the current directory of a file
+
| command = filesend <idx> <filename> [ircnick]
-
          system user</p>
+
| desc    = 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)
 +
| mod    = filesys
 +
}}
-
          <p><strong>Module:</strong> filesys</p>
+
{{Tcl_command
-
        </dd>
+
| command = fileresend <idx> <filename> [ircnick]
 +
| desc    = 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)
 +
| mod    = filesys
 +
}}
-
        <dt><strong>getfiles &lt;dir&gt;</strong></dt>
+
{{Tcl_command
 +
| command = setdesc <dir> <file> <desc>
 +
| desc    = sets the description for a file in a file system directory; the directory is relative to dcc-path
 +
| returns = nothing
 +
| mod    = filesys
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of files in the directory
+
| command = getdesc <dir> <file>
-
          given; the directory is relative to dcc-path</p>
+
| returns = the description for a file in the file system, if one exists
 +
| mod    = filesys
 +
}}
-
          <p><strong>Module:</strong> filesys</p>
+
{{Tcl_command
-
        </dd>
+
| command = setowner <dir> <file> <handle>
 +
| desc    = changes the owner for a file in the file system; the directory is relative to dcc-path
 +
| returns = nothing
 +
| mod    = filesys
 +
}}
-
        <dt><strong>getdirs &lt;dir&gt;</strong></dt>
+
{{Tcl_command
 +
| command = getowner <dir> <file>
 +
| returns = the owner of a file in the file system
 +
| mod    = filesys
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of subdirectories in the
+
| command = setlink <dir> <file> <link>
-
          directory given; the directory is relative to dcc-path</p>
+
| desc    = creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path
 +
| returns = nothing
 +
| mod    = filesys
 +
}}
-
          <p><strong>Module:</strong> filesys</p>
+
{{Tcl_command
-
        </dd>
+
| command = getlink <dir> <file>
 +
| returns = the link for a linked file, if it exists
 +
| mod    = filesys
 +
}}
-
        <dt><strong>dccsend &lt;filename&gt; &lt;ircnick&gt;</strong></dt>
+
{{Tcl_command
 +
| command = getfileq <handle>
 +
| 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
 +
| mod    = transfer
 +
}}
-
        <dd>
+
:'''getfilesendtime <idx>'''
-
          <p><strong>Description:</strong> attempts to start a dcc file
+
::'''Returns:''' the unixtime value for when a file transfer started, or a negative number:
-
          transfer to the given nick; the filename must be specified either
+
:::{|
-
          by full pathname or in relation to the bot&#39;s startup
+
|-
-
          directory</p>
+
  |'''-1'''
 +
  |no matching transfer with the specified idx was found
 +
|-
 +
  |'''-2'''
 +
  |the idx matches an entry which is not a file transfer
 +
|}
 +
::'''Module:''' transfer
-
          <p><strong>Returns:</strong></p>
+
:'''mkdir <directory> [<required-flags> [channel]]'''
 +
::'''Description:''' creates a directory in the file system. Only users with the required flags may access it.
 +
::'''Returns:'''
 +
:::{|
 +
|-
 +
  |'''0'''
 +
  |success
 +
|-
 +
  |'''1'''
 +
  |can't create directory
 +
|-
 +
  |'''2'''
 +
  |directory exists but is not a directory
 +
|-
 +
  |'''-3'''
 +
  |could not open filedb
 +
|}
 +
::'''Module:''' filesys
-
          <blockquote>
+
{{Tcl_command
-
            <table>
+
| command = rmdir <directory>
-
              <tr valign="top">
+
| desc    = removes a directory from the file system.
-
                <td>
+
| returns = 0 on success; 1 on failure
-
                  <p><strong>0</strong></p>
+
| mod    = filesys
-
                </td>
+
}}
-
                <td>
+
:'''mv <file> <destination>'''
-
                  <p>success</p>
+
::'''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.
-
                </td>
+
::'''Returns:''' If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned:
-
              </tr>
+
:::{|
 +
|-
 +
  |'''-1'''
 +
  |invalid source file
 +
|-
 +
  |'''-2'''
 +
  |invalid destination
 +
|-
 +
  |'''-3'''
 +
  |destination file exists
 +
|-
 +
  |'''-4'''
 +
  |no matches found
 +
|}
 +
::'''Module:''' filesys
-
              <tr valign="top">
 
-
                <td>
 
-
                  <p><strong>1</strong></p>
 
-
                </td>
 
-
                <td>
+
:'''cp <file> <destination>'''
-
                  <p>the dcc table is full (too many connections)</p>
+
::'''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.
-
                </td>
+
::'''Returns:''' If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned:
-
              </tr>
+
:::{|
 +
|-
 +
  |'''-1'''
 +
  |invalid source file
 +
|-
 +
  |'''-2'''
 +
  |invalid destination
 +
|-
 +
  |'''-3'''
 +
  |destination file exists
 +
|-
 +
  |'''-4'''
 +
  |no matches found
 +
|}
 +
::'''Module:''' filesys
-
              <tr valign="top">
+
{{Tcl_command
-
                <td>
+
| command = getflags <dir>
-
                  <p><strong>2</strong></p>
+
| returns = the flags required to access a directory
-
                </td>
+
| mod    = filesys
 +
}}
-
                <td>
+
{{Tcl_command
-
                  <p>can&#39;t open a socket for the transfer</p>
+
| command = setflags <dir> [<flags> [channel]]
-
                </td>
+
| desc    = sets the flags required to access a directory
-
              </tr>
+
| returns = 0 on success; -1 or -3 on failure
-
 
+
| mod    = filesys
-
              <tr valign="top">
+
}}
-
                <td>
+
-
                  <p><strong>3</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the file doesn&#39;t exist</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>4</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the file was queued for later transfer, which means that
+
-
                  person has too many file transfers going right now</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>5</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>copy-to-tmp is enabled and the file already exists in the
+
-
                  temp directory</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> transfer</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>filesend &lt;idx&gt; &lt;filename&gt;
+
-
        [ircnick]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> like dccsend, except it operates
+
-
          for a current filesystem user, and the filename is assumed to be
+
-
          a relative path from that user&#39;s current directory</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 0 on failure; 1 on success (either an
+
-
          immediate send or a queued send)</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>fileresend &lt;idx&gt; &lt;filename&gt;
+
-
        [ircnick]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 0 on failure; 1 on success (either
+
-
          an immediate send or a queued send)</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setdesc &lt;dir&gt; &lt;file&gt; &lt;desc&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sets the description for a file
+
-
          in a file system directory; the directory is relative to
+
-
          dcc-path</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getdesc &lt;dir&gt; &lt;file&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the description for a file in the
+
-
          file system, if one exists</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setowner &lt;dir&gt; &lt;file&gt;
+
-
        &lt;handle&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> changes the owner for a file in
+
-
          the file system; the directory is relative to dcc-path</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getowner &lt;dir&gt; &lt;file&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the owner of a file in the file
+
-
          system</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setlink &lt;dir&gt; &lt;file&gt; &lt;link&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> creates or changes a linked file
+
-
          (a file that actually exists on another bot); the directory is
+
-
          relative to dcc-path</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getlink &lt;dir&gt; &lt;file&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the link for a linked file, if it
+
-
          exists</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getfileq &lt;handle&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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</p>
+
-
 
+
-
          <p><strong>Module:</strong> transfer</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getfilesendtime &lt;idx&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the unixtime value for when a file
+
-
          transfer started, or a negative number:</p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-1</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>no matching transfer with the specified idx was found</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-2</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the idx matches an entry which is not a file transfer</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> transfer</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>mkdir &lt;directory&gt; [&lt;required-flags&gt;
+
-
        [channel]]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> creates a directory in the file
+
-
          system. Only users with the required flags may access it.</p>
+
-
 
+
-
          <p><strong>Returns:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>0</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>success</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>1</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>can&#39;t create directory</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>2</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>directory exists but is not a directory</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>rmdir &lt;directory&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> removes a directory from the
+
-
          file system.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 0 on success; 1 on failure</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>mv &lt;file&gt; &lt;destination&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> If the command was successful, the
+
-
          number of files moved will be returned. Otherwise, a negative
+
-
          number will be returned:</p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-1</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>invalid source file</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-2</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>invalid destination</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-3</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>destination file exists</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-4</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>no matches found</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>cp &lt;file&gt; &lt;destination&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> If the command was successful, the
+
-
          number of files copied will be returned. Otherwise, a negative
+
-
          number will be returned:</p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-1</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>invalid source file</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-2</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>invalid destination</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-3</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>destination file exists</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>-4</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>no matches found</p>
+
-
                </td>
+
-
              </tr>
+
-
            </table>
+
-
          </blockquote>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>getflags &lt;dir&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> the flags required to access a
+
-
          directory</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>setflags &lt;dir&gt; [&lt;flags&gt;
+
-
        [channel]]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> sets the flags required to
+
-
          access a directory</p>
+
-
 
+
-
          <p><strong>Returns:</strong> 0 on success; -1 on failure</p>
+
-
 
+
-
          <p><strong>Module:</strong> filesys</p>
+
-
        </dd>
+
-
      </dl>
+
-
    </blockquote>
+
== Miscellaneous commands ==
== Miscellaneous commands ==
-
    <blockquote>
+
{{Tcl_command
-
      <dl>
+
| command = bind <type> <flags> <keyword/mask[proc-name]
-
        <dt><strong>bind &lt;type&gt; &lt;flags&gt; &lt;keyword/mask&gt;
+
| desc    = 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).
-
        [proc-name]</strong></dt>
+
| returns = name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> You can use the &#39;bind&#39;
+
| command = unbind <type> <flags> <keyword/mask> <proc-name>
-
          command to attach Tcl procedures to certain events. flags are the
+
| desc    = removes a previously created bind
-
          flags the user must have to trigger the event (if applicable).
+
| returns = name of the command that was removed
-
          proc-name is the name of the Tcl procedure to call for this
+
| mod    = core
-
          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&#39;s stackable, a list of the current
+
-
          bindings is returned).</p>
+
-
          <p><strong>Returns:</strong> name of the command that was added,
+
{{Tcl_command
-
          or (if proc-name was omitted), a list of the current bindings for
+
| command = binds [type/mask]
-
          this command</p>
+
| returns = a list of Tcl binds, each item in the list is a sublist of five elements: {<type> <flags>  <name> <hits> <proc>}
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = logfile [<modes> <channel> <filename>]
 +
| desc    = 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.
 +
| returns = filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}
 +
| mod    = core
 +
}}
-
        <dt><strong>unbind &lt;type&gt; &lt;flags&gt; &lt;keyword/mask&gt;
+
{{Tcl_command
-
        &lt;proc-name&gt;</strong></dt>
+
| command = maskhost <nick!user@host>
 +
| returns = masked hostmask for the string given ("n!u@1.2.3.4" -> "*!u@1.2.3.*", "n!u@lame.com" -> "*!u@lame.com", "n!u@a.b.edu" -> "*!u@*.b.edu")
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> removes a previously created
+
| command = timer <minutes> <tcl-command>
-
          bind</p>
+
| desc    = executes the given Tcl command after a certain number of minutes have passed
 +
| returns = a timerID
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> name of the command that was
+
{{Tcl_command
-
          removed</p>
+
| command = utimer <seconds> <tcl-command>
 +
| desc    = executes the given Tcl command after a certain number of seconds have passed
 +
| returns = a timerID
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = timers
 +
| returns = a list of active minutely timers. Each entry in the list contains the number of minutes left till activation, the command that will be executed, and the timerID.
 +
| mod    = core
 +
}}
-
        <dt><strong>binds ?type/mask?</strong></dt>
+
{{Tcl_command
 +
| command = utimers
 +
| returns = a list of active secondly timers. Each entry in the list contains the number of minutes left till activation, the command that will be executed, and the timerID.
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of Tcl binds, each item in the
+
| command = killtimer <timerID>
-
          list is a sublist of five elements: {&lt;type&gt; &lt;flags&gt;
+
| desc    = removes a minutely timer from the list
-
          &lt;name&gt; &lt;hits&gt; &lt;proc&gt;}</p>
+
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = killutimer <timerID>
 +
| desc    = removes a secondly timer from the list
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>logfile [&lt;modes&gt; &lt;channel&gt;
+
{{Tcl_command
-
        &lt;filename&gt;]</strong></dt>
+
| command = unixtime
 +
| returns = a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT).
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> creates a new logfile, which will
+
| command = duration <seconds>
-
          log the modes given for the channel listed. If no logfile is
+
| 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.
-
          specified, a list of existing logfiles will be returned.
+
| mod    = core
-
          &quot;*&quot; indicates all channels. You can also change the
+
}}
-
          modes and channel of an existing logfile with this command.
+
-
          Entering a blank mode and channel (&quot;&quot;) makes the bot
+
-
          stop logging there.</p>
+
-
          <p><strong>Returns:</strong> filename of logfile created, or, if
+
{{Tcl_command
-
          no logfile is specified, a list of logfiles such as: {mco *
+
| command = strftime <formatstring> [time]
-
          eggdrop.log} {jp #lame lame.log}</p>
+
| 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.
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = ctime <unixtime>
 +
| 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"
 +
| mod    = core
 +
}}
-
        <dt><strong>maskhost &lt;nick!user@host&gt;</strong></dt>
+
{{Tcl_command
 +
| command = myip
 +
| returns = a long number representing the bot's IP address, as it might appear in (for example) a DCC request
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> masked hostmask for the string
+
| command = rand <limit>
-
          given (&quot;n!u@1.2.3.4&quot; -&gt; &quot;*!u@1.2.3.*&quot;,
+
| returns = a random integer between 0 and limit-1
-
          &quot;n!u@lame.com&quot; -&gt; &quot;*!u@lame.com&quot;,
+
| mod    = core
-
          &quot;n!u@a.b.edu&quot; -&gt; &quot;*!u@*.b.edu&quot;)</p>
+
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = control <idx> <command>
 +
| desc    = 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
 +
| mod    = core
 +
}}
-
        <dt><strong>timer &lt;minutes&gt; &lt;tcl-command&gt;</strong></dt>
+
:'''sendnote <from> <to[@bot]> <message>'''
 +
::'''Description:''' simulates what happens when one user sends a note to another
 +
::'''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
 +
|}
 +
::'''Module:''' core
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> executes the given Tcl command
+
| command = link [via-bot] <bot>
-
          after a certain number of minutes have passed</p>
+
| desc    = 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
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> a timerID</p>
+
{{Tcl_command
 +
| command = unlink <bot>
 +
| desc    = attempts to unlink a bot from the botnet
 +
| returns = 1 on success; 0 otherwise
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = encrypt <key> <string>
 +
| returns = encrypted string (using the currently loaded encryption module), encoded into ASCII using base-64
 +
| mod    = encryption
 +
}}
-
        <dt><strong>utimer &lt;seconds&gt; &lt;tcl-command&gt;</strong></dt>
+
{{Tcl_command
 +
| command = decrypt <key> <encrypted-base64-string>
 +
| returns = decrypted string (using the currently loaded encryption module)
 +
| mod    = encryption
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> executes the given Tcl command
+
| command = encpass <password>
-
          after a certain number of seconds have passed</p>
+
| returns = encrypted string (using the currently loaded encryption module)
 +
| mod    = encryption
 +
}}
-
          <p><strong>Returns:</strong> a timerID</p>
+
{{Tcl_command
 +
| command = die [reason]
 +
| desc    = causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = unames
 +
| returns = the current operating system the bot is using
 +
| mod    = core
 +
}}
-
        <dt><strong>timers</strong></dt>
+
{{Tcl_command
 +
| command = dnslookup <ip-address/hostname> <proc> [[arg1] [arg2] ... [argN]]
 +
| desc    = 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).<br />As soon as the request completes, the specified proc will be called as follows: <proc> <ipaddress> <hostname>  <status> [[arg1] [arg2] ... [argN]]<br />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
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of active minutely timers.
+
| command = md5 <string>
-
          Each entry in the list contains the number of minutes left till
+
| returns = the 128 bit MD5 message-digest of the specified string
-
          activation, the command that will be executed, and the timerID.</p>
+
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = callevent <event>
 +
| desc    = triggers the evnt bind manually for a certain event. For example: callevent rehash.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>utimers</strong></dt>
+
{{Tcl_command
 +
| command = 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).
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Returns:</strong> a list of active secondly timers.
+
| command = modules
-
          Each entry in the list contains the number of minutes left till
+
| 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.
-
          activation, the command that will be executed, and the timerID.</p>
+
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = loadmodule <module>
 +
| desc    = 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.
 +
| mod    = core
 +
}}
-
        <dt><strong>killtimer &lt;timerID&gt;</strong></dt>
+
{{Tcl_command
 +
| command = unloadmodule <module>
 +
| desc    = attempts to unload the specified module.
 +
| returns = "No such module" if the module is not loaded, "" otherwise.
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> removes a minutely timer from
+
| command = loadhelp <helpfile-name>
-
          the list</p>
+
| desc    = attempts to load the specified help file from the help/ directory.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
{{Tcl_command
 +
| command = unloadhelp <helpfile-name>
 +
| desc    = attempts to unload the specified help file.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Module:</strong> core</p>
+
{{Tcl_command
-
        </dd>
+
| command = reloadhelp
 +
| desc    = reloads the bot's help files.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dt><strong>killutimer &lt;timerID&gt;</strong></dt>
+
{{Tcl_command
 +
| command = restart
 +
| desc    = rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list.
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
        <dd>
+
{{Tcl_command
-
          <p><strong>Description:</strong> removes a secondly timer from
+
| command = rehash
-
          the list</p>
+
| desc    = rehashes the bot
 +
| returns = nothing
 +
| mod    = core
 +
}}
-
          <p><strong>Returns:</strong> nothing</p>
+
:'''stripcodes <strip-flags> <string>'''
-
 
+
::'''Description:''' strips specified control characters from the string given. strip-flags can be any combination of the following:
-
          <p><strong>Module:</strong> core</p>
+
:::{|
-
        </dd>
+
|-
-
 
+
  |'''b'''
-
        <dt><strong>unixtime</strong></dt>
+
  |remove all boldface codes
-
 
+
|-
-
        <dd>
+
  |'''c'''
-
          <p><strong>Returns:</strong> a long integer which represents the
+
  |remove all color codes
-
          number of seconds that have passed since 00:00 Jan 1, 1970 (GMT).</p>
+
|-
-
 
+
  |'''r'''
-
          <p><strong>Module:</strong> core</p>
+
  |remove all reverse video codes
-
        </dd>
+
|-
-
 
+
  |'''u'''
-
        <dt><strong>duration &lt;seconds&gt;</strong></dt>
+
  |remove all underline codes
-
 
+
|-
-
        <dd>
+
  |'''a'''
-
          <p><strong>Returns:</strong> the number of seconds converted
+
  |remove all ANSI codes
-
          into years, weeks, days, hours, minutes, and seconds. 804600
+
|-
-
          seconds is turned into 1 week 2 days 7 hours 30 minutes.</p>
+
  |'''g'''
-
 
+
  |remove all ctrl-g (bell) codes
-
          <p><strong>Module:</strong> core</p>
+
|}
-
        </dd>
+
::'''Returns:''' the stripped string
-
 
+
::'''Module:''' core
-
        <dt><strong>strftime &lt;formatstring&gt; [time]</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> 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.</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>ctime &lt;unixtime&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a formatted date/time string based
+
-
          on the current locale settings from the unixtime string given; for
+
-
          example &quot;Fri Aug 3 11:34:55 1973&quot;</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>myip</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a long number representing the
+
-
          bot&#39;s IP address, as it might appear in (for example) a DCC
+
-
          request</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>rand &lt;limit&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Returns:</strong> a random integer between 0 and
+
-
          limit-1</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>control &lt;idx&gt; &lt;command&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> 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 (&quot;&quot;), 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 &quot;invalid
+
-
          idx&quot;.</p>
+
-
 
+
-
          <p><strong>Returns:</strong> nothing</p>
+
-
 
+
-
          <p><strong>Module:</strong> core</p>
+
-
        </dd>
+
-
 
+
-
        <dt><strong>sendnote &lt;from&gt; &lt;to[@bot]&gt;
+
-
        &lt;message&gt;</strong></dt>
+
-
 
+
-
        <dd>
+
-
          <p><strong>Description:</strong> simulates what happens when one
+
-
          user sends a note to another</p>
+
-
 
+
-
          <p><strong>Returns:</strong></p>
+
-
 
+
-
          <blockquote>
+
-
            <table>
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>0</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the send failed</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>1</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the note was delivered locally or sent to another
+
-
                  bot</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>2</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the note was stored locally</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>3</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>the user&#39;s notebox is too full to store a note</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>4</strong></p>
+
-
                </td>
+
-
 
+
-
                <td>
+
-
                  <p>a Tcl binding caught the note</p>
+
-
                </td>
+
-
              </tr>
+
-
 
+
-
              <tr valign="top">
+
-
                <td>
+
-
                  <p><strong>5</strong></p>
+
-
                </td>
+