According to RFC 2812, section 3.1, in order to connect to an IRC server, a user must issue three commands in this order:
PASS <a password>
NICK <a nickname>
USER <a username> <mode> <unused> <a real name>
So we have a password, and we have three different "names": nickname, username, and real name.
When I use IRC, I only have one name: the one that appears to others in the chat. Is this the nickname?
What are the other two? And what is the password for? I know there's a feature in IRC where you can register a nick and password so only you can use it. Is that what this password is?
The nickname supplied with NICK
is the name that's used to address you on IRC. The nickname must be unique across the network, so you can't use a nickname that's already in use at the time.
The username supplied with USER
is simply the user
part in your user@host
hostmask that appears to others on IRC, showing where your connection originates from (if you've never seen these, then your client may be hiding them). In the early days of IRC it was typical for people to run their IRC client on multi-user machines, and the username corresponded to their local username on that machine. Some people do still use IRC from multi-user shell servers, but for the most part the username is vestigal.
The real name supplied with USER
is used to populate the real name field that appears when someone uses the WHOIS
command on your nick. Unlike the other two fields, this field can be fairly long and contain most characters (including spaces). Some people do put their real name here, but many do not.
The PASS
command is optional. It is used to supply a password if the IRC server you are using requires one. Some servers will use the password supplied to attempt to log you on to IRC services.
Note that the RFC2812 does not represent a consensus view of IRC - it is an update to the standard authored by and focussed on one particular implementation of IRC. RFC1459 is still the lingua franca of IRC.