I am using the HexChat client on my local machine. I have been using an unregistered nick, eg. foobar. When my connection has dropped I get a message when I try to reconnect:
foobar is already in use. Retrying with foobar01... foobar01 is already in use. Retrying with foobar02...
This has been like this for weeks. My actual username I am trying to use is not something anyone wold be using so it seems it is locked. Obviously I cannot register the nick because I can't connect with it.
What's the solution?
If you are saying it is happening only temporarily after disconnecting that is often referred to as a ghost and your old connection just hasn't timed out. If you register the nick you can forcefully disconnect it otherwise you wait.
If it is always happening and another user is actually using it
/whois $thenick
then there is nothing you can do about that since you didn't register it.