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 /modules/extra/m_ssl.cpp | |
| 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 'modules/extra/m_ssl.cpp')
| -rw-r--r-- | modules/extra/m_ssl.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp index 5ecf30cfc..c64e04af5 100644 --- a/modules/extra/m_ssl.cpp +++ b/modules/extra/m_ssl.cpp @@ -107,8 +107,6 @@ class SSLModule : public Module if (!client_ctx || !server_ctx) throw ModuleException("Error initializing SSL CTX"); - this->OnReload(); - if (Anope::IsFile(this->certfile.c_str())) { if (!SSL_CTX_use_certificate_file(client_ctx, this->certfile.c_str(), SSL_FILETYPE_PEM) || !SSL_CTX_use_certificate_file(server_ctx, this->certfile.c_str(), SSL_FILETYPE_PEM)) @@ -175,19 +173,17 @@ class SSLModule : public Module SSL_CTX_free(server_ctx); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - - this->certfile = config.ReadValue("ssl", "cert", "data/anope.crt", 0); - this->keyfile = config.ReadValue("ssl", "key", "data/anope.key", 0); + this->certfile = reader.ReadValue("ssl", "cert", "data/anope.crt", 0); + this->keyfile = reader.ReadValue("ssl", "key", "data/anope.key", 0); } void OnPreServerConnect() anope_override { - ConfigReader config; + ConfigReader reader; - if (config.ReadFlag("uplink", "ssl", "no", Anope::CurrentUplink)) + if (reader.ReadFlag("uplink", "ssl", "no", Anope::CurrentUplink)) { this->service.Init(UplinkSock); } |
