]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Restore prefix
[user/henk/code/inspircd.git] / src / users.cpp
index f6010bf38b4fb7c7331742640076a13ffa2561b8..5ff890fd7f1072e3e09e0f971e2c88c97d46f68a 100644 (file)
@@ -513,9 +513,6 @@ eol_found:
                if (user->quitting)
                        return;
        }
-       // Add pseudo-penalty so that we continue processing after sendq recedes
-       if (user->CommandFloodPenalty == 0 && getSendQSize() >= sendqmax)
-               user->CommandFloodPenalty++;
        if (user->CommandFloodPenalty >= penaltymax && !user->MyClass->fakelag)
                ServerInstance->Users->QuitUser(user, "Excess Flood");
 }
@@ -651,7 +648,7 @@ void OperInfo::init()
                        {
                                this->AllowedUserModes.set();
                        }
-                       else
+                       else if (*c >= 'A' && *c < 'z')
                        {
                                this->AllowedUserModes[*c - 'A'] = true;
                        }
@@ -663,7 +660,7 @@ void OperInfo::init()
                        {
                                this->AllowedChanModes.set();
                        }
-                       else
+                       else if (*c >= 'A' && *c < 'z')
                        {
                                this->AllowedChanModes[*c - 'A'] = true;
                        }
@@ -784,6 +781,7 @@ void LocalUser::FullConnect()
         * may put the user into a totally seperate class with different restrictions! so we *must* check again.
         * Don't remove this! -- w00t
         */
+       MyClass = NULL;
        SetClass();
        CheckClass();
        CheckLines();
@@ -1629,9 +1627,9 @@ void LocalUser::SetClass(const std::string &explicit_name)
                                        continue;
                        }
 
-                       if (regdone && !c->config->getString("pass").empty())
+                       if (regdone && !c->config->getString("password").empty())
                        {
-                               if (ServerInstance->PassCompare(this, c->config->getString("pass"), password, c->config->getString("hash")))
+                               if (ServerInstance->PassCompare(this, c->config->getString("password"), password, c->config->getString("hash")))
                                {
                                        ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Bad password, skipping");
                                        continue;
@@ -1713,6 +1711,9 @@ ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask, cons
 
 void ConnectClass::Update(const ConnectClass* src)
 {
+       config = src->config;
+       type = src->type;
+       fakelag = src->fakelag;
        name = src->name;
        registration_timeout = src->registration_timeout;
        host = src->host;
@@ -1721,7 +1722,9 @@ void ConnectClass::Update(const ConnectClass* src)
        hardsendqmax = src->hardsendqmax;
        recvqmax = src->recvqmax;
        penaltythreshold = src->penaltythreshold;
+       commandrate = src->commandrate;
        maxlocal = src->maxlocal;
        maxglobal = src->maxglobal;
+       maxchans = src->maxchans;
        limit = src->limit;
 }