diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
commit | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch) | |
tree | 43162205d31b277c9ff12ee28b7e3a60d6382316 /include/modules.h | |
parent | 207c46c871e85b55ae66acc456c6bc412c0c79f9 (diff) |
Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h index ae7ceb651..20d27b0ab 100644 --- a/include/modules.h +++ b/include/modules.h @@ -112,6 +112,8 @@ if (true) \ else \ static_cast<void>(0) +class ConfigReader; + /** Possible return types from events. */ enum EventReturn @@ -124,7 +126,6 @@ enum EventReturn enum ModuleReturn { MOD_ERR_OK, - MOD_ERR_MEMORY, MOD_ERR_PARAMS, MOD_ERR_EXISTS, MOD_ERR_NOEXIST, @@ -285,9 +286,12 @@ class CoreExport Module : public Extensible */ virtual void OnUserKicked(Channel *c, User *target, MessageSource &source, const Anope::string &kickmsg) { } - /** Called when Services' configuration has been loaded. + /** Called when Services' configuration is being (re)loaded. + * @param conf The config that is being built now and will replace the global Config object + * @param reader A config reader for conf + * @throws A ConfigException to abort the config (re)loading process. */ - virtual void OnReload() { } + virtual void OnReload(ServerConfig *conf, ConfigReader &reader) { } /** Called before a bot is assigned to a channel. * @param sender The user assigning the bot |