Nope, i was wrong. It's in cp_lib.cgi under sub CheckPermission_CP.
Make sure you have this:
if (($profile[8] ne 'Administrator') && ($profile[8] ne 'Moderator') && ($profile[8] ne 'MegaModerator')) {
print qq%Content-type: text/htmlnn%;
&AppendAdminLog($username, $status, "Log In", "Failed", "User is NOT an Admin or Mod");
&StandardHTML("Sorry, you are not an administrator or moderator, so you may not gain access to the control panel.");
}
Under this:
if ($public_name eq "") {
$public_name = $profile[0];
}
and above this:
#return status
&AppendAdminLog($username, $status, "Log In", "Succeeded", "User is a $profile[8]");
Again, this won't work on versions in the 6.0.x series.