diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 23:54:24 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 23:54:24 +0000 |
commit | 5b80dc83fdb6b7952e452a8eb2355005fdb5366c (patch) | |
tree | dc673bae45908b8169f91d973376d1f5ff56b833 /src/users.cpp | |
parent | c43805606f43b3b93e76ef9a250eb0ea367b980a (diff) |
Move some stuff from using userrec cached stuff to using stuff in the connect classes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8339 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/users.cpp b/src/users.cpp index a901552fd..c6ebcc848 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -179,7 +179,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance age = ServerInstance->Time(true); Penalty = 0; lines_in = lastping = signon = idle_lastmsg = nping = registered = 0; - ChannelCount = timeout = flood = bytes_in = bytes_out = cmds_in = cmds_out = 0; + ChannelCount = timeout = bytes_in = bytes_out = cmds_in = cmds_out = 0; OverPenalty = ExemptFromPenalty = muted = exempt = haspassed = dns_done = false; fd = -1; recvq.clear(); @@ -495,10 +495,10 @@ bool User::AddBuffer(std::string a) if (a.length()) recvq.append(a); - if (recvq.length() > (unsigned)this->recvqmax) + if (recvq.length() > (unsigned)this->MyClass->GetRecvqMax()) { this->SetWriteError("RecvQ exceeded"); - ServerInstance->WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); + ServerInstance->WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->MyClass->GetRecvqMax()); return false; } @@ -567,7 +567,7 @@ void User::AddWriteBuf(const std::string &data) if (*this->GetWriteError()) return; - if (sendq.length() + data.length() > (unsigned)this->sendqmax) + if (sendq.length() + data.length() > (unsigned)this->MyClass->GetSendqMax()) { /* * Fix by brain - Set the error text BEFORE calling writeopers, because @@ -575,7 +575,7 @@ void User::AddWriteBuf(const std::string &data) * to repeatedly add the text to the sendq! */ this->SetWriteError("SendQ exceeded"); - ServerInstance->WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); + ServerInstance->WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->MyClass->GetSendqMax()); return; } @@ -912,13 +912,8 @@ void User::CheckClass() 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(); this->MaxChans = a->GetMaxChans(); } |