I've got a question, when a user is banned by having warnings, how are they banned? I don't wish for them to have their account removed and such, so I have a request

:
I've created a new usergroup called "Banned" which's userid=9
Is it possible for some custom code be made for me so when they've received maximum warnings, they go into the banned usergroup instead?