Script that bans people that type something in console

So as the title says i just need a script that bans people if they say a phrase in console. There is an addon i have and it has no restrictions and players are abusing it. What would I use to detect if someone says something in console?

You’d be better off fixing the addon.

Maybe you should add restrictions then, like IsAdmin or IsSuperAdmin. Banning people won’t help.

It would be helpful to know what the addon is as well