Add bz_eReloadEvent API event
This PR will allow plug-ins to safely and easily hook into /reload and bz_reload*() events. This will also allow for custom /reload subcommands without needing to overload the /reload command.
The reason behind this change is to allow plugins to have custom reload functionality.
@jwmelto since the remaining comments are related, my thinking was that bz_eReloadEvent is sent as a notification event, so it'll only be sent when something actually happens (e.g. the masterban bailing out early).
As for the event.handled, I was thinking that we shouldn't let plug-ins take over built-in bzfs functionality but, we could allow plug-ins to hook into unknown reload events at which point, bzfs silences its failure messages. I know this goes against my original thought of having this event be notification-only. And having a handled could be misleading since you can't take over built-in functionality.
Whether the event should be fired before or after the action, I'm on the fence about.
Thoughts?
I don’t know enough to have an informed opinion. As long as the intent is clearly commented and consistent, I defer to those of you who write plugins.
Is the distinction between notification and overridable behavior prevalent? Should the event name reflect that, like bz_eReloadNotification?