First, add $SelfBan? to the configuration variables list at the top of the file.
Add the following two lines to DoOtherRequest.
} elsif( $action eq $SelfBan ) {
&DoSelfBan();
Add the following function
sub DoSelfBan {
print "Content-type: text/plain\n\n";
print "Congratulations, you have banned your own IP!";
my $banlist = ReadFile("$DataDir/banlist");
my $date = &TimeToText($Now);
$banlist .= "# self-ban on $date\n^$ENV{REMOTE_ADDR}\n\n";
WriteStringToFile("$DataDir/banlist", $banlist );
}
-- SunirShah