As Adriano mentioned above, you're better off doing something like this at the server level.
It's possible to write a custom modification for it, but the user would still hit the server, start a request on Invision Community, run queries, use more server resources, etc. If you handle it at the server level they'll be blocked much faster and use fewer resources overall.