Hmm...I may be confusing this with another request that was similar, but it seems to me that the request for a check for a registered/unregistered nick was included in the original request, to which, I replied that I required an example as to exactly how the chanserv responded for either a registered or non-registered nick. Some chanservs don't include a line of <nick> is registered and identified for, or if they do, it's not always in the same location. On the other hand, I've only seen two possible responsed if the nick isn't registered.
1) <nick> is not registered
2) <nick> isn't registered

By finding out which of those two responses (or an alternative if that chanserv happens to have something different) the code I supplied you with could easily be modified per your request here.