diff --git a/Changes b/Changes index c2b95ff3e..38cf156e0 100644 --- a/Changes +++ b/Changes @@ -2150,3 +2150,4 @@ - Fix ordering of ``9. FAQ'' and ``10. Modules'' in HTML docs. - Always display the real host of successful OPERing up. Reported by Josh. (#3950) +- Fixed braindamage in stacked bans. diff --git a/src/extbans.c b/src/extbans.c index 4541ffdda..b634ab83e 100644 --- a/src/extbans.c +++ b/src/extbans.c @@ -327,11 +327,13 @@ int extban_is_ok_nuh_extban(aClient* sptr, aChannel* chptr, char* para, int chec return 0; /* Don't add unknown extbans. */ } /* Now we have to ask the stacked extban if it's ok. */ - extban_is_ok_recursion++; - isok = p->is_ok; - extban_is_ok_recursion--; - if (isok) - return p->is_ok(sptr, chptr, mask, checkt, what, what2); + if (p->is_ok) + { + extban_is_ok_recursion++; + isok = p->is_ok(sptr, chptr, mask, checkt, what, what2); + extban_is_ok_recursion--; + return isok; + } } return 1; /* Either not an extban, or extban has NULL is_ok. Good to go. */ }