Skip to content

Instantly share code, notes, and snippets.

@xero
Last active Jul 28, 2022
Embed
What would you like to do?
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
  • /quit [message]
    • Disconnects from current server with optional leaving message.
  • /server hostname
    • Connects to the specified server.
  • /list
    • Lists all channels on the current network.
  • /links
    • Lists all servers on the current network. May be disabled "for security reasons".
  • /nick nickname
    • Changes your nick.
  • /names #channel
    • Shows the nicks of all users on #channel.
  • /msg nickname message
    • Sends a private message to a user.
  • /query nickname message
    • Sends a private message to a user and opens a private chat window.
  • /me action
    • Prints "yourname action"
  • /notice nickname message
    • Sends a notice to the specified user. Like a /msg, but usually makes a sound.
  • /whois nickname
    • Shows information about the specified user. This action is not visible to the specified user.
  • /whowas nickname
    • Shows information about a user who has quit.
  • /dns nickname
    • Attempts to resolve the IP address of the specified user. Doesn't work on all networks, doesn't work all the time.
  • /ping nickname
    • Pings the specified user. This action is visible to the specified user.

Nick Management (NickServ)

All nickserv commands begin with /ns or /msg NickServ. Depending on your client or network, /ns may not work. for berevity i will use the shorthand.

  • /ns register password [email]
    • Registers your current nick with NickServ with the chosen password and binds it to an e-mail address (optional).
  • /ns identify password
    • Identifies your nick to NickServ using the password you set. If you have a nick that's been registered, and you don't i
  • /ns recover nickname password
    • Kills (forcibly disconnects) someone who has your registered nick.
  • /ns ghost nickname password
    • Terminates a "ghost" IRC session that's using your nickname.
  • /ns set password yournewpassword
    • Changes your password. NOTE: Under no circumstances should you change your nick to the letter O followed by 8 digit

Channel modes

set a mode with: /mode #channel +/-attribute [data]

  • +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 [number]
    • Sets a limit on the number of users who are allowed in the channel at the same time.
  • +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 or /chanserv or /msg ChanServ. Depending on your client and network, /cs or /chanserv may not work. I will use the shorthand in these examples.

  • /cs identify #channel <password>
    • Identifies you as the channel's founder and gives you founder-level privileges.
  • /cs set #channel mlock modes
    • Locks the channel's modes. Just + unlocks all.
  • /cs set #channel secureops [on|off]
    • Keeps everyone except aops, sops, and the founder from becoming ops.
  • /cs set #channel keeptopic [on|off]
    • Maintains the topic even if everyone leaves.
  • /cs set #channel enforce [on|off]
    • Restores op/halfop/voice if a person with op/halfop/voice gets de-opped/halfopped/voiced.
  • /cs set #channel leaveops [on|off]
    • Whether or not to allow the first person who join the channel to get ops.
  • /cs register #channel password description
    • Registers the current channel to you with ChanServ and sets its password and description.
  • /cs drop #channel [dropcode]
    • Un-registers the current channel to you with ChanServ.
  • /cs set #channel founder [nickname]
    • Sets the current channel's founder.
  • /cs set #channel password [newpass]
    • Changes the current channel's password to newpass.
  • /cs set #channel desc [description]
    • Changes the current channel's description.
  • /cs set #channel url [address]
    • Associates a URL with the channel.
  • /cs set #channel [email@address]
    • Associates an email address with the channel.

Other stuff

Kicking people

  • /kick #channel nickname [reason]
    • temporarily remove user from channel /mode nickname +/-attributes [data]
    • Setting people's modes (for current channel only)

User modes

  • +q
    • User is owner of the current channel (prefix ~ on UnrealIRCd, usually @ elsewhere)
  • +a
    • User is an admin (SOP) on the current channel (prefix & on UnrealIRCd, usually @ elsewhere).
  • +o
    • User is an operator (AOP) on the current channel (prefix @).
  • +h
    • User is a half-op on the current channel (prefix %).
  • +v
    • User has voice on the current channel (prefix +).

Banning people

  • /mode #channel +b hosts
    • Hosts take the following form: nickname!userid@hostname
  • Use /whois, /whowas or /who to find the information necessary for a ban.
  • * is a wildcard and can replace nickname, userid, parts of nickname or userid, hostname or a segment of a hostname.

Examples:

  • joe!*@*
    • Will prevent anyone with the nick joe from joining.
  • *myg0t*!*
    • Will prevent anyone whose nick contains myg0t from joining.
  • mark!*elc@*
    • Will prevent anyone with the nick mark and the userid elc from joining.
  • *!*@c-123-24-76-213.ga.isp.net
    • Will prevent anyone with the host c-123-24-76-213.ga.isp.net from joining.
  • *!*@*
    • Bans everyone. Don't do that.

Access lists

  • /cs access #channel add [nickname] [level]
    • Adds nickname to the channel's access list at the specified level.
  • /cs access channel del [nickname]
    • Removes nickname from the channel's access list.
  • /cs access #channel list
    • Displays the channel's access list.
  • /cs access #channel count
    • Displays how many entries are in the channel's access list.

Access levels

These may vary from network to network. For example, some networks do not go by tens and use 3, 4, 5, 10, etc.

  • 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

AOPs

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

SOPs

  • 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 and setting privileges

  • Viewing AOP and SOP lists
    • /cs aop #channel list
    • /cs sop #channel list
  • adding a AOP or SOP
    • /cs [AOP|SOP] channel [ADD|DEL|LIST|CLEAR] [nick | entry-list]

AKICKs

People on the AKICK list are automatically kicked and banned when they enter the channel. Bans made as a result of AKICK must be removed manually.

  • /cs akick #channel add host [reason]
    • Adds host to #channel's AKICK list [for reason].
  • /cs akick #channel del host
    • Removes host from the AKICK list.
  • /cs akick #channel list
  • /cs akick #channel view
    • Displays the AKICK list.

Color codes

it's possible to color your text in irc. in most clients you can use control c then foreground,background (background is optional). examples: red text ^c4. black text on a blue background ^c1,2. here's a full list of the color codes:

Number Name
00 white
01 black
02 blue (navy)
03 green
04 red
05 brown (maroon)
06 purple
07 orange (olive)
08 yellow
09 light green (lime)
10 teal (a green/blue cyan)
11 light cyan (cyan / aqua)
12 light blue (royal)
13 pink (light purple / fuchsia)
14 grey
15 light grey (silver)

related

https://youtu.be/R8FOGlnYkgg

@davisonio
Copy link

davisonio commented Dec 29, 2017

thx

@clarknelson
Copy link

clarknelson commented Jan 17, 2018

thanks!

@vercruyce
Copy link

vercruyce commented Mar 6, 2018

Under no circumstances should you change your nick to the letter O followed by 8 digit

What is this about?

@ramachandrajr
Copy link

ramachandrajr commented Mar 16, 2018

How do you check info about a channel?

@AntumDeluge
Copy link

AntumDeluge commented Apr 5, 2018

@ramachandrajr: /msg ChanServ info <channel>

@AntumDeluge
Copy link

AntumDeluge commented Apr 5, 2018

The /cs & /ChanServ aliases seem to depend on the network. For example, I am using HexChat. And the /cs & /ChanServ command aliases work on irc.freenode.net (Freenode), but only /ChanServ works on irc.gimp.net (GIMPNet).

@p3nj
Copy link

p3nj commented May 24, 2018

thanks for the cheat sheet

@ClobberXD
Copy link

ClobberXD commented Jul 9, 2018

There needs to be a space after # for the parser correctly parse the headings. :)
e.g.

  • # IRC Reference
  • ## The Basics

@alfredbuehler
Copy link

alfredbuehler commented Aug 7, 2018

Great work, exactly what I'm looking for Thanks!

@Mikaela
Copy link

Mikaela commented Aug 18, 2018

Would you mind specifying that the *Serv parts seem to be for Anope IRC Services and possibly for networks like Rizon? I saw confusion about it on freenode and was linked here.

Otherwise this seems like a good guide or cheatsheet for those who haven't learned them by heart yet.

@IRCCoders
Copy link

IRCCoders commented Dec 22, 2018

What u declare here as UserModes +v %h @o etc. are in fact Channel Modes, dont forget it . . .

@ITWiz1
Copy link

ITWiz1 commented Jun 5, 2019

BEGS the QUESTION - and unable to find this anywhere on the web by Googling around and researching:
HOW does one EDIT their /whois output?
Some folks that I /whois it shows their email address and full name.
Some servers ignore, /SETNAME Peter (I suppose)? I am anonymous which is fine but there should be flags or more to /nick or /profile etc
Thanks

@lostchild7
Copy link

lostchild7 commented Jun 17, 2019

how do you make an opening message for a memo? i've been trying to msg chanserv and set the entrymsg... but it never works. i have no idea what parameters are either.

@Makhdoom625
Copy link

Makhdoom625 commented Sep 19, 2019

can we broke the +i ?????

@Cvar1984
Copy link

Cvar1984 commented Jun 21, 2020

I make irc bot using fsocket, that command is not working

@xero
Copy link
Author

xero commented Jun 24, 2020

There needs to be a space after # for the parser correctly parse the headings. :)

that was a change to gh md after i made this gist. i fixed that and added a note about the shorthand syntax support.

i think it funny ppl still use this cheatsheet xD
@neeasade even mirrored it on his blog <3 https://notes.neeasade.net/xeros-irc-ref.html

@bor8
Copy link

bor8 commented Jun 30, 2020

What about /j #channel to join a channel?

@deathstalkr
Copy link

deathstalkr commented Oct 10, 2020

How do I remove all nick registered to my email address?

@jfudally
Copy link

jfudally commented Jan 4, 2021

Who else is here because of the Slack outage 😂 ?

@abrantesasf
Copy link

abrantesasf commented Apr 11, 2021

Thank you very much! This information is pure gold!

@Padraig369
Copy link

Padraig369 commented Apr 18, 2021

How do I find the channel operator ip address and what server they are connected to?

@bor8
Copy link

bor8 commented Apr 18, 2021

Use /whois <NICKNAME>, /whowas <NICKNAME> or /who <NICKNAME>.

@Padraig369
Copy link

Padraig369 commented Apr 18, 2021

Thanks Bor8. Just to confirm, I am new at IRC. I've logged onto an IRC page which I did not set up but I am down as @. What little I know about IRC it would mean I am the page operator, which I am not. Is it just the case that the first logon to the page is the operator?

@bor8
Copy link

bor8 commented Apr 18, 2021

Yes. You mean channel (and not page).

@Woolton
Copy link

Woolton commented Sep 12, 2021

So how do you SET the topic?

@xero
Copy link
Author

xero commented Sep 14, 2021

So how do you SET the topic?

/topic this is the new channel topic

only works if you have permission to do so

@keven-mate
Copy link

keven-mate commented Oct 12, 2021

How to mention a user?

@xero
Copy link
Author

xero commented Oct 12, 2021

@keven-mate there's nothing in the itc spec about mentions. most clients just highlight on the user's handle. but that's client implementation specific. convention is to start with the username then some separator. eg username: whatever - an underlined colon was very popular in the late nineteen hundreds irc servers i frequented.

@keven-mate
Copy link

keven-mate commented Oct 14, 2021

@xero I use Hexchat, I guess I will have to manually add colors, thanks a lot.

@zneix
Copy link

zneix commented May 22, 2022

Nice gist with quite some reference. I suggest you can expand the user modes list with some extra ones, like +x or +r which I find to be quite common. Reference: https://irc-nerds.com/wiki/index.php/User_Modes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment