Eggdrop Tcl Commands

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.

This list is accurate for Eggdrop v1.9.4. Scripts written for v1.3, v1.4, 1.6 and 1.8 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 vertical bars (|) on the left.

Output Commands

putserv <text> [options]

Description: sends text to the server, like ‘.dump’ (intended for direct server commands); output is queued so that the bot won’t flood itself off the server.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

puthelp <text> [options]

Description: sends text to the server, like ‘putserv’, but it uses a different queue intended for sending messages to channels or people.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

putquick <text> [options]

Description: sends text to the server, like ‘putserv’, but it uses a different (and faster) queue.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

putnow <text> [-oneline]

Description: sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server.

Options: -oneline send text up to the first r or n, discarding the rest

Returns: nothing

Module: server

putkick <channel> <nick,nick,…> [reason]

Description: sends kicks to the server and tries to put as many nicks into one kick command as possible.

Returns: nothing

Module: irc

putlog <text>

Description: logs <text> to the logfile and partyline if the ‘misc’ flag (o) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putcmdlog <text>

Description: logs <text> to the logfile and partyline if the ‘cmds’ flag (c) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putxferlog <text>

Description: logs <text> to the logfile and partyline if the ‘files’ flag (x) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putloglev <flag(s)> <channel> <text>

Description: logs <text> to the logfile and partyline at the log level of the specified flag. Use “*” in lieu of a flag to indicate all log levels.

Returns: nothing

Module: core

dumpfile <nick> <filename>

Description: dumps file from the help/text directory to a user on IRC via msg (one line per msg). The user has no flags, so the flag bindings won’t work within the file.

Returns: nothing

Module: core

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.

Module: server

clearqueue <queue>

Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all.

Returns: the number of deleted lines from the specified queue.

Module: server

cap <ls/values/req/enabled/raw> [arg]

Description: displays CAP status or sends a raw CAP command to the server. “ls” will list the capabilities Eggdrop is internally tracking as supported by the server. “values” will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and “values” with a capability name as arg will list the values associated for the capability. “enabled” will list the capabilities Eggdrop is internally tracking as negotiated with the server. “req” will request the capabilities listed in “arg” from the server. “raw” will send a raw CAP command to the server. The arg field is a single argument, and should be submitted as a single string. For example, to request capabilities foo and bar, you would use [cap req “foo bar”], and for example purposes, sending the same request as a raw command would be [cap raw “REQ :foo bar”].

Returns: a list of CAP capabilities for the “enabled” and “ls” sub-commands; a dict of capability/value pairs for the “values” command or a list if “values” if followed by an argument; otherwise nothing.

Module: server

tagmsg <tags> <target>

Description: sends an IRCv3 TAGMSG command to the target. Only works if message-tags has been negotiated with the server via the cap command. tags is a Tcl dict (or space-separated string) of the tags you wish to send separated by commas (do not include the @prefix), and target is the nickname or channel you wish to send the tags to. To send a tag only (not a key/value pair), use a “” as the value for a key in a dict, or a “{}” if you are sending as a space-separated string.

Examples:
set mytags [dict create +foo bar moo baa +last “”]; tagmsg $mytags #channel tagmsg “+foo bar moo baa +last {}” #channel

Returns: nothing

Module: server

server add <ip/host> [[+]port [password]]

Description: adds a server to the list of servers Eggdrop will connect to. Prefix the port with ‘+’ to indicate an SSL-protected port. A port value is required if password is to be specified. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).

Returns: nothing

Module: server

server remove <ip/host> [[+]port]

Description: removes a server from the list of servers Eggdrop will connect to. If no port is provided, all servers matching the ip or hostname provided will be removed, otherwise only the ip/host with the corresponding port will be removed. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).

Returns: nothing

Module: server

server list

Description: lists all servers currently added to the bots internal server list

Returns: A list of lists in the format {{hostname} {port} {password}}

Module: server

User Record Manipulation Commands

countusers

Returns: number of users in the bot’s database

Module: core

validuser <handle>

Returns: 1 if a user by that name exists; 0 otherwise

Module: core

finduser [-account] <value>

Description: finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user@host.

Returns: the handle found, or “*” if none

Module: core

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”.

Module: core

passwdok <handle> <pass>

Description: checks the password given against the user’s password. Check against the password “-” to find out if a user has no password set.

Returns: 1 if the password matches for that user; 0 otherwise. Or if we are checking against the password “-“: 1 if the user has no password set; 0 otherwise.

Module: core

getuser <handle> [entry-type] [extra info]

Description: an interface to the new generic userfile support. Without an entry-type, it returns a flat key/value list (dict) of all set entries. Valid entry types are:

ACCOUNT returns thee a list of servivce accounts associated with the user
BOTFL returns the current bot-specific flags for the user (bot-only)
BOTADDR returns a list containing the bot’s address, bot listen port, and user listen port
HOSTS returns a list of hosts for the user
LASTON returns a list containing the unixtime last seen and the last seen place. LASTON #channel returns the time last seen time for the channel or 0 if no info exists.
INFO returns the user’s global info line
XTRA returns the user’s XTRA info
COMMENT returns the master-visible only comment for the user
HANDLE returns the user’s handle as it is saved in the userfile
PASS returns the user’s encrypted password

For additional custom user fields, to include the deprecated “EMAIL” and “URL” fields, reference scripts/userinfo.tcl.

Returns: info specific to each entry-type

Module: core

setuser <handle> <entry-type> [extra info]

Description: this is the counterpart of getuser. It lets you set the various values. Other then the ones listed below, the entry-types are the same as getuser’s.

Type Extra Info
ACCOUNT [account] If no value is specified, all accounts for the user will be cleared. Otherwise, only a single account will be added to the account list
PASS
<password>
Password string (Empty value will clear the password)
BOTADDR
<address> [bot listen port] [user listen port]
Sets address, bot listen port and user listen port. If no listen ports are specified, only the bot address is updated. If only the bot listen port is specified, both the bot and user listen ports are set to the bot listen port.
HOSTS
[hostmask]
If no value is specified, all hosts for the user will be cleared. Otherwise, only 1 hostmask is added :P
LASTON

This setting has 3 forms.

<unixtime> <place>
sets global LASTON time. Standard values used by Eggdrop for <place> are partyline, linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to anything.
<unixtime>
sets global LASTON time (leaving the place field empty)
<unixtime> <channel>
sets a user’s LASTON time for a channel (if it is a valid channel)

Returns: nothing

Module: core

chhandle <old-handle> <new-handle>

Description: changes a user’s handle

Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can’t be found

Module: core

chattr <handle> [changes [channel]]

Description: changes the attributes for a user record, if you include any. Changes are of the form ‘+f’, ‘-o’, ‘+dk’, ‘-o+d’, etc. If changes are specified in the format of |<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.

Module: core

botattr <handle> [changes [channel]]

Description: similar to chattr except this modifies bot flags rather than normal user attributes.

Returns: new flags for the bot (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. “*” is returned if the specified bot does not exist.

Module: core

matchattr <handle> <flags> [channel]

Description: checks if the flags of the specified user match the flags provided. “flags” is of the form:

[+/-]<global flags>[&/|<channel flags>[&/|<bot flags>]]

Either | or & can be used as a separator between global, channel, and bot flags, but only one separator can be used per flag section. A ‘+’ is used to check if a user has the subsequent flags, and a ‘-‘ is used to check if a user does NOT have the subsequent flags. Please see Flag Masks for additional information on flag usage.

Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise

Module: core

adduser <handle> [hostmask]

Description: creates a new user entry with the handle and hostmask given (with no password and the default flags)

Returns: 1 if successful; 0 if the handle already exists

Module: core

addbot <handle> <address> [botport [userport]]

Description: adds a new bot to the userlist with the handle and botaddress given (with no password and no flags). <address> format is one of:

  • ipaddress
  • ipv4address:botport/userport [DEPRECATED]
  • [ipv6address]:botport/userport [DEPRECATED]

NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments. NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored.

Returns: 1 if successful; 0 if the bot already exists or a port is invalid

Module: core

deluser <handle>

Description: attempts to erase the user record for a handle

Returns: 1 if successful, 0 if no such user exists

Module: core

delhost <handle> <hostmask>

Description: deletes a hostmask from a user’s host list

Returns: 1 on success; 0 if the hostmask (or user) doesn’t exist

Module: core

addchanrec <handle> <channel>

Description: adds a channel record for a user

Returns: 1 on success; 0 if the user or channel does not exist

Module: channels

delchanrec <handle> <channel>

Description: removes a channel record for a user. This includes all associated channel flags.

Returns: 1 on success; 0 if the user or channel does not exist

Module: channels

haschanrec <handle> <channel>

Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise

Module: channels

getchaninfo <handle> <channel>

Returns: info line for a specific channel (behaves just like ‘getinfo’)

Module: channels

setchaninfo <handle> <channel> <info>

Description: sets the info line on a specific channel for a user. If info is “none”, it will be removed.

Returns: nothing

Module: channels

newchanban <channel> <ban> <creator> <comment> [lifetime] [options]

Description: adds a ban to the ban list of a channel; creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.

Options:

sticky forces the ban to be always active on a channel, even with dynamicbans on

Returns: nothing

Module: channels

newban <ban> <creator> <comment> [lifetime] [options]

Description: adds a ban to the global ban list (which takes effect on all channels); creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, default-ban-time (usually 120) is used. Setting the lifetime to 0 makes it a permanent ban.

Options:

sticky forces the ban to be always active on a channel, even with dynamicbans on

Returns: nothing

Module: channels

newchanexempt <channel> <exempt> <creator> <comment> [lifetime] [options]

Description: adds a exempt to the exempt list of a channel; creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed. For timed bans, once the time period has expired, the exempt will not be removed until the corresponding ban has either expired or been removed.

Options:

sticky forces the exempt to be always active on a channel, even with dynamicexempts on

Returns: nothing

Module: channels

newexempt <exempt> <creator> <comment> [lifetime] [options]

Description: adds a exempt to the global exempt list (which takes effect on all channels); creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed.

Options:

sticky forces the exempt to be always active on a channel, even with dynamicexempts on

Returns: nothing

Module: channels

newchaninvite <channel> <invite> <creator> <comment> [lifetime] [options]

Description: adds a invite to the invite list of a channel; creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.

Options:

sticky forces the invite to be always active on a channel, even with dynamicinvites on

Returns: nothing

Module: channels

newinvite <invite> <creator> <comment> [lifetime] [options]

Description: adds a invite to the global invite list (which takes effect on all channels); creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.

Options:

sticky forces the invite to be always active on a channel, even with dynamicinvites on

Returns: nothing

Module: channels

stickban <banmask> [channel]

Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickban <banmask> [channel]

Description: makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

stickexempt <exemptmask> [channel]

Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickexempt <exemptmask> [channel]

Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

stickinvite <invitemask> [channel]

Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickinvite <invitemask> [channel]

Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

killchanban <channel> <ban>

Description: removes a ban from the ban list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killban <ban>

Description: removes a ban from the global ban list

Returns: 1 on success; 0 otherwise

Module: channels

killchanexempt <channel> <exempt>

Description: removes an exempt from the exempt list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killexempt <exempt>

Description: removes an exempt from the global exempt list

Returns: 1 on success; 0 otherwise

Module: channels

killchaninvite <channel> <invite>

Description: removes an invite from the invite list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killinvite <invite>

Description: removes an invite from the global invite list

Returns: 1 on success; 0 otherwise

Module: channels

ischanjuped <channel>

Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise

Module: channels

isban <ban> [channel [-channel]]

Returns: 1 if the specified ban is in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

ispermban <ban> [channel [-channel]]

Returns: 1 if the specified ban is in the global ban list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

isexempt <exempt> [channel [-channel]]

Returns: 1 if the specified exempt is in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

ispermexempt <exempt> [channel [-channel]]

Returns: 1 if the specified exempt is in the global exempt list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

isinvite <invite> [channel [-channel]]

Returns: 1 if the specified invite is in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

isperminvite <invite> [channel [-channel]]

Returns: 1 if the specified invite is in the global invite list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

isbansticky <ban> [channel [-channel]]

Returns: 1 if the specified ban is marked as sticky in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

isexemptsticky <exempt> [channel [-channel]]

Returns: 1 if the specified exempt is marked as sticky in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

isinvitesticky <invite> [channel [-channel]]

Returns: 1 if the specified invite is marked as sticky in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

matchban <nick!user@host> [channel]

Returns: 1 if the specified nick!user@host matches a ban in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well.

Module: channels

matchexempt <nick!user@host> [channel]

Returns: 1 if the specified nick!user@host matches an exempt in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well.

Module: channels

matchinvite <nick!user@host> [channel]

Returns: 1 if the specified nick!user@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well.

Module: channels

banlist [channel]

Returns: a list of global bans, or, if a channel is specified, a list of channel-specific bans. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.

Module: channels

exemptlist [channel]

Returns: a list of global exempts, or, if a channel is specified, a list of channel-specific exempts. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.

Module: channels

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.

Module: channels

newignore <hostmask> <creator> <comment> [lifetime]

Description: adds an entry to the ignore list; creator is given credit for the ignore. lifetime is how many minutes until the ignore expires and is removed. If lifetime is not specified, ignore-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ignore.

Returns: nothing

Module: core

killignore <hostmask>

Description: removes an entry from the ignore list

Returns: 1 if successful; 0 otherwise

Module: core

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.

Module: core

isignore <hostmask>

Returns: 1 if the ignore is in the list; 0 otherwise

Module: core

save

Description: writes the user and channel files to disk

Returns: nothing

Module: core

reload

Description: loads the userfile from disk, replacing whatever is in memory

Returns: nothing

Module: core

backup

Description: makes a simple backup of the userfile that’s on disk. If the channels module is loaded, this also makes a simple backup of the channel file.

Returns: nothing

Module: core

getting-users

Returns: 1 if the bot is currently downloading a userfile from a sharebot (and hence, user records are about to drastically change); 0 if not

Module: core

Channel Commands

channel add <name> [option-list]

Description: adds a channel record for the bot to monitor. The full list of possible options are given in doc/settings/mod.channels. Note that the channel options must be in a list (enclosed in {}).

Returns: nothing

Module: channels

channel set <name> <options…>

Description: sets options for the channel specified. The full list of possible options are given in doc/settings/mod.channels.

Returns: nothing

Module: channels

channel info <name>

Returns: a list of info about the specified channel’s settings.

Module: channels

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 (+). If no setting is specified, a flat list of all available settings and their values will be returned.

Module: channels

channel remove <name>

Description: removes a channel record from the bot and makes the bot no longer monitor the channel

Returns: nothing

Module: channels

savechannels

Description: saves the channel settings to the channel-file if one is defined.

Returns: nothing

Module: channels

loadchannels

Description: reloads the channel settings from the channel-file if one is defined.

Returns: nothing

Module: channels

channels

Returns: a list of the channels the bot has a channel record for

Module: channels

channame2dname <channel-name>

chandname2name <channel-dname>

Description: these two functions are important to correctly support !channels. The bot differentiates between channel description names (chan dnames) and real channel names (chan names). The chan dnames are what you would normally call the channel, such as “!channel”. The chan names are what the IRC server uses to identify the channel. They consist of the chan dname prefixed with an ID; such as “!ABCDEchannel”.

For bot functions like isop, isvoice, etc. you need to know the chan dnames. If you communicate with the server, you usually get the chan name, though. That’s what you need the channame2dname function for.

If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.

NOTE: For non-!channels, chan dname and chan name are the same.

Module: irc

isbotnick <nick>

Returns: 1 if the nick matches the botnick; 0 otherwise

Module: server

botisop [channel]

Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botishalfop [channel]

Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botisvoice [channel]

Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botonchan [channel]

Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

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

Module: irc

ishalfop <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 halfops; 0 otherwise

Module: irc

wasop <nickname> <channel>

Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise

Module: irc

washalfop <nickname> <channel>

Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise

Module: irc

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

Module: irc

isidentified <nickname> [channel]

Description: determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses)

Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); 0 otherwise.

Module: irc

isaway <nickname> [channel]

Description: determine if a user is marked as ‘away’ on a server. IMPORTANT: this command is only “mostly” reliable on its own when the IRCv3 away-notify capability is available and negotiated with the IRC server (if you didn’t add this to your config file, it likely isn’t enabled- you can confirm using the cap Tcl command). Additionally, there is no way for Eggdrop (or any client) to capture a user’s away status when the user first joins a channel (they are assumed present by Eggdrop on join). To use this command without the away-notify capability negotiated, or to get a user’s away status on join (via a JOIN bind), use refreshchan <channel> w on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel.

Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as ‘away’ (again, see disclaimer above) by an IRC server; 0 otherwise.

Module: irc

isircbot <nickname> [channel]

Description: determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server’s 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use refreshchan <channel> w on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding “BOT=B” (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file.

Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; 0 otherwise.

onchan <nickname> [channel]

Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise

Module: irc

monitor <command> [nickname]

Description: interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid commands are add, delete, list, online, offline, status, and clear. The ‘add’ command sends ‘nickname’ to the server to track. The ‘delete’ command removes ‘nickname’ from being tracked by the server (or returns an error if the nickname is not present). The ‘list’ command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The ‘online’ command returns a string of tracked nicknames that are currently online. The ‘offline’ command returns a list of tracked nicknames that are currently offline.

Returns: The ‘status’ command returns a ‘1’ if ‘nickname’ is online or a 0 if ‘nickname’ is offline. The ‘clear’ command removes all nicknames from the list the server is monitoring.

Module: irc

accounttracking

Description: checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when seleceting an “Other” server).

Returns: a ‘1’ if all three functionalities are present, a ‘0’ if one or more are missing.

Module: irc

getaccount <nickname> [channel]

Returns: the services account name associated with nickname, “*” if the user is not logged into services, or “” if eggdrop does not know the account status of the user.

NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information.

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. If no channel is specified, all channels are checked.

Module: irc

account2nicks <handle> [channel]

Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nickname matches the given account; “” is returned if no match is found. This command will only work if a server supports (and Eggdrop has enabled) the account-notify and extended-join capabilities, and the server understands WHOX requests (also known as raw 354 responses). If no channel is specified, all channels are checked.

Module: irc

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.

Module: irc

hand2nicks <handle> [channel]

Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nick!user@host matches the given handle; “” is returned if no match is found. If no channel is specified, all channels are checked.

Module: irc

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

Module: irc

ischanban <ban> <channel>

Returns: 1 if the specified ban is on the given channel’s ban list (not the bot’s banlist for the channel)

Module: irc

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)

Module: irc

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)

Module: irc

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

Module: irc

chanexempts <channel>

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

Module: irc

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

Module: irc

resetbans <channel>

Description: removes all bans on the channel that aren’t in the bot’s ban list and refreshes any bans that should be on the channel but aren’t

Returns: nothing

Module: irc

resetexempts <channel>

Description: removes all exempt on the channel that aren’t in the bot’s exempt list and refreshes any exempts that should be on the channel but aren’t

Returns: nothing

Module: irc

resetinvites <channel>

Description: removes all invites on the channel that aren’t in the bot’s invite list and refreshes any invites that should be on the channel but aren’t

Returns: nothing

Module: irc

resetchanidle [nick] <channel>

Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified.

Returns: nothing

Module: irc

resetchanjoin [nick] <channel>

Description: resets the channel join time for the given nick or for all nicks on the channel if no nick is specified.

Returns: nothing

Module: irc

resetchan <channel> [flags]

Description: clears the channel info Eggdrop is currently storing for a channel, then rereads the channel info from the server. Useful if Eggdrop gets into a bad state on a server with respect to a channel userlist, for example. If flags are specified, only the required information will be reset, according to the given flags. Available flags:

b channel bans
e channel exempts
I channel invites
m channel modes
w memberlist (who & away info)

Returns: nothing

Module: irc

refreshchan <channel> [flags]

Description: An alternative to resetchan, refresh rereads the channel info from the server without first clearing out the previously stored information. Useful for updating a user’s away status without resetting their idle time, for example. If flags are specified, only the required information will be refreshed, according to the given flags. Available flags:

b channel bans
e channel exempts
I channel invites
m channel modes
t channel topic
w memberlist (who & away info)

Returns: nothing

Module: irc

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.

Module: irc

getchanjoin <nickname> <channel>

Returns: timestamp (unixtime format) of when the specified nickname joined the channel if available, 0 otherwise. Note that after a channel reset this information will be lost, even if previously available.

Module: irc

onchansplit <nick> [channel]

Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise

Module: irc

chanlist <channel> [flags][<&|>chanflags]

Description: flags are any global flags; the ‘&’ or ‘|’ denotes to look for channel specific flags, where ‘&’ will return users having ALL chanflags and ‘|’ returns users having ANY of the chanflags (See Flag Masks for additional information).

Returns: Searching for flags optionally preceded with a ‘+’ will return a list of nicknames that have all the flags listed. Searching for flags preceded with a ‘-‘ will return a list of nicknames that do not have have any of the flags (differently said, ‘-‘ will hide users that have all flags listed). If no flags are given, all of the nicknames on the channel are returned.

Please note that if you’re executing chanlist after a part or sign bind, the gone user will still be listed, so you can check for wasop, isop, etc.

Module: irc

getchanidle <nickname> <channel>

Returns: number of minutes that person has been idle; -1 if the specified user isn’t on the channel

Module: irc

getchanmode <channel>

Returns: string of the type “+ntik key” for the channel specified

Module: irc

jump [server [[+]port [password]]]

Description: jumps to the server specified, or (if none is specified) the next server in the bot’s serverlist. If you prefix the port with a plus sign (e.g. +6697), SSL connection will be attempted.

Returns: nothing

Module: server

pushmode <channel> <mode> [arg]

Description: sends out a channel mode change (ex: pushmode #lame +o goober) through the bot’s queuing system. All the mode changes will be sent out at once (combined into one line as much as possible) after the script finishes, or when ‘flushmode’ is called.

Returns: nothing

Module: irc

flushmode <channel>

Description: forces all previously pushed channel mode changes to be sent to the server, instead of when the script is finished (just for the channel specified)

Returns: nothing

Module: irc

topic <channel>

Returns: string containing the current topic of the specified channel

Module: irc

validchan <channel>

Description: checks if the bot has a channel record for the specified channel. Note that this does not necessarily mean that the bot is ON the channel.

Returns: 1 if the channel exists, 0 if not

Module: channels

isdynamic <channel>

Returns: 1 if the channel is a dynamic channel; 0 otherwise

Module: channels

setudef <flag/int/str> <name>

Description: initializes a user defined channel flag, string or integer setting. You can use it like any other flag/setting. IMPORTANT: Don’t forget to reinitialize your flags/settings after a restart, or it’ll be lost.

Returns: nothing

Module: channels

renudef <flag/int/s

  • Tcl Commands, eggdrop commands
  • 19 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

How To Install EggDrop

Eggdrop is the most advanced, most popular, and best supported IRC bot. If you’ve never used a...

Using Your Eggdrop

Log on to the partyline Now that your bot is online, you’ll want to join the partyline to...

Frequently Asked Questions

Eggdrop FAQ How to start my eggdrop? How do I make the bot auto-op people? How do I make the...

Configuring eggdrop with IPv6

IPv6 support This document provides information about IPv6 support which is eggdrop feature...

GeoIP.dat.gz and GeoLiteCity.dat.gz not longer available?

Are you trying to use any TCL that requires GeoIP database like BlackCountry tcl by BLaCkShaDoW?...

Powered by WHMCompleteSolution