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];
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;