]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
More fixes
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 11 Apr 2005 19:02:53 +0000 (19:02 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 11 Apr 2005 19:02:53 +0000 (19:02 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1048 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspircd.cpp

index ea3feb304bb81f6d861521f507c9cc9123f56d5e..4cf4bd334dce2f2b03c3008e6a081db8fe2ddfed 100644 (file)
@@ -3520,13 +3520,14 @@ bool LoadModule(const char* filename)
                        }
                }
                bool extended = false;
-               if (factory.size() < MODCOUNT+1)
+               while (factory.size() <= MODCOUNT+1)
                {
                        factory.push_back(NULL);        // make an empty space
+                       log(DEFAULT,"Extending factory[]");
                        bool extended = true;
                }
-
-                factory[MODCOUNT+1] = new ircd_module(modfile);
+               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());
@@ -3539,9 +3540,10 @@ bool LoadModule(const char* filename)
                 if (factory[MODCOUNT+1]->factory)
                 {
                        bool mextended = false;
-                       if (modules.size() < MODCOUNT+1)
+                       while (modules.size() < MODCOUNT+1)
                        {
                                modules.push_back(NULL);
+                               log(DEFAULT,"Extending modules[]");
                                bool extended = true;
                        }
                         modules[MODCOUNT+1] = factory[MODCOUNT+1]->factory->CreateModule();