]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Merge guestpattern fix by peaveydk
[user/henk/code/inspircd.git] / src / users.cpp
index 94b969ca08af2a65defd3f0cc19c0be1cfe1c4b3..796893be6ae593fc31a064a97c02bb8b4acf0766 100644 (file)
@@ -281,10 +281,9 @@ userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
        
        for (unsigned int n = 0; n < MAXCHANS; n++)
        {
-               ucrec* x = new ucrec();
-               chans[n] = x;
-               x->channel = NULL;
-               x->uc_modes = 0;
+               chans[n] = new ucrec();
+               chans[n]->channel = NULL;
+               chans[n]->uc_modes = 0;
        }
 }
 
@@ -1134,8 +1133,11 @@ void userrec::FullConnect(CullList* Goners)
         * changes dont go out onto the network and produce 'fake direction'.
         */
        FOREACH_MOD(I_OnUserConnect,OnUserConnect(this));
-       FOREACH_MOD(I_OnPostConnect,OnPostConnect(this));
+
        this->registered = REG_ALL;
+
+       FOREACH_MOD(I_OnPostConnect,OnPostConnect(this));
+
        ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d: %s!%s@%s [%s]", this->GetPort(), this->nick, this->ident, this->host, this->GetIPString());
 }