]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Reset connect class settings on DNS resolution as we should.
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 6 Aug 2007 19:55:09 +0000 (19:55 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 6 Aug 2007 19:55:09 +0000 (19:55 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7680 e03df62e-2008-0410-955e-edbf42e46eb7

src/users.cpp

index cc01c3480d5b206782d68a572e19ea82c5964e97..cbf9de0cdcc8a038c0331b7ab08a9317f952e747 100644 (file)
@@ -923,16 +923,12 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
                return;
        }
 
+       /*
+        * Check connect class settings and initialise settings into userrec.
+        * This will be done again after DNS resolution. -- w00t
+        */
        New->CheckClass();
 
-       New->pingmax = i->GetPingTime();
-       New->nping = Instance->Time() + i->GetPingTime() + Instance->Config->dns_timeout;
-       New->timeout = Instance->Time() + i->GetRegTimeout();
-       New->flood = i->GetFlood();
-       New->threshold = i->GetThreshold();
-       New->sendqmax = i->GetSendqMax();
-       New->recvqmax = i->GetRecvqMax();
-
        Instance->local_users.push_back(New);
 
        if ((Instance->local_users.size() > Instance->Config->SoftLimit) || (Instance->local_users.size() >= MAXCLIENTS))
@@ -1032,6 +1028,14 @@ void userrec::CheckClass()
                ServerInstance->WriteOpers("*** WARNING: maximum GLOBAL connections (%ld) exceeded for IP %s", a->GetMaxGlobal(), this->GetIPString());
                return;
        }
+
+       this->pingmax = a->GetPingTime();
+       this->nping = ServerInstance->Time() + a->GetPingTime() + ServerInstance->Config->dns_timeout;
+       this->timeout = ServerInstance->Time() + a->GetRegTimeout();
+       this->flood = a->GetFlood();
+       this->threshold = a->GetThreshold();
+       this->sendqmax = a->GetSendqMax();
+       this->recvqmax = a->GetRecvqMax();
 }
 
 void userrec::FullConnect()