]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
This conflicted a few hours ago apparantly (????)
[user/henk/code/inspircd.git] / src / users.cpp
index 82d11eb34ecf6dcd3df2481f945cb86768ef5ac5..db23d5672219799857e99d67e84cdc1d7d6fff4c 100644 (file)
@@ -1715,8 +1715,6 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
        }
        else
        {
-               ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Total classes: %d", ServerInstance->Config->Classes.size());
-
                for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++)
                {
                        ConnectClass* c = *i;
@@ -1730,6 +1728,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 (((!match(this->GetIPString(),c->GetHost(),true)) && (!match(this->host,c->GetHost()))))
                        {
@@ -1747,13 +1752,6 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
                                continue;
                        }
 
-                       /* if it's disabled, we can't match this one. */
-                       if (c->GetDisabled())
-                       {
-                               ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Class disabled");
-                               continue;
-                       }
-
                        /* if it requires a port ... */
                        if (c->GetPort())
                        {