summaryrefslogtreecommitdiff
path: root/modules/m_xmlrpc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-01-10 15:37:49 -0500
committerAdam <Adam@anope.org>2015-01-10 15:37:49 -0500
commit3055b7272b1cc4d4099e639932d8b84ccef36a37 (patch)
tree37e9d64332284bb157e500c2b44b6c908488ed15 /modules/m_xmlrpc.cpp
parent969cd5dd6cac1bc702d5d1379f7bf54c1aadc6c4 (diff)
Fix m_xmlrpc server configuration option
Diffstat (limited to 'modules/m_xmlrpc.cpp')
-rw-r--r--modules/m_xmlrpc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/m_xmlrpc.cpp b/modules/m_xmlrpc.cpp
index 36401b800..1d08bed43 100644
--- a/modules/m_xmlrpc.cpp
+++ b/modules/m_xmlrpc.cpp
@@ -162,11 +162,8 @@ class ModuleXMLRPC : public Module
MyXMLRPCServiceInterface xmlrpcinterface;
ModuleXMLRPC(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR),
- httpref("HTTPProvider", "httpd/main"), xmlrpcinterface(this, "xmlrpc")
+ xmlrpcinterface(this, "xmlrpc")
{
- if (!httpref)
- throw ModuleException("Unable to find http reference, is m_httpd loaded?");
- httpref->RegisterPage(&xmlrpcinterface);
}
@@ -178,7 +175,12 @@ class ModuleXMLRPC : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
+ if (httpref)
+ httpref->UnregisterPage(&xmlrpcinterface);
this->httpref = ServiceReference<HTTPProvider>("HTTPProvider", conf->GetModule(this)->Get<const Anope::string>("server", "httpd/main"));
+ if (!httpref)
+ throw ConfigException("Unable to find http reference, is m_httpd loaded?");
+ httpref->RegisterPage(&xmlrpcinterface);
}
};