Mmm...why do you make a double check for? isreg $chan is indicative of whether the regular nickname is on channel or not.