1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 02:56:37 +02:00

Rework the interface for service references.

This commit is contained in:
Sadie Powell
2026-01-10 21:23:23 +00:00
parent 25cd6c96e3
commit bfb47ab5a6
14 changed files with 82 additions and 55 deletions
+2 -1
View File
@@ -291,6 +291,7 @@ private:
public:
ModuleXMLRPC(const Anope::string &modname, const Anope::string &creator)
: Module(modname, creator, EXTRA | VENDOR)
, httpref(HTTP_PROVIDER)
, xmlrpcinterface(this)
{
xmlrpc_env env;
@@ -325,7 +326,7 @@ public:
XMLRPCServiceInterface::enable_i8 = modconf.Get<bool>("enable_i8", "yes");
XMLRPCServiceInterface::enable_nil = modconf.Get<bool>("enable_nil", "yes");
this->httpref = ServiceReference<HTTP::Provider>(HTTP_PROVIDER, modconf.Get<const Anope::string>("server", "httpd/main"));
this->httpref.SetServiceName(modconf.Get<const Anope::string>("server", "httpd/main"));
if (!httpref)
throw ConfigException("Unable to find http reference, is httpd loaded?");