List of IRC commands explained

This is a list of all Internet Relay Chat commands from RFC 1459, RFC 2812, and extensions added to major IRC daemons. Most IRC clients require commands to be preceded by a slash ("/"). Some commands are actually sent to IRC bots; these are treated by the IRC protocol as ordinary messages, not as /-commands.

Conventions used here: Angle brackets ("<" and ">") are used here to indicate a placeholder for some value, and are not a literal part of a command. Square brackets ("[" and "]") are used to indicate that a value is optional.

User commands

ADMIN

Syntax:

ADMIN [<nowiki><target></nowiki>]

Instructs the server to return information about the administrators of the server specified by <target>, where <target> is either a server or a user. If <target> is omitted, the server should return information about the administrators of the current server.[1]

AWAY

Syntax:

<nowiki>AWAY [<message>]</nowiki>

Provides the server with a message to automatically send in reply to a PRIVMSG directed at the user, but not to a channel they are on.[2] If <message> is omitted, the away status is removed. Defined in RFC 1459.

CNOTICE

Syntax:

<nowiki>CNOTICE <nickname> <channel> :<message></nowiki>

Sends a channel NOTICE message to <nickname> on <channel> that bypasses flood protection limits. The target nickname must be in the same channel as the client issuing the command, and the client must be a channel operator.

Normally an IRC server will limit the number of different targets a client can send messages to within a certain time frame to prevent spammers or bots from mass-messaging users on the network, however this command can be used by channel operators to bypass that limit in their channel. For example, it is often used by help operators that may be communicating with a large number of users in a help channel at one time.

This command is not formally defined in an RFC, but is in use by some IRC networks. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the CNOTICE keyword

CPRIVMSG

Syntax:

<nowiki>CPRIVMSG <nickname> <channel> :<message></nowiki>

Sends a private message to <nickname> on <channel> that bypasses flood protection limits. The target nickname must be in the same channel as the client issuing the command, and the client must be a channel operator.

Normally an IRC server will limit the number of different targets a client can send messages to within a certain time frame to prevent spammers or bots from mass-messaging users on the network, however this command can be used by channel operators to bypass that limit in their channel. For example, it is often used by help operators that may be communicating with a large number of users in a help channel at one time.

This command is not formally defined in an RFC, but is in use by some IRC networks. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the CPRIVMSG keyword

CONNECT

Syntax:

<nowiki>CONNECT <target server> [<port> [<remote server>]]</nowiki> (RFC 1459)

<nowiki>CONNECT <target server> <port> [<remote server>]</nowiki> (RFC 2812)

Instructs the server <remote server> (or the current server, if <remote server> is omitted) to connect to <target server> on port <port>.[3] [4] This command should only be available to IRC operators. Defined in RFC 1459; the <port> parameter became mandatory in RFC 2812.

DIE

Syntax:

<nowiki>DIE</nowiki>

Instructs the server to shut down.[5] This command may only be issued by IRC server operators. Defined in RFC 2812.

ENCAP

Syntax:

<nowiki>:<source> ENCAP <destination> <subcommand> <parameters></nowiki>

This command is for use by servers to encapsulate commands so that they will propagate across hub servers not yet updated to support them, and indicates the subcommand and its parameters should be passed unaltered to the destination, where it will be unencapsulated and parsed. This facilitates implementation of new features without a need to restart all servers before they are usable across the network.[6]

ERROR

Syntax:

<nowiki>ERROR <error message></nowiki>

This command is for use by servers to report errors to other servers. It is also used before terminating client connections.[7] Defined in RFC 1459.

HELP

Syntax:

<nowiki>HELP</nowiki>

Requests the server to display the help file. This command is not formally defined in an RFC, but is in use by most major IRC daemons.

INFO

Syntax:

<nowiki>INFO [<target>]</nowiki>

Returns information about the <target> server, or the current server if <target> is omitted.[8] Information returned includes the server's version, when it was compiled, the patch level, when it was started, and any other information which may be considered to be relevant. Defined in RFC 1459.

INVITE

Syntax:

<nowiki>INVITE <nickname> <channel></nowiki>

Invites <nickname> to the channel <channel>.[9] <channel> does not have to exist, but if it does, only members of the channel are allowed to invite other clients. If the channel mode i is set, only channel operators may invite other clients. Defined in RFC 1459.

ISON

Syntax:

<nowiki>ISON <nicknames></nowiki>

Queries the server to see if the clients in the space-separated list <nicknames> are currently on the network.[10] The server returns only the nicknames that are on the network in a space-separated list. If none of the clients are on the network the server returns an empty list. Defined in RFC 1459.

JOIN

Syntax:

<nowiki>JOIN <channels> [<keys>]</nowiki>

Makes the client join the channels in the comma-separated list <channels>, specifying the passwords, if needed, in the comma-separated list <keys>.[11] If the channel(s) do not exist then they will be created. Defined in RFC 1459.

KICK

Syntax:

<nowiki>KICK <channel> <client> :[<message>]</nowiki>

Forcibly removes <client> from <channel>.[12] This command may only be issued by channel operators. Defined in RFC 1459.

KILL

Syntax:

<nowiki>KILL <client> <comment></nowiki>

Forcibly removes <client> from the network.[13] This command may only be issued by IRC operators. Defined in RFC 1459.

KNOCK

Syntax:

<nowiki>KNOCK <channel> [<message>]</nowiki>

Sends a NOTICE to an invitation-only <channel> with an optional <message>, requesting an invite. This command is not formally defined by an RFC, but is supported by most major IRC daemons. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the KNOCK keyword.

LINKS

Syntax:

<nowiki>LINKS [<remote server> [<server mask>]]</nowiki>

Lists all server links matching <server mask>, if given, on <remote server>, or the current server if omitted.[14] Defined in RFC 1459.

LIST

Syntax:

<nowiki>LIST [<channels> [<server>]]</nowiki>

Lists all channels on the server.[15] If the comma-separated list <channels> is given, it will return the channel topics. If <server> is given, the command will be forwarded to <server> for evaluation. Defined in RFC 1459.

LUSERS

Syntax:

<nowiki>LUSERS [<mask> [<server>]]</nowiki>

Returns statistics about the size of the network.[16] If called with no arguments, the statistics will reflect the entire network. If <mask> is given, it will return only statistics reflecting the masked subset of the network. If <target> is given, the command will be forwarded to <server> for evaluation. Defined in RFC 2812.

MODE

Syntax:

<nowiki>MODE <nickname> <flags> (user)</nowiki>

<nowiki>MODE <channel> <flags> [<args>]</nowiki>

The MODE command is dual-purpose. It can be used to set both user and channel modes.[17] Defined in RFC 1459.

MOTD

Syntax:

<nowiki>MOTD [<server>]</nowiki>

Returns the message of the day on <server> or the current server if it is omitted.[18] Defined in RFC 2812.

NAMES

Syntax:

<nowiki>NAMES [<channels>]</nowiki> (RFC 1459)

<nowiki>NAMES [<channels> [<server>]]</nowiki> (RFC 2812)

Returns a list of who is on the comma-separated list of <channels>, by channel name.[19] If <channels> is omitted, all users are shown, grouped by channel name with all users who are not on a channel being shown as part of channel "*". If <server> is specified, the command is sent to <server> for evaluation.[20] Defined in RFC 1459; the optional <server> parameter was added in RFC 2812.

The response contains all nicknames in the channel prefixed with the highest channel status prefix of that user, for example like this (with @ being the highest status prefix)

:irc.server.net 353 Phyre = #SomeChannel :@WiZ

If a client wants to receive all the channel status prefixes of a user and not only their current highest one, the IRCv3 multi-prefix extension can be enabled (@ is the channel operator prefix, and + the lower voice status prefix):[21]

:irc.server.net 353 Phyre = #SomeChannel :@+WiZ

See also NAMESX below for an alternate, older approach to achieve the same effect. However, by today most clients and servers support the new IRCv3 standard.[22]

NICK

Syntax:

<nowiki>NICK <nickname> [<hopcount>]</nowiki> (RFC 1459)

<nowiki>NICK <nickname></nowiki> (RFC 2812)

Allows a client to change their IRC nickname. Hopcount is for use between servers to specify how far away a nickname is from its home server.[23] [24] Defined in RFC 1459; the optional <hopcount> parameter was removed in RFC 2812.

NOTICE

Syntax:

<nowiki>NOTICE <msgtarget> <message></nowiki>

This command works similarly to PRIVMSG, except automatic replies must never be sent in reply to NOTICE messages.[25] Defined in RFC 1459.

OPER

Syntax:

<nowiki>OPER <username> <password></nowiki>

Authenticates a user as an IRC operator on that server/network.[26] Defined in RFC 1459.

PART

Syntax:

<nowiki>PART <channels> [<message>]</nowiki>

Causes a user to leave the channels in the comma-separated list <channels>.[27] Defined in RFC 1459.

PASS

Syntax:

<nowiki>PASS <password></nowiki>

Sets a connection password.[28] This command must be sent before the NICK/USER registration combination. Defined in RFC 1459.

PING

Syntax:

<nowiki>PING <server1> [<server2>]</nowiki>

Tests the presence of a connection.[29] A PING message results in a PONG reply. If is specified, the message gets passed on to it. Defined in RFC 1459.

PONG

Syntax:

<nowiki>PONG <server1> [<server2>]</nowiki>

This command is a reply to the PING command and works in much the same way.[30] Defined in RFC 1459.

PRIVMSG

Syntax:

<nowiki>PRIVMSG <msgtarget> :<message></nowiki>

Sends <message> to <msgtarget>, which is usually a user or channel.[31] Defined in RFC 1459.

QUIT

Syntax:

<nowiki>QUIT [<message>]</nowiki>

Disconnects the user from the server.[32] Defined in RFC 1459.

QUOTE

Syntax:

<nowiki>QUOTE</nowiki>

Sends a command string to the server as-is, i.e. without parsing it in the client application.[33] [34]

REHASH

Syntax:

<nowiki>REHASH</nowiki>

Causes the server to re-read and re-process its configuration file(s).[35] This command can only be sent by IRC operators. Defined in RFC 1459.

RULES

Syntax:

<nowiki>RULES</nowiki>

Requests the server rules. This command is not formally defined in an RFC, but is used by most major IRC daemons.

SERVER

Syntax:

<nowiki>SERVER <servername> <hopcount> <info></nowiki>

The server message is used to tell a server that the other end of a new connection is a server.[36] This message is also used to pass server data over the whole network.<hopcount> details how many hops (server connections) away is.<info> contains addition human-readable information about the server.

Defined in RFC 1459.

SERVICE

Syntax:

SQUERY

Syntax:

<nowiki>SQUERY <servicename> <text></nowiki>

Identical to PRIVMSG except the recipient must be a service.[37] Defined in RFC 2812.

SQUIT

Syntax:

<nowiki>SQUIT <server> <comment></nowiki>

Causes <server> to quit the network.[38] Defined in RFC 1459.

SETNAME

Syntax:

<nowiki>SETNAME <new real name></nowiki>

Allows a client to change the "real name" specified when registering a connection.

This command is not formally defined by an RFC, but is in use by some IRC daemons. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the SETNAME keyword

SILENCE

Syntax:

<nowiki>SILENCE [+/-<hostmask>]</nowiki>

Adds or removes a host mask to a server-side ignore list that prevents matching users from sending the client messages. More than one mask may be specified in a space-separated list, each item prefixed with a "+" or "-" to designate whether it is being added or removed. Sending the command with no parameters returns the entries in the client's ignore list.

This command is not formally defined in an RFC, but is supported by most major IRC daemons. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the SILENCE keyword and the maximum number of entries a client may have in its ignore list. For example:

:irc.server.net 005 WiZ WALLCHOPS WATCH=128 '''SILENCE=15''' MODES=12 CHANTYPES=#

STATS

Syntax:

<nowiki>STATS <query> [<server>]</nowiki>

Returns statistics about the current server, or <server> if it's specified.[39] Defined in RFC 1459.

SUMMON

Syntax:

<nowiki>SUMMON <user> [<server>]</nowiki> (RFC 1459)

<nowiki>SUMMON <user> [<server> [<channel>]]</nowiki> (RFC 2812)

Gives users who are on the same host as <server> a message asking them to join IRC.[40] [41] Defined in RFC 1459; the optional <channel> parameter was added in RFC 2812.

TIME

Syntax:

<nowiki>TIME [<server>]</nowiki>

Returns the local time on the current server, or <server> if specified.[42] Defined in RFC 1459.

TOPIC

Syntax:

<nowiki>TOPIC <channel> [<topic>]</nowiki>

Allows the client to query or set the channel topic on <channel>.[43] If <topic> is given, it sets the channel topic to <topic>. If channel mode +t is set, only a channel operator may set the topic. Defined in RFC 1459.

TRACE

Syntax:

<nowiki>TRACE [<target>]</nowiki>

Trace a path across the IRC network to a specific server or client, in a similar method to traceroute.[44] Defined in RFC 1459.

USER

Syntax:

<nowiki>USER <username> <hostname> <servername> <realname></nowiki> (RFC 1459)

<nowiki>USER <user> <mode> <unused> <realname></nowiki> (RFC 2812)

This command is used at the beginning of a connection to specify the username, hostname, real name and initial user modes of the connecting client.[45] [46] <realname> may contain spaces, and thus must be prefixed with a colon. Defined in RFC 1459, modified in RFC 2812.

USERHOST

Syntax:

<nowiki>USERHOST <nickname> [<nickname> <nickname> ...]</nowiki>

Returns a list of information about the nicknames specified.[47] Defined in RFC 1459.

USERIP

Syntax:

<nowiki>USERIP <nickname></nowiki>

Requests the direct IP address of the user with the specified nickname. This command is often used to obtain the IP of an abusive user to more effectively perform a ban. It is unclear what, if any, privileges are required to execute this command on a server.

This command is not formally defined by an RFC, but is in use by some IRC daemons. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the USERIP keyword.

USERS

Syntax:

<nowiki>USERS [<server>]</nowiki>

Returns a list of users and information about those users in a format similar to the UNIX commands who, rusers and finger.[48] Defined in RFC 1459.

VERSION

Syntax:

<nowiki>VERSION [<server>]</nowiki>

Returns the version of <server>, or the current server if omitted.[49] Defined in RFC 1459.

WALLOPS

Syntax:

<nowiki>WALLOPS <message></nowiki>

Sends <message> to all operators connected to the server (RFC 1459), or all users with user mode 'w' set (RFC 2812).[50] [51] Defined in RFC 1459.

WATCH

Syntax:

<nowiki>WATCH [+/-<nicknames>]</nowiki>

Adds or removes a user to a client's server-side friends list. More than one nickname may be specified in a space-separated list, each item prefixed with a "+" or "-" to designate whether it is being added or removed. Sending the command with no parameters returns the entries in the client's friends list.

This command is not formally defined in an RFC, but is supported by most major IRC daemons. Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the WATCH keyword and the maximum number of entries a client may have in its friends list. For example:

:irc.server.net 005 WiZ WALLCHOPS '''WATCH=128''' SILENCE=15 MODES=12 CHANTYPES=#

WHO

Syntax:

<nowiki>WHO [<name> ["o"]]</nowiki>

Returns a list of users who match <name>.[52] If the flag "o" is given, the server will only return information about IRC operators. Defined in RFC 1459.

WHOIS

Syntax:

<nowiki>WHOIS [<server>] <nicknames></nowiki>

Returns information about the comma-separated list of nicknames masks <nicknames>.[53] If <server> is given, the command is forwarded to it for processing. Defined in RFC 1459.

WHOWAS

Syntax:

<nowiki>WHOWAS <nickname> [<count> [<server>]]</nowiki>

Used to return information about a nickname that is no longer in use (due to client disconnection, or nickname changes).[54] If given, the server will return information from the last <count> times the nickname has been used. If <server> is given, the command is forwarded to it for processing. In RFC 2812, can be a comma-separated list of nicknames.[55]

Defined in RFC 1459.

See also

Bibliography

Further reading

Notes and References

  1. 1459. 4.3.7. 31. ietf. Admin command.
  2. 1459. Away. 5.1. 38 – 39. ietf.
  3. 1459. Connect message. 4.3.5. 29 – 30. ietf.
  4. 2812. Connect message. 3.4.7. 28 – 29. ietf.
  5. 2812. Die message. 4.3. 39. ietf.
  6. Web site: Archived copy . 6 December 2012 . https://web.archive.org/web/20130605105226/http://www.leeh.co.uk/ircd/encap.txt . 5 June 2013 . dead .
  7. 1459. Error. 4.6.4. 38. ietf.
  8. 1459. Info command. 4.3.8. 31 – 32. ietf.
  9. 1459. Invite message. 4.2.7. 25. ietf.
  10. 1459. Ison message. 5.8. 42. ietf.
  11. 1459. Join message. 4.2.1. 19 – 20. ietf.
  12. 1459. Kick command. 4.2.8. 25 – 26. ietf.
  13. 1459. Kill message. 4.6.1. 36. ietf.
  14. 1459. Links message. 4.3.3. 28 – 29. ietf.
  15. 1459. List message. 4.2.6. 24 – 25. ietf.
  16. 2812. Lusers message. 3.4.2. 25 – 26. ietf.
  17. 1459. Mode message. 4.2.3. 21 – 23. ietf.
  18. 2812. Motd message. 3.4.1. 25. ietf.
  19. 1459. Names message. 4.2.5. 24. ietf.
  20. 2812. Names message. 3.2.5. 20 – 21. ietf.
  21. Web site: IRCv3 – Welcome . Andrew Northall . ircv3.net . atheme.org . 21 February 2016 . 9 January 2015 . https://web.archive.org/web/20150109104555/http://ircv3.atheme.org/extensions/multi-prefix-3.1 . live .
  22. Web site: IRCv3 – Welcome. Andrew Northall. atheme.org. 21 February 2016. 17 February 2015. https://web.archive.org/web/20150217030215/http://ircv3.atheme.org/. live.
  23. 1459. Nick message. 4.1.2. 14 – 15. ietf.
  24. 2812. Nick message. 3.1.2. 10 – 11. ietf.
  25. 1459. Notice. 4.4.2. 33. ietf.
  26. 1459. Oper. 4.1.5. 17. ietf.
  27. 1459. Part message. 4.2.2. 20 – 21. ietf.
  28. 1459. Password message. 4.1.1. 14. ietf.
  29. 1459. Ping message. 4.6.2. 37. ietf.
  30. 1459. Pong message. 4.6.3. 37 – 38. ietf.
  31. 1459. Private messages. 4.4.1. 32 – 33. ietf.
  32. 1459. Quit. 4.1.6. 17 – 18. ietf.
  33. Web site: quote - Irssi help page. Irssi developers.
  34. /quote is cited in the mIRC documentation (https://www.mirc.com/help/html/index.html?mirc_commands.html) as an equivalent of mIRC's /raw command, but which is supported in the other IRC clients.
  35. 1459. Rehash message. 5.2. 39. ietf.
  36. 1459. Server message. 4.1.4. 16 – 17. ietf.
  37. 2812. Squery. 3.5.2. 32. ietf.
  38. 1459. Server quit message. 4.1.7. 18 – 19. ietf.
  39. 1459. Stats message. 4.3.2. 27 – 28. ietf.
  40. 1459. Summon message. 5.4. 40. ietf.
  41. 2812. Summon message. 4.5. 40. ietf.
  42. 1459. Time message. 4.3.4. 29. ietf.
  43. 1459. Topic message. 4.2.4. 23 – 24. ietf.
  44. 1459. Trace message. 4.3.6. 30 – 31. ietf.
  45. 1459. User message. 4.1.3. 15 – 16. ietf.
  46. 2812. User message. 3.1.3. 11. ietf.
  47. 1459. Userhost message. 5.7. 42. ietf.
  48. 1459. Users. 5.5. 40 – 41. ietf.
  49. 1459. Version message. 4.3.1. 26 – 27. ietf.
  50. 1459. Operwall message. 5.6. 41. ietf.
  51. 2812. Operwall message. 4.7. 41 – 42. ietf.
  52. 1459. Who query. 4.5.1. 33 – 34. ietf.
  53. 1459. Whois query. 4.5.2. 34 – 35. ietf.
  54. 1459. Whowas. 4.5.3. 35. ietf.
  55. 2812. Whowas. 3.6.3. 34. ietf.