Warning Points issue
Opened this issue ยท 3 comments
I noticed a problem with BanManager and warning points today.
Issuing a warning with -p 5 will NOT punish the player in any way with the config below.
Using -p 4 will work just fine and tempban the player.
Does the player have to reach exactly the value specified in the config or is it acting like a threshold?
(if player reaches or goes above said value)
I have the following config:
'2':
- cmd: "kick [player] You have received too many warnings. \n Last: [reason]"
'4':
- cmd: "tempban [player] 2h You have received too many warnings. \n Last: [reason]"
'6':
- cmd: "tempban [player] 12h You have received too many warnings. \n Last: [reason]"
- cmd: "tempmute [player] 16h You have received too many warnings. \n Last: [reason]"
'8':
- cmd: "tempban [player] 3d You have received too many warnings. \n Last: [reason]"
- cmd: "tempmute [player] 4d You have received too many warnings. \n Last: [reason]"
'9':
- cmd: "m [player] This is your &n&olast warning&r! Next time you will be permanently banned!"
'10':
- cmd: "ban [player] breaking the rules too many times. \n Last: [reason]"
I presume the expected behaviour would for commands 2 and 4 to be executed when giving a warning of 5 points (assuming the player in question has 0 prior warning points)?
It expects the player to reach the total point value specified in the config.
Actually just the highest one which is either lower or the exact same value as the user's current points.
7 points should execute '6', 5 should execute '4' and so on.
I've thought of those '#' as a threshold.
I think I didn't exactly explain the issue correctly, hope this helps if I confused you:
I'd like to add that in a setup like
'2':
- Do something
'6':
- Do another thing
it should only execute '2' when he reaches either 2 or more points, but not when going from 2 to 3 points or from 4 to 5.
It'd have to check if going from pointsBefore* to pointsAfter* crosses or reaches any of the specified "thresholds", since only checking for pointsAfter* would trigger '2' again when going from 3 to 4 points.
*not an actual thing, of course
Another example:
'1':
- kick <player> <reason>
'2'
- tempban <player> <time> <reason>
'4':
- ban <player> <reason>
Starting at 0 points:
+ 1 point: kick player, reached threshold '1'
+ 1 point: tempban player, reached threshold '2'
+ 1 point: **do nothing**, did NOT reach or cross any threshold
+ 1 point: ban player, reached threshold '4'
Starting again at 0 points:
+ 3 points: tempban player, crossed threshold '2'
Starting at 0 points:
+ 1 point: kick player, reached threshold '1'
+ 2 points: tempban player, crossed threshold '2'