I've done some experimentation and the only thing that seems to matter is the nick. The password is indeed used to register you, and is associated with the nick, not the username or the real name. At least on Foonetic.
First, I logged in with nick "Iggle", and some random other data:
PASS stuff
NICK Iggle
USER whatever 0 * somerealname
Then I registered
PRIVMSG nickserv register pinetree [email protected]
And verified it. So now "pinetree" is the password for Nick: Iggle, Username: whatever, Real name: somerealname.
I disconnected and reconnected.
PASS something
NICK Iggle
USER whatever 0 * somerealname
It logged me in but complained about an invalid password. Okay:
PRIVMSG nickserv identify pinetree
That worked, and it gave me +r. So the PASS
command does indeed correspond to the password you register with NickServ. Doing WHOIS Iggle
showed a username of "whatever" and a real name of "some real name". I disconnected and reconnected again.
PASS pinetree
NICK Iggle
USER canada 0 * ghana
That logged me in and didn't complain about the password, giving me +r straight away! This confirms that the PASS
command is the same as the password given to nickserv, and since I used a different username and real name, it shows that neither of those have anything to do with the password - only the nick matters. WHOIS Iggle
showed a username of "canada" and a real name of "ghana", no mention of the data I used on the previous log-in. So you can even use a different username and real name every time you connect to the server and nobody seems to even notice.
Conclusion: The nick seems to be the only thing that matters at all. It's permanently attached to a password once registered with nickserv, and the username and real name don't matter and can be changed at every log in. They don't even seem to be stored anywhere by the server.