I had to change it a bit. When I implemented your code I would get the error message as soon as someone clicked on the "register" link to begin the process. I was able to look at the code and figure out enough to do the following"
In register.php
Code:
// This is the Registration Code
if ($action=="addmember") {
if ($specialpassword!='XXX') {
eval("standarderror(\"".gettemplate("error_inviteonly")."\");");
exit;
}
}
Of course I may have implemented your code incorrectly to start with.
Thanks for pushing me most of the way!