Nothing in the code you gave is going to give a "no such nick/channel" error.