1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 20:16:38 +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
@@ -289,6 +289,7 @@ private:
public:
ModuleJSONRPC(const Anope::string &modname, const Anope::string &creator)
: Module(modname, creator, EXTRA | VENDOR)
, httpref(HTTP_PROVIDER)
, jsonrpcinterface(this)
{
}
@@ -307,7 +308,7 @@ public:
const auto &modconf = conf.GetModule(this);
JSONRPCServiceInterface::integer_bits = modconf.Get<unsigned>("integer_bits", "64");
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?");