irc reference
notes :: chatters cheatsheet
when i first wrote this document, nearly a decade ago now, it was a simple gist i used as an operator cheatsheet. well, at this point it's somehow on the top of the google search results for "irc reference", and there's been lots of user questions and chats in the comments. so i decided to revisit the document and embellish it with the regular user side of irc as well.
the gist
Highlights
- Glossary
- User Commands
- Nick Management (NickServ)
- Channel Modes
- ChanServ Commands
- Operator Commands
- Formatting
- Suggested Servers/Networks
Brief History
IRC / Internet Relay Chat is a text based chat protocol over TCP using a client-server model. It's design focuses on group communications in channels or rooms. Channel names are always prefaced by a pound sign (e.g. #unix). Servers can be a single node or a network of nodes. Clients range from command line tools, desktop GUI applications, to websites, and mobile apps.
After the first open source version of IRC was published by WiZ in 1998, universities and hobbyists began to join the network. By August 1990, the first major irc drama took place...
According to wumpus:The "A-net" (Anarchy net) included a server named eris.berkeley.edu. It was all open, required no passwords and had no limit on the number of connects. [...] It had a wildcard server line, so people were hooking up servers and "nick-colliding" everyone".
The formation of the "Eris Free Network" (EFnet), made the eris machine the first to be Q-lined (Q for quarantine) and marked the first network split.
Over the decades, use of larger networks like "the big 4" (efnet, undernet, ircnet, and dalnet) have drastically fallen off in favor of smaller, usually topical or private, instances.
User Commands
Formatting Notes:
<values> are required [values] are optional
join
- /join #channel
- Joins the specified channel.
part
- /part #channel [message]
- Leaves the specified channel with optional message
knock
- /knock #channel
- Sends a NOTICE to an invitation-only #channel with an optional message, requesting an invite.
invite
- /invite
#channel - Invites a user to join a channel.
quit
- /quit [message]
- Disconnects from current server with optional message.
server
- /server
- Connects to the specified server.
list
- /list
- Lists all channels on the current network.
links
- /links
- Lists all servers on the current network.
nick
- /nick
- Changes your handle.
names
- /names #channel
- Shows the nicks of all users on #channel.
msg
- /msg
- Sends a private message to a user.
privmsg
- /privmsg
: - Sends message to target, usually a user or channel.
query
- /query
- Sends a private message to a user in a new window.
me
- /me
- Prints "yourname action", usually in italics
notice
- /notice
- Sends a notice to the specified user. Similar to /msg, but plays a sound or visual bell.
away
- /away
- Automatically sends a reply via privmsg directed at the user, not the channel, when you are highlighted or private messaged.
whois
- /whois
- Shows information about the specified user. This action is not visible to the specified user.
whowas
- /whowas
- Shows information about a user who has quit.
dns
- /dns
- Attempts to resolve the IP address of the specified user. Doesn't work on all networks, doesn't work all the time.
ping
- /ping
- Pings the specified user. This action is visible to the specified user.
motd
- /motd [server]
- Displays the message of the day on a server, or the current if omitted.
rules
- /rules
- Requests/displays the server rules. This command is not formally defined in an RFC, but is used by many IRC daemons.
version
- /version [
] - Returns the version of a server, or the current server if omitted
Nick Management (NickServ)
Command Preface:
All nickserv commands begin with /ns, /nickserv, or /msg NickServ.Depending on your client or network, /ns may not work. Replace /ns with the appropriate command using the same arguments from these examples.For brevity i will use the shorthand.
register
- /ns register
[email] - Registers your current nick with NickServ with the chosen password and binds it to an e-mail address (optional).
identify
- /ns identify
- Identifies your nick to NickServ using the password you set. If you have a nick that's been registered, and you don't identify in a certain time period, the IRCd will auto-change your nick.
set password
- /ns set password
- Changes your password to "yournewpassword"
Warning!
Under no circumstances should you try and register, or change to, a nick starting with 0 followed by 8 digits nickformat
recover
- /ns recover nickname password
- Kills (forcibly disconnects) someone using your registered nick.
ghost
- /ns ghost nickname password
- Terminates a "ghost" IRC session that's squatting your nickname
Channel Modes
set a mode with: /mode #channel +/-attribute [data]
Attribute | Mode Description |
---|---|
+n | Disallows external messages. |
+t | Only op/hops can set the topic. |
+p | Sets the channel as invisible in /list. |
+s | Sets the channel as invisible in /list and /whois. |
+i | Sets the channel as closed unless the person was invited. |
+k [pass] | Sets a password for the channel which users must enter to join. |
+l [num] | Sets a limit on the max number of users allowed in the channel. |
+m | Prevents users who are not opped/hopped/voiced from talking. |
+R | Sets the channel so only registered nicks are allowed in. |
+M | Sets the channel so only registered nicks are allowed to talk. |
+S | Strips formatting from messages, rendering them as plaintext. |
+c | Blocks messages containing color codes. |
+i | A user must be invited to join the channel. |
+N | No nick changes permitted in the channel. |
ChanServ Commands
All ChanServ commands begin with /cs, /chanserv, or /msg ChanServ.
Depending on your client and network, /cs or /chanserv may not work.
Note:
I will use the /cs shorthand in these examples. Update the slash commands to the appropriate name for your server. Options will be the same.
register
- /cs register #channel
[description] - Registers the current channel to you with ChanServ and sets its password and description.
drop / unregister
- /cs drop #channel [dropcode]
- Un-registers the current channel to you with ChanServ.
identify
- /cs identify #channel
- Identifies you as the channel's founder and gives you founder-level privileges.
founder
- /cs set #channel founder [nickname]
- Sets the current channel's founder.
mode lock
- /cs set #channel mlock
- Locks the channel's modes. Just + unlocks all.
secure ops
- /cs set #channel secureops [on|off]
- Keeps everyone except aops, sops, and the founder from becoming ops.
keep topic
- /cs set #channel keeptopic [on|off]
- Maintains the topic even if everyone leaves.
enforce ops
- /cs set #channel enforce [on|off]
- Restores op/halfop/voice if a person with op/halfop/voice gets de-opped/halfopped/voiced.
leave ops
- /cs set #channel leaveops [on|off]
- Whether or not to allow the first person who join the channel to get ops.
set password
- /cs set #channel password [newpass]
- Changes the current channel's password to newpass.
description
- /cs set #channel desc [description]
- Changes the current channel's description.
url
- /cs set #channel url [address]
- Associates a URL with the channel.
- /cs set #channel [email@address]
- Associates an email address with the channel.
Operator Commands
oper
- /oper
- Authenticates a user as an IRC operator on that server/network.
userip
- /userip
- Requests the public IP address of the user with the specified nickname.
- 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.
- Support is indicated in a RPL_ISUPPORT reply (numeric 005) with the USERIP keyword.
users
- /users [
] - Returns a list of users and information about those users in a format similar to the unix who, rusers, and finger commands.
wallops
- /wallops
- Sends the "message" to all operators connected to the server, or all users with user mode w set. similar to the unix wall command.
trace
- /trace [target]
- Trace a path across the IRC network to a specific server or client, in a similar method to traceroute.
User modes
Mode | Description | Prefix |
---|---|---|
+q | User is owner of the current channel | @ or ~ on UnrealIRCd |
+a | User is an admin (SOP) on the current channel | @ or & on UnrealIRCd |
+o | User is an operator (AOP) on the current channel | @ |
+h | User is a half-op on the current channel | % |
+v | User has voice on the current channel | + |
Kicking People
kick
- /kick #channel nickname [reason]
- temporarily remove user from channel
- /mode nickname +/-attributes [data]
- Setting people's modes (for current channel only)
Auto Kicks / AKICKs
People on the channel AKICK list are automatically kicked and banned upon joining the channel.
Bans made as a result of AKICKs must be removed manually.
akick add
- /cs akick #channel add host [reason]
- Adds host to #channel's AKICK list for "reason".
akick del
- /cs akick #channel del host
- Removes host from the AKICK list.
akick list/view
- /cs akick #channel list
- /cs akick #channel view
- Displays the AKICK list.
- command name varies between IRCd's
Banning
mode +b
- /mode #channel +b hosts
- Hosts take the following form: nickname!userid@hostname
- Use /whois, /whowas or /who to find the necessary information
- * is a wildcard and can replace nickname, userid, parts of nickname or userid, hostname or a segment of a hostname.
Examples
Remember, regex is your friend. People love to change their nicks to avoid bans, but often use a standard host, userid, or some other unique identifier.
nickname
- joe!*@*
- Prevents anyone with the nick joe from joining.
nick contains
- *myg0t*!*
- Prevents anyone whose nick contains myg0t from joining.
nick and userid
- mark!*elc@*
- Prevents anyone with the nick mark and the userid elc from joining.
hostname
- *!*@c-123-24-76-213.ga.isp.net
- Prevents anyone with the host c-123-24-76-213.ga.isp.net from joining.
rip
- *!*@*
- Bans everyone. Don't do that.
Access Lists
access add
- /cs access #channel add [nickname] [level]
- Adds nickname to the channel's access list at the specified level.
access del
- /cs access channel del [nickname]
- Removes nickname from the channel's access list.
access list
- /cs access #channel list
- Displays the channel's access list.
access count
- /cs access #channel count
- Displays how many entries are in the channel's access list.
Access Levels
Important Note:
These may vary from network to network. For example,some networks do not go by tens and use 3, 4, 5, 10, etc.
Mode | Description |
---|---|
Founder | Full access to ChanServ functions, automatic opping upon entering channel. |
100+ | Makes the person an SOP, automatic opping upon entering channel. |
50 | Makes the parson an AOP, automatic opping upon entering channel. |
40 | Automatic half-opping. |
30 | Automatic voicing. |
0 | No special privileges. |
-1 | May not be opped. |
-100 | May not join the channel. |
Any nick not on the access list has an access level of 0.
AOPs and SOPs
AOP / Auto Operators
- Are automatically ops and can give themselves ops.
- Can give/take op/halfop/voice to/from other channel members.
- Can unban themselves.
- Receive memos sent to the whole channel.
- Can invite themselves to the channel.
SOP / Super Operators
- Can do everything AOPs can.
- Can give and take AOP privileges.
- Receive memos sent to the channel's SOPs.
- Can add (but not remove) AKICKs.
Viewing/Setting Privileges
list
- /cs aop #channel list
- /cs sop #channel list
- Viewing AOP and SOP lists
managing
- /cs [AOP|SOP] channel [ADD|DEL|LIST|CLEAR] [nick | entry-list]
- Modifies access privileges
Formatting
Even though IRC is a plain text protocol, it supports the use of color codes. Clients convert these codes to the appropriate terminal escape characters before rendering the message to the user.
ANSI Support
IRC has been around for a long time. Back in those days we used CP347 and ANSI. Even back then, IRC supported bold and color formatting via escape codes.
Limitations
If an IRC client cannot display a specified type of formatting, the client will do one of the following:
- Display the message without the formatting (best case imho)
- Display the formatting character in an obvious way, so users are aware that it was used. (e.g. uppercase U for underlining)
- A bunch of junk will be printed to the screen
Types
Name | HEX | Support | |
---|---|---|---|
Bold | 0x02 | Most (since ANSI) | |
Italics | 0x1D | Less common | |
Underline | 0x1F | Most | |
Strikethrough | 0x1E | Limited: Textual, HexChat, IRCCloud, TheLounge | |
Monospace | 0x11 | Very Limited: IRCCloud, TheLounge, Textual | |
Color | 0x03 | Most (since ANSI) |
Colors
In most clients you can press control+c (^c) then foreground,background (background is optional).
Examples
- ^c4 red text
- ^c1,2 black text on a blue background
Color Codes
[!faq] Here's the full list of color codes
Number | Name |
---|---|
00 | white |
01 | black |
02 | blue |
03 | green |
04 | red |
05 | brown |
06 | purple |
07 | orange |
08 | yellow |
09 | lime green |
10 | cyan |
11 | aqua |
12 | royal blue |
13 | pink |
14 | grey |
15 | light grey (silver) |
Spoilers
This idea was created by the netizens of irc, not client developers
The effect is created by setting both the background and foreground color the same for a section of text, usually black on black. Readers can reveal the message by selecting or "hovering over" the block.
Misc
Suggested Servers/Networks
Network | Website | Server |
---|---|---|
Rizon | https://rizon.net | irc://rizon |
Cyberia | https://cyberia.is | irc://cyberia.is |
UnixChat | https://unix.chat | irc://unix.chat |
IRCLand | https://irc.land | irc://irc.land |
QuakeNet | http://quakenet.org | irc://quakenet |
SwiftIRC | http://swiftirc.net | irc://swiftirc |
Libera | http://libera.chat | irc://libera.chat |
Snoonet | http://snoonet.org | irc://snoonet |
h4x0red | https://h4x0.red | irc://h4x0.red |
~ town | https://tilde.town | hidden service |
IRC Cloud | https://irccloud.com | multiple endpoints |
theLounge | https://thelounge.chat | self hosted |
IRCd Software
IRC daemon | code basis | language | released | license |
---|---|---|---|---|
Bahamut | IRCD-Hybrid | C | 1999 | GPL |
bIRCd | DreamForge | C | 1999 | GPL |
Charybdis | ircd-ratbox | C | 2005 | BSD |
ConferenceRoom | Custom | C++ | 1996 | Proprietary |
csircd | Custom | C | 1998 | GPL |
InspIRCd | Custom | C++ | 2002 | GPL |
IRCd | Custom | C | 1988 | GPL |
ircd-hybrid | irc2.8 | C | 1997 | GPL |
ircd-ratbox | Hybrid | C | 2002 | GPL |
ircu | irc2.7 | C | 1991 | GPL |
ithildin | Custom | C | 2006 | BSD |
Nefarious IRCu | ircu2 | C | 2004 | GPL |
ngIRCd | Custom | C | 2001 | GPL |
OfficeIRC | Custom | VB.NET | 2006 | Proprietary |
PleXusIRCd | Hybrid | C | 2005 | GPL |
pureIRCd | Custom | C | 2002 | GPL |
ShadowIRCd | Charybdis | C | 2008 | GPL |
solid-ircd | Bahamut | C | ? | GPL |
Synchronet IRCd | Custom | Javascript | 2003 | GPL |
UnrealIRCd | DreamForge | C | 1999 | GPL |
WeIRCd | Custom | C | 2007 | GPL |
Glossary
- IRC - Acronym for Internet Relay Chat, a text based chat protocol.
- IRCd - IRC Daemon, the technical name for IRC server software.
- channel - IRC's equivalent term for a "chat room", or group chat. Names are prefaced with a pound sign (e.g. #channel_name), and are unique to a server.
- msg or priv msg - An abbreviation for "Message" or "Private Message". Any messages given across IRC are private between two people rather than to a channel where anyone in the channel can see.
- op - Someone with Operator status. They are marked by a @ or ~ symbol next to their name and it means they have some degree of power in a channel to change settings, kick people out and so on.
- afk - acronym for "Away From Keyboard". Often used in /away messages, it indicates that a connected use is unavailable to chat for a period of time.
- bot - An IRC bot or Chat Bot, is software that runs on a remove computer and connects into an IRC server like a normal user and read the logs looking for actionable events. They can perform various automated or manual tasks, such as user commands, managing user privileges, combining messages, providing detailed link information, or hosting games.
Sauces
Footnotes
-
Footnotes
In accordance with the irc spec, no IRCd will allow a user to use a nick beginning with a number. This is a security mitigation to prevent accidental misinterpretation of a nick as a valid UID or SIP.
Examples:
0SOMENICK is a valid UID.
0AA is a valid SID, which could be used by middleware.Valid nick format:
(letter/special) *8(letter/digit/special/"-")