diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp index b3de2864d..665f62f48 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -696,7 +696,14 @@ Block *Conf::GetModule(const Anope::string &mname) } } - return GetModule(mname); + if (block == nullptr) + { + /* not found, create new block */ + auto it2 = blocks.emplace(mname, mname); + block = &it2->second; + } + + return block; } ServiceBot *Conf::GetClient(const Anope::string &cname) |