Looking quickly at the code, I can’t believe this a no action hook when a post is spammed or a user is bozoed. Bad planning. So we can’t make a plugin for that directly. But we could periodically scan for both situations, or check after every post is done.
Actually what I want is more fancy, an internal popup alert system when certain actions have occurred so email isn’t even needed and is just optional. As you are browsing your site, you’d find out instantly if something like that happened and given a link to look at/take care of it. Plugin authors would be able to add to the alert queue instead of just emailing. Both mods and admin could be alerted individually based on situations.
Now that’s a pretty cool idea too.
Actually, it would be fairly easy to do.
All we need to do is hook into the header or footer.
The service would be passed a user_id, the message, and an action url. Optionally instead of a user_id, it could be the term “administrator” or “moderator” where it would alert all at that level.
The box would have a close button to ignore it and all the messages would then be accessible as a list under your profile under a new tab.
You’d have an option to be emailed anytime an alert was generated but typically you can keep that off unless you don’t visit the site often.
I was going to do this for my “report this post” plugin but I really needed the report feature right away so I got lazy and just used email.
Sounds like I have a new plugin to code next weekend.