summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-06 19:55:09 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-06 19:55:09 +0000
commit3ad71f159347ce2b031ac3a173b9fbb825c8e55a (patch)
treec00a025b8f78c9eb9d6eff30169375a90edca8a3 /src
parent08e458938aa4a566f88e07f1ce35548f59dbe5f3 (diff)
Reset connect class settings on DNS resolution as we should.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7680 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp
index cc01c3480..cbf9de0cd 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -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()