]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
When loading, dont try and free the qa modes, we havent allocated them yet
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Oct 2006 15:44:30 +0000 (15:44 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Oct 2006 15:44:30 +0000 (15:44 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5555 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_chanprotect.cpp

index a074ef1274779efdd6754642cb3971244d521b5e..060f81eb9add0d68962ff38b67383d78456ca091 100644 (file)
@@ -278,6 +278,7 @@ class ModuleChanProtect : public Module
        
        bool FirstInGetsFounder;
        bool QAPrefixes;
+       bool booting;
        ChanProtect* cp;
        ChanFounder* cf;
        char* dummyptr;
@@ -287,7 +288,9 @@ class ModuleChanProtect : public Module
        ModuleChanProtect(InspIRCd* Me) : Module::Module(Me)
        {       
                /* Load config stuff */
+               booting = true;
                OnRehash("");
+               booting = false;
 
                /* Initialise module variables */
 
@@ -335,7 +338,7 @@ class ModuleChanProtect : public Module
                 * If so, remove all instances of the mode, and reinit
                 * the module with prefixes enabled.
                 */
-               if (old_qa != QAPrefixes)
+               if ((old_qa != QAPrefixes) && (!booting))
                {
                        ServerInstance->Modes->DelMode(cp);
                        ServerInstance->Modes->DelMode(cf);