]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Forward decl
[user/henk/code/inspircd.git] / src / users.cpp
index dbe1799893bd17b54c9e86b8919fed9ac32534fe..5f61ce1df58ca7a4c0bf99e9a17b5e3ccf5c3f29 100644 (file)
@@ -833,7 +833,8 @@ void User::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, in
        New->exempt = (Instance->XLines->matches_exception(New) != NULL);
        if (!New->exempt)
        {
-               ZLine* r = Instance->XLines->matches_zline(ipaddr);
+               ZLine* r = Instance->XLines->matches_zline(New);
+
                if (r)
                {
                        char reason[MAXBUF];
@@ -1763,7 +1764,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
        if (found)
        {
                /* deny change if change will take class over the limit */
-               if (found->RefCount + 1 >= found->limit)
+               if (found->limit && (found->RefCount + 1 >= found->limit))
                {
                        ServerInstance->Log(DEBUG, "OOPS: Connect class limit (%u) hit, denying", found->limit);
                        return this->MyClass;