MongooseIM
MongooseIM copied to clipboard
Spam control
This PR adds a spam control feature.
There are minor changes to ejabberd_c2s, which provide a way to write and attach a custom spam control plugin, which would process all messages and react if necessary. Includes a simple throughput-based plugin.
s/spam/spim/ ?
s/spam/overuse/ ? s/spam/load/ ?
As the name of the sample module, load or overload would be fine. But names of the hooks should be more generic - you can implement any type of spam protection, content-based, blacklisting senders, whatever, or even do useful stuff not related to spam at all.
"abuse" is even more generic than "spam". :)
On the other hand, one could use the same mechanism for rewarding users for clever things they say (if somebody invents an algorithm to tell clever things from stupid)