Quote:
Originally Posted by Chris.08i
I had an adaptation of mine that I have been using for the past couple days that have been working for me.
I have changed over to your code as it's much neater! Thank you again Mark for your time and help!
I was wondering if it was possible to only trigger the above deduction when an actual point is issued, and no deduction for warnings?
|
Do you mean then a deduction based only on the points being issued at the time, and not on the cumulative total of active points? If so, I would have to investigate to see how to retrieve that value.
The code I posted does exactly the opposite of that...it uses $userinfo['ipoints'] which does not include the points currently being given, but rather the number of points accumulated by the user before the current infraction.
edit: Try using the hook location "infraction_update_complete", and at that hook, the points for the current infraction is in $vbulletin->GPC['points']. Then you can base the rep deduction on that and update the user table.