Raised This Month: $51 Target: $400
 12% 

Feature Request Automatic upgrade to permanent ban after X number of previous bans


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 12-14-2016 , 17:03   Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #1

I think the title explains it all really. I would like to see a feature added where a players ban is automatically upgraded to a permanent ban if they reach a target number of bans.

So for example, on my servers we have a rule that your 6th ban is permanent, regardless of the reason. That means the first 5 aren't permanent (unless they are hacking), but ban number 6 always will be permanent.

At the moment this requires the admins to check the bans page to make sure the player is banned, and occasionally we have players reach 7th or 8th bans before someone realizes they should have been perma-banned before then.

All this feature would be is a way to automate the process.
__________________

Last edited by Werewolf_UK; 02-09-2017 at 05:09.
Werewolf_UK is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-19-2016 , 16:47   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #2

you can do this yourself with a mysql query
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 12-19-2016 , 16:58   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
you can do this yourself with a mysql query
If so, how would I go about setting that up?

Also even if it is possible to do, it wouldn't hurt to add the option to the front end so that people who don't know how to do this can do it too. And for the sake of convenience.
__________________

Last edited by Werewolf_UK; 12-19-2016 at 16:59.
Werewolf_UK is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 02-09-2017 , 05:10   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #4

Necro-bumping. Still looking for help with this.

Specifically, how would I set up a mysql query to do this?
__________________
Werewolf_UK is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 03-05-2017 , 14:44   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #5

Necro-Bumping again. See above posts.
__________________
Werewolf_UK is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 03-06-2017 , 05:56   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #6

Quote:
Originally Posted by sgt_phsco View Post
If so, how would I go about setting that up?
You should create a Trigger on Insert into the bans table. Just count the existing ban entries for that userid and change banlength to permanent if there are x-1 ban entries.

I haven't looked into the db structure of sb, so i can't give you the complete query.
good_live is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 03-08-2017 , 19:27   Re: Automatic upgrade to permanent ban after X number of previous bans
Reply With Quote #7

Finally got this working thanks to u/GeneralGrenade over on r/PHPhelp

Solution was to create a trigger with the following:
Code:
IF (SELECT COUNT(bid) FROM `sb_bans` WHERE authid = NEW.authid) > 4 THEN
SET NEW.length = 0;
SET NEW.reason = CONCAT(NEW.reason, ' - 6th ban so permanent');
END IF
__________________
Werewolf_UK is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode