]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Use the remote channel's capitalization on a losing TS merge
[user/henk/code/inspircd.git] / src / users.cpp
index 5f495aafbfc8f5e65c993ee7e929a407018d311a..2bd96ac90fc5e7385a028db8822a8430efcc9e2e 100644 (file)
@@ -113,6 +113,8 @@ void LocalUser::StartDNSLookup()
        catch (CoreException& e)
        {
                ServerInstance->Logs->Log("USERS", DEBUG,"Error in resolver: %s",e.GetReason());
+               dns_done = true;
+               ServerInstance->stats->statsDnsBad++;
        }
 }
 
@@ -649,7 +651,7 @@ void OperInfo::init()
                        {
                                this->AllowedUserModes.set();
                        }
-                       else
+                       else if (*c >= 'A' && *c < 'z')
                        {
                                this->AllowedUserModes[*c - 'A'] = true;
                        }
@@ -661,7 +663,7 @@ void OperInfo::init()
                        {
                                this->AllowedChanModes.set();
                        }
-                       else
+                       else if (*c >= 'A' && *c < 'z')
                        {
                                this->AllowedChanModes[*c - 'A'] = true;
                        }
@@ -782,6 +784,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();
@@ -833,6 +836,8 @@ void LocalUser::FullConnect()
                this->GetServerPort(), this->nick.c_str(), this->ident.c_str(), this->host.c_str(), this->GetIPString(), this->fullname.c_str());
        ServerInstance->Logs->Log("BANCACHE", DEBUG, "BanCache: Adding NEGATIVE hit for %s", this->GetIPString());
        ServerInstance->BanCache->AddHit(this->GetIPString(), "", "");
+       // reset the flood penalty (which could have been raised due to things like auto +x)
+       CommandFloodPenalty = 0;
 }
 
 void User::InvalidateCache()
@@ -1625,9 +1630,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;
@@ -1709,6 +1714,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;
@@ -1717,7 +1725,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;
 }