]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Fix a number of commands to have max_params field. This means in practice, that colon...
[user/henk/code/inspircd.git] / src / users.cpp
index 2b6e00e0e4ec79746dbce34ea2b672311d977767..bb427523ab31035c45c3243640283b5155a16a17 100644 (file)
@@ -1672,9 +1672,10 @@ bool User::ChangeDisplayedHost(const char* shost)
                FOREACH_RESULT(I_OnChangeLocalUserHost,OnChangeLocalUserHost(this,shost));
                if (MOD_RESULT)
                        return false;
-               FOREACH_MOD(I_OnChangeHost,OnChangeHost(this,shost));
        }
 
+       FOREACH_MOD(I_OnChangeHost, OnChangeHost(this,shost));
+
        int MOD_RESULT = 0;
        FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));
 
@@ -1830,6 +1831,9 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
                {
                        ConnectClass* c = *i;
 
+                       if (c->GetDisabled())
+                               continue; // can't possibly match, removed from conf
+
                        if (explicit_name == c->GetName())
                        {
                                ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Explicitly set to %s", explicit_name.c_str());
@@ -1852,6 +1856,13 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
                                ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "DENY %s %d %s", c->GetHost().c_str(), c->GetPort(), c->GetName().c_str());
                        }
 
+                       /* if it's disabled, we can't match this one. */
+                       if (c->GetDisabled())
+                       {
+                               ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Class disabled");
+                               continue;
+                       }
+
                        /* check if host matches.. */
                        if (!InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && 
                            !InspIRCd::MatchCIDR(this->host, c->GetHost(), NULL))