summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 20:20:36 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 20:20:36 +0000
commit03541204fcd4a47916e97836d60944b1abb632c2 (patch)
tree96ae21a0277b79df550bf9fa553b29ceeba087a7 /src
parent785a03fdc67088743c970e75e1a28e245e897be1 (diff)
Blah
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1053 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 057291a84..83b72cba5 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -3424,6 +3424,7 @@ bool UnloadModule(const char* filename)
if (*t == NULL)
{
factory.erase(t);
+ factory.push_back(NULL);
break;
}
}
@@ -3442,6 +3443,7 @@ bool UnloadModule(const char* filename)
if (*m == NULL)
{
modules.erase(m);
+ modules.push_back(NULL);
break;
}
}
@@ -3519,31 +3521,15 @@ bool LoadModule(const char* filename)
return false;
}
}
- bool extended = false;
- while (factory.size() <= MODCOUNT+1)
- {
- factory.push_back(NULL); // make an empty space
- log(DEFAULT,"Extending factory[]");
- bool extended = true;
- }
ircd_module* a = new ircd_module(modfile);
factory[MODCOUNT+1] = a;
if (factory[MODCOUNT+1]->LastError())
{
log(DEFAULT,"Unable to load %s: %s",modfile,factory[MODCOUNT+1]->LastError());
snprintf(MODERR,MAXBUF,"Loader/Linker error: %s",factory[MODCOUNT+1]->LastError());
- if (extended)
- factory.erase(factory.end());
MODCOUNT--;
return false;
}
- bool mextended = false;
- while (modules.size() <= MODCOUNT+1)
- {
- modules.push_back(NULL);
- log(DEFAULT,"Extending modules[]");
- bool mextended = true;
- }
if (factory[MODCOUNT+1]->factory)
{
Module* m = factory[MODCOUNT+1]->factory->CreateModule();
@@ -3556,10 +3542,6 @@ bool LoadModule(const char* filename)
{
log(DEFAULT,"Unable to load %s",modfile);
snprintf(MODERR,MAXBUF,"Factory function failed!");
- if (extended)
- factory.erase(factory.end());
- if (mextended)
- modules.erase(modules.end());
return false;
}
}