if ($nick isin %register) would not work, it just checks if "nick" is in the WORD "registered.txt". /help $read.
I'd suggest to use .ini file or hash tables, read the help file for info.

btw. you don't need those ugly goto's.