You can use $* and avoid the while :

Code:
raw 353:*:tokenize 32 $4- | write nicks.txt $*


And he can use /play to play the file when someone use !regnick :

Code:
on *:text:!regnick:#channel:play "nicks.txt"


#mircscripting @ irc.swiftirc.net == the best mIRC help channel