First of all I don't know the coding but I know it can be done as I have seen it on another server, it seems simple enough, just a command for users to ban other users from watching their battles, ex. /battleban [Player], a simple stop to that one annoying guy that trolls every battle, after getting muted in the chat, or just because he's annoyed over hax and wants to act like a child. Thanks guys!
If you want to ignore specs talking there is a ignore button. On top of that there is a Disallow specs clause
Disallow specs clause only works for non ranked matches, just saying. And ignore spectators should be enough for you, to 'ignore said annoying guy'. Also if you're being harassed you can ask the server authority for help if you feel the person is breaking any rules, spamming, being generally mean, whatever. Hope this helps.