quote:
...I didnt hate perl so intensely...
Oi! I'll have to cure you of that.
1) Adding a simple (broken) floodcheck to the login process is simple. ultimatebb.cgi, find:
if ($ubb eq 'do_login') {Add under:
&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&floodcheck;Do note that this will block any multiple login attempts, even if the attempt will be successful, so expect users that make lots of typos to be very, very annoyed.
Locking an account is a few degrees more complex.
2) PDN uniqueness... Mm. Okay, this is somewhat easy.
First thought. Untested code.
ubb_registration.cgi. Find:
&CheckForExistingNames($lc_username);
&CheckForExistingNames($lc_public_name);
Add under:
if($lc_username eq $lc_public_name) {
&StandardHTML("Error message here");
}Replace "Error message here" with your error of choice, of course.
You'll note that there's no blank PDN check - that's because $lc_public_name will be equal to $lc_username if there's no PDN.
Now, for the profile edit form. Edit ubb_profile.cgi. Find:
Add under:
if(($lc_old_public_name ne $lc_new_public_name) && ($lc_new_public_name eq $lc_un)) {
&StandardHTML("Don't DO that!");
}Replace the error as required, etc, etc.
Again, this is untested code, written on the fly.
Now, a warning. We've found that many common usernames and PDNs are used over the life of a board. Users that choose two different names have twice the chance of hitting a reserved name. Users tend not to read the error message that tells them which of their names is taken, which will be a support issue for you.
3) Here's the calendar for 6.7:
https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/99.html 4) This is the hit hack for 6.4, which may well work in 6.7:
https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/18.html