The Table already keeps a count of private messages on user basis (Received and Sent).
Admin imposed entry would perhaps go in Config/Data.pm
So the Control could be:
Sender : Gets the error message when he initiates the Send PM (recepient still not selected) in case he is over quota or if the recepient is known (for a case where sender cliecks Send PM from users' details page) at this stage and if the recepient is over quota then the error message wrt recepient is displayed. This would Warn a user much before the Message Composing Starts.
A user would still try to test it out, Compose a Message and Try to Send ... Error Message (combination of the above whichever applies) and Message delivery not completed if either or is satisfied. Some PRE Hook on do=message :)
Additional user column becomes necessary in case you plan to add userwise limit setting...
HyTC
Admin imposed entry would perhaps go in Config/Data.pm
So the Control could be:
Sender : Gets the error message when he initiates the Send PM (recepient still not selected) in case he is over quota or if the recepient is known (for a case where sender cliecks Send PM from users' details page) at this stage and if the recepient is over quota then the error message wrt recepient is displayed. This would Warn a user much before the Message Composing Starts.
A user would still try to test it out, Compose a Message and Try to Send ... Error Message (combination of the above whichever applies) and Message delivery not completed if either or is satisfied. Some PRE Hook on do=message :)
Additional user column becomes necessary in case you plan to add userwise limit setting...
HyTC