mirror of
https://github.com/anope/anope.git
synced 2026-07-04 03:23:13 +02:00
Get rid of the internal block wrapper.
This only existed for compatibility with old 2.0 modules and 2.1 has already broken compatibility with them.
This commit is contained in:
@@ -1554,7 +1554,7 @@ public:
|
||||
flags.clear();
|
||||
for (int i = 0; i < Config->CountBlock("privilege"); ++i)
|
||||
{
|
||||
Configuration::Block &priv = Config->GetBlock("privilege", i);
|
||||
const auto &priv = Config->GetBlock("privilege", i);
|
||||
const Anope::string &name = priv.Get<const Anope::string>("name");
|
||||
const Anope::string &value = priv.Get<const Anope::string>("flag");
|
||||
if (!name.empty() && !value.empty())
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
|
||||
void OnReload(Configuration::Conf &conf) override
|
||||
{
|
||||
Configuration::Block &block = conf.GetModule(this);
|
||||
const auto &block = conf.GetModule(this);
|
||||
this->redis = ServiceReference<Provider>("Redis::Provider", block.Get<const Anope::string>("engine", "redis/main"));
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
void OnReload(Configuration::Conf &conf) override
|
||||
{
|
||||
Configuration::Block &block = conf.GetModule(this);
|
||||
const auto &block = conf.GetModule(this);
|
||||
this->sql = ServiceReference<Provider>("SQL::Provider", block.Get<const Anope::string>("engine"));
|
||||
this->prefix = block.Get<const Anope::string>("prefix", "anope_db_");
|
||||
this->import = block.Get<bool>("import");
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
void OnReload(Configuration::Conf &conf) override
|
||||
{
|
||||
Configuration::Block &block = conf.GetModule(this);
|
||||
const auto &block = conf.GetModule(this);
|
||||
this->SQL = ServiceReference<Provider>("SQL::Provider", block.Get<const Anope::string>("engine"));
|
||||
this->prefix = block.Get<const Anope::string>("prefix", "anope_db_");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user