If you have ever heard of R9K mode on twitch you will know pretty much the idea of this plugin. It logs the past set amount of messages and when somebody types a message it will check how similar the message is compared to the logged messages, if the similarity is over a set percentage the message will not be sent.
You are able to configure the minimum length of the message to check, How similar the message has to be, how many messages to log, and what commands to log.
If you would like to reload the config values type /R9K reload with the permissions r9k.reload.
This plugin is open source and can be viewed on github
Note: This is just a proof on concept, most of the job is on the administrator to configure the plugin correctly. If you have any ideas on how to improve this idea I'll be more than happy to consider and implement them.