Quote:
Originally Posted by sv1cec
Matt,
I am aware of this problem, it's just that I am not sure which is the best way to handle it. I assume that in some cases, leaving the code as it is, is a better option, in other cases, it's better to have a warning level above the limit, like when deleting warnings.
To do it the way you want (i.e. to work properly when removing a warning, as far as the rremoved points are concerned), find the following line:
PHP Code:
if($level>$warn_options['points_before_banned']){$level=$warn_options['points_before_banned'];}
and make it a comment by adding two // in the beginning. In other words, it should look like:
PHP Code:
//if($level>$warn_options['points_before_banned']){$level=$warn_options['points_before_banned'];}
Let me know if it works to your satisfaction.
----------
John
|
Hey John,
That brings up errors when someone is already one below the ban level and I try to warn them again (to bring them 1 above the ban level), SQL errors:
Code:
Database error in vBulletin 3.0.3:
Invalid SQL:
INSERT INTO vb3_userban
(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate)
VALUES
(5, 10, 10, 0, '', 1, 1096290247, 1096549448)
mysql error: Duplicate entry '5' for key 1
mysql error number: 1062
Date: Monday 27th of September 2004 08:04:08 AM
Script: http://www.observedtrials.net/vb/Warn.php
Referer: http://www.observedtrials.net/vb/Warn.php?do=WarnUser&id=5&post=73439
Username: Matt
IP Address: xx.xx.xx.xx
In the mean time I'm uncommenting it and I'm going to just make all warnings worth 1 point and make the ban level 3.
Matt