From 55af9ec0a98e7149989a4d95c3626bb4e02a7b91 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 25 Jul 2015 18:09:52 +0200 Subject: [PATCH] don't +b if banlist is full @ chanmode +f textflood kickban --- src/modules/chanmodes/floodprot.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/chanmodes/floodprot.c b/src/modules/chanmodes/floodprot.c index 730c627ea..bc9283121 100644 --- a/src/modules/chanmodes/floodprot.c +++ b/src/modules/chanmodes/floodprot.c @@ -1071,11 +1071,13 @@ int check_for_chan_flood(aClient *sptr, aChannel *chptr) if (banthem) { /* ban. */ sprintf(mask, "*!*@%s", GetHost(sptr)); - add_listmode(&chptr->banlist, &me, chptr, mask); - sendto_server(&me, 0, 0, ":%s MODE %s +b %s 0", - me.name, chptr->chname, mask); - sendto_channel_butserv(chptr, &me, - ":%s MODE %s +b %s", me.name, chptr->chname, mask); + if (add_listmode(&chptr->banlist, &me, chptr, mask) == 0) + { + sendto_server(&me, 0, 0, ":%s MODE %s +b %s 0", + me.name, chptr->chname, mask); + sendto_channel_butserv(chptr, &me, + ":%s MODE %s +b %s", me.name, chptr->chname, mask); + } /* else.. ban list is full */ } sendto_channel_butserv(chptr, &me, ":%s KICK %s %s :%s", me.name,