X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=b884a4bc1689228832e319f3306e3f5cdd324f04;hb=1cb625e2a216704f9e59f2b9cfb2b0611e4f12f5;hp=a8a1ba6b3151b2489e76f01dcbfd2268375181fd;hpb=54f3d3f31e59774db9987a804bc867fc0d87e4a6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index a8a1ba6b3..b884a4bc1 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -209,12 +209,11 @@ void User::DecrementModes() User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance) { server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName); - reset_due = ServerInstance->Time(); age = ServerInstance->Time(); Penalty = 0; - lines_in = lastping = signon = idle_lastmsg = nping = registered = 0; + lastping = signon = idle_lastmsg = nping = registered = 0; bytes_in = bytes_out = cmds_in = cmds_out = 0; - quietquit = OverPenalty = ExemptFromPenalty = quitting = exempt = haspassed = dns_done = false; + quietquit = quitting = exempt = haspassed = dns_done = false; fd = -1; recvq.clear(); sendq.clear(); @@ -613,7 +612,7 @@ bool User::AddBuffer(const std::string &a) } } - if (this->MyClass && (recvq.length() > this->MyClass->GetRecvqMax())) + if (this->MyClass && !this->HasPrivPermission("users/flood/increased-buffers") && recvq.length() > this->MyClass->GetRecvqMax()) { ServerInstance->Users->QuitUser(this, "RecvQ exceeded"); ServerInstance->SNO->WriteToSnoMask('A', "User %s RecvQ of %lu exceeds connect class maximum of %lu",this->nick.c_str(),(unsigned long int)recvq.length(),this->MyClass->GetRecvqMax()); @@ -678,7 +677,7 @@ void User::AddWriteBuf(const std::string &data) if (this->quitting) return; - if (this->MyClass && (sendq.length() + data.length() > this->MyClass->GetSendqMax())) + if (this->MyClass && !this->HasPrivPermission("users/flood/increased-buffers") && sendq.length() + data.length() > this->MyClass->GetSendqMax()) { /* * Fix by brain - Set the error text BEFORE calling, because @@ -840,6 +839,7 @@ void User::UnOper() */ this->oper.clear(); + /* Remove all oper only modes from the user when the deoper - Bug #466*/ std::string moderemove("-"); @@ -850,12 +850,13 @@ void User::UnOper() moderemove += letter; } + std::vector parameters; parameters.push_back(this->nick); parameters.push_back(moderemove); ServerInstance->Parser->CallHandler("MODE", parameters, this); - + /* remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404 */ ServerInstance->Users->all_opers.remove(this); @@ -873,6 +874,7 @@ void User::UnOper() AllowedUserModes.reset(); AllowedChanModes.reset(); + this->modes[UM_OPERATOR] = 0; } }