bans of different durations
I would like to be able to have a system to ban people for different durations, with the bans automatically expiring.
If there were a mechanism to keep notes on the reason for the bans that would be wonderful.
I'm guessing there isn't an add-on for this.
Can anyone point me in the right direction to get started with developing this it would be greatly appreciated.
0
Best Answer
-
peregrine MVP
the simple soulution would be to use the notes column in the ban table and assign names to groups there
short is 30 days, medium is 60 days, long is 90 days.
notes
short
med
longthen write a program that reads the table, convert the dates to seconds
pseudo code case short if today - (insert date + 30 * 24 * 60 *60) deleteban(id) case med if today - (insert date + 60 * 24 * 60 *60) case long if today - (insert date + 90 * 24 * 60 *60)
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
0
Answers
there is an option for notes on the reason in the 2.0.18.4 version.
To develop an expiration - there is a date inserted in the ban table.
what ever code you write could test whether the date inserted is 60 days old or what ever than it could remove the ban. You could also add a column to the ban table that would be a date offset based on the insert date, when that point is reached the ban would expire. I suppose you could write a little program the executes daily in cron to make the deletion in the ban table when the target is met. That's the extent of what I can suggest. There might be other ways, but this one possible solution.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
the simple soulution would be to use the notes column in the ban table and assign names to groups there
short is 30 days, medium is 60 days, long is 90 days.
notes
short
med
long
then write a program that reads the table, convert the dates to seconds
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Okay I was not being totally clear.
My mistake.
What I wanted to do was keep a ban history so Moderators can look over previous bans.
I think I will need a new table to manage this.
Think I will get to grips with this framework before I start doing anything like that.