summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-24 12:18:46 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-24 12:18:46 +0200
commita2860d06e429f35a4bacf4ea8a01eeeed1472285 (patch)
tree3e3402b655a8539afd0405e808e72695ce8d9e60
parenta3d2b4475708520207d95d66a6ecd5a35e176ab9 (diff)
Remove now needless dynref_init_complete
ModuleManager is constructed when ServerInstance is non-NULL, test that instead
-rw-r--r--src/modules.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 9ca33e2dd..edcb243e2 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -33,11 +33,9 @@
#endif
static intrusive_list<dynamic_reference_base>* dynrefs = NULL;
-static bool dynref_init_complete = false;
void dynamic_reference_base::reset_all()
{
- dynref_init_complete = true;
if (!dynrefs)
return;
for (intrusive_list<dynamic_reference_base>::iterator i = dynrefs->begin(); i != dynrefs->end(); ++i)
@@ -674,7 +672,9 @@ dynamic_reference_base::dynamic_reference_base(Module* Creator, const std::strin
if (!dynrefs)
dynrefs = new intrusive_list<dynamic_reference_base>;
dynrefs->push_front(this);
- if (dynref_init_complete)
+
+ // Resolve unless there is no ModuleManager (part of class InspIRCd)
+ if (ServerInstance)
resolve();
}