- Edited
Requests: Maybe look at blocking registration of usernames containing words on that list? Or a separate list (e.g. you might want to block someone from registering with admin in their name, but not restrict someone from writing admin in their post).
As for moderator emails, I wouldn't do that (because you could cause a site to be tagged a spammer by submitting multiple posts with filtered words on purpose and triggering emails). It'd be better to inform users as they try to post instead with a red error bar, and not let the post be submitted. Or tap into the Approval mod to auto-unapprove any post that the filter flags, Flag it and let moderators choose to approve it or delete it.
Btw, you should also require flarum-ext-flags in your composer.json if you're going to use Flags.
EDIT (and quoting to save time and properly source my answer):
luceos you can check if an extension is enabled by loading ExtensionManager in your code via IoC, an example of such an implementation:
https://github.com/flagrow/byobu/blob/7c2677b158d58bab75bacbb1b37cfb4f02b8deee/src/Traits/ProvidesAccess.php#L39
https://github.com/flagrow/byobu/blob/7c2677b158d58bab75bacbb1b37cfb4f02b8deee/src/Access/DiscussionPolicy.php#L27Or you can ioc bind the Flarum Settings Repository and read the right field related to the extensions installed.
You might want to check that Approval and Flags are enabled before calling their actions, too, just to stop errors.