Thanks for that AP - I will try again.
As far as idenitfying domains to "allow" to register, that would be All domains minus the ones you want to ban. There must be millions there to allow, and Im just thinking of Carsten's Mod which had the flag option from admin center to either deny or allow.
I have included Carsten's mod here if it would help.
<id>
Mail Domain for SP 1.3.1
</id>
<version>
0.6 beta
</version>
<mod info>
This mod lets admin create a list of mail domains legal or illegal for registration
Apply this mod.
Upload (in ASCII mode):
english.lng
Sources/Admin.pl
Sources/Register.pl
Sources/SubList.pl
Variables/maildom.txt (chmod 666)
Go to Admin Center - Member Controls and click on the new "Set mail domains for registration" link
to add/change your list of legal or illegal mail domains.
</mod info>
<author>
Carsten
</author>
<homepage>
http://www.langaa-net.dk/cgi-bin/kayabb/YaBB.pl</homepage>
<edit file>
english.lng
</edit file>
<search for>
if($MenuType == 1) {
$menusep = ' | ';
</search for>
<add before>
%mdltxt = (
'01' => "Set mail domains for registration",
'02' => "One mail domain per line",
'03' => "Mail domains not valid for registration",
'04' => "Mail domains valid for registration",
'05' => "Sorry, you can not register using the Mail Domain :"
);
</add before>
<edit file>
Sources/Admin.pl
</edit file>
<search for>
- <a href="$cgi;action=ipban">$txt{'206'}</a><br>
</search for>
<add after>
- <a href="$cgi;action=setmaildom">$mdltxt{'01'}</a><br>
</add after>
<search for>
sub ml {
</search for>
<add before>
sub SetMaildom {
&is_admin;
my( @maildom, $maildomcnt, $i, $x, $setsel, $ssetsel0, $ssetsel1);
if(!-e ("$vardir/maildom.txt")) {
fopen(FILE, ">$vardir/maildom.txt", 1);
print FILE "0\n";
fclose(FILE);
}
fopen(FILE, "$vardir/maildom.txt");
@maildom = <FILE>;
$maildomcnt = @maildom;
fclose(FILE);
chomp $maildom[0];
$setsel = $maildom[0];
if ($setsel eq "0") { $ssetsel0 = 'checked' } else { $ssetsel1 = 'checked' }
$yymain .= qq~
<table border=0 cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center" cellpadding="4">
<tr>
<td bgcolor="$color{'titlebg'}" class="titlebg">
<img src="$imagesdir/register.gif" alt="" border="0">
<font size="2" class="text1" color="$color{'titletext'}"><b>$mdltxt{'01'}</b></font></td>
</tr><tr>
<td bgcolor="$color{'windowbg'}" class="windowbg">
<form name="maildom" action="$cgi;action=setmaildom2" method="POST">
<input type="radio" class="windowbg" name="setsel" value="0" $ssetsel0> <font size="2">$mdltxt{'03'}</font><br>
<input type="radio" class="windowbg" name="setsel" value="1" $ssetsel1> <font size="2">$mdltxt{'04'}</font></td>
</tr><tr>
<td align="center" bgcolor="$color{'windowbg2'}" class="windowbg2">
<font size="2">$mdltxt{'02'}</font><br>
<textarea cols=30 rows=6 name="maildom">~;
$x=0;
foreach $i (@maildom) {
chomp $i;
if($x>0) {
$i =~ s~\t~~g;
if( $i !~ m~\A[\S|\s]*[\n\r]*\Z~) { next; }
$yymain .= "$i\n";
}
$x++;
}
$yymain .= qq~</textarea><br>
<input type=submit value="$txt{'10'}">
</form></td>
</tr>
</table>
~;
$yytitle = "$mdltxt{'01'}";
&template;
exit;
}
sub SetMaildom2 {
&is_admin;
$FORM{'maildom'} =~ tr/\r//d;
$FORM{'maildom'} =~ s~\A[\s\n]+~~;
$FORM{'maildom'} =~ s~[\s\n]+\Z~~;
$FORM{'maildom'} =~ s~\n\s*\n~\n~g;
my $setselc = $FORM{'setsel'} eq '1' ? '1' : '0';
fopen(FILE, ">$vardir/maildom.txt", 1);
print FILE "$setselc\n";
print FILE $FORM{'maildom'};
fclose(FILE);
$yySetLocation = qq~$cgi;action=admin~;
&redirectexit;
}
</add before>
<edit file>
Sources/Register.pl
</edit file>
<search for>
if ($allow_hide_email == 1) { $yymain .= qq~
<td><font class="text6"><input type=text maxlength="50" name=email size=40> <input type="checkbox" name="hideemail" value="checked" checked> $txt{'721'}</font></td>
~;
} else { $yymain .= qq~
<td><input type=text name=email size=30>
<BR><font class="text2a">$txt{'679'}</font></td>
~;
}
</search for>
<replace>
$setsel = 0;
$domsel = "";
if(-e ("$vardir/maildom.txt")) {
fopen(FILE, "$vardir/maildom.txt");
@maildom = <FILE>;
$maildomcnt = @maildom;
fclose(FILE);
chomp $maildom[0];
$setsel = $maildom[0];
if($setsel == 1 && $maildomcnt > 1) {
$domsel .= qq~ @ <select name="mdomsel"><option value=""></option>~;
for($i=1; $i<$maildomcnt; $i++) { $domsel .= qq~<option value="$maildom[$i]">$maildom[$i]</option>~; }
$domsel .= qq~</select>~;
}
}
if ($allow_hide_email == 1) { $yymain .= qq~
<td><font class="text6"><input type=text maxlength="50" name=email size=40>
~;
if($setsel == 1 && $maildomcnt > 1) {$yymain .= qq~$domsel<br>~;}
$yymain .= qq~
<input type="checkbox" name="hideemail" value="checked" checked> $txt{'721'}</font></td>
~;
} else { $yymain .= qq~
<td><input type=text name=email size=40>
~;
if($setsel == 1 && $maildomcnt > 1) {$yymain .= qq~$domsel~;}
$yymain .= qq~
<BR><font class="text2a">$txt{'679'}</font></td>
~;
}
</replace>
<search for>
&fatal_error("$txt{'240'} $txt{'69'} $txt{'241'}") if($member{'email'} !~ /[\w\-\.\+]+\@[\w\-\.\+]+\.(\w{2,4}$)/);
</search for>
<add before>
fopen(FILE, "$vardir/maildom.txt") || &fatal_error("$txt{'23'} maildom.txt");
@maildom = <FILE>;
$maildomcn = @maildom;
fclose(FILE);
chomp $maildom[0];
$getsel = $maildom[0];
if($getsel == 1 && $maildomcn > 1) {
$member{'email'} = qq~$member{'email'}@~;
$member{'email'} .= qq~$member{'mdomsel'}~;
}
($dummy, $memmaildom) = split(/\@/, $member{'email'});
$x=0;
$domcheck = $getsel;
foreach $chkmaildom (@maildom) {
chomp $chkmaildom;
if($x>0) {
if($getsel == 0) {
if($memmaildom =~ m/\Q$chkmaildom\E/ig) { $domcheck = 1; }
}
else {
if($memmaildom =~ m/\Q$chkmaildom\E/ig) { $domcheck = 0; }
}
}
$x++;
}
if($x==1) {$domcheck = 0}
# if($domcheck) { &fatal_error("$mdltxt{'05'} $memmaildom"); }
if($domcheck) { &fatal_error_email_domain(" <b>UserID :</b> $member{'username'}<br> <b>Email Address :</b> $member{'email'}<p><center><b><span style=\"font-size:8pt ; weight:bold ; font-family:Arial,Helvetica,sans-serif ; color:#006600\">Sorry, Your Domain Address <font color=\"#ff0000\"><b>$memmaildom</b></font> is not permitted at <b><font color=\"#800000\">fish</font><font color=\"#0000ff\">SA</font><font color=\"#000000\">.com</font></b>.</span></b></center>"); }
</add before>
<edit file>
Sources/SubList.pl
</edit file>
<search for>
'setcensor2',"AdminEdit.pl&SetCensor2",
</search for>
<add after>
'setmaildom',"Admin.pl&SetMaildom",
'setmaildom2',"Admin.pl&SetMaildom2",
</add after>