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:
@@ -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?");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user