Kill ghost on connect to freenode in xchat?

Assuming all versions work the same, you can put /msg nickserv ghost name password as a connect command under server settings for freenode.

enter image description here

To change your nick as well is a little tricky - type in

/msg nickserv ghost username password

Then CTRL SHIFT u a

/nick username

As one line. This should do both commands one after another


Try "/msg nickserv ghost ", without the quotes.