X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/7b0150f8ee4d699706369f3f1d1304bcd20e7f06..8dc0685213ead3f8896c83cadc130143ccc4d181:/src/chanserv.c diff --git a/src/chanserv.c b/src/chanserv.c index 07a1bc4..3b0986c 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -236,7 +236,7 @@ static const struct message_entry msgtab[] = { { "CSMSG_BAN_DONE", "Banned $b%s$b from %s." }, { "CSMSG_REASON_CHANGE", "Reason for LAMER $b%s$b changed." }, { "CSMSG_LAMER_EXTENDED", "Extended LAMER for $b%s$b, now expires in %s." }, - { "CSMSG_BAN_REMOVED", "Matching ban(s) and LAMER(s) in $b%s$b were removed." }, + { "CSMSG_BAN_REMOVED", "Ban(s) and LAMER(s) matching $b%s$b were removed." }, { "CSMSG_TRIMMED_LAMERS", "Trimmed $b%d LAMERs$b from the %s LAMER list that were inactive for at least %s." }, { "CSMSG_REDUNDANT_BAN", "$b%s$b is already banned in %s." }, { "CSMSG_REDUNDANT_LAMER", "$b%s$b is already LAMER'd in %s." }, @@ -7264,35 +7264,22 @@ handle_new_channel(struct chanNode *channel) int trace_check_bans(struct userNode *user, struct chanNode *chan) { - struct chanData *cData; struct banData *bData; struct mod_chanmode *change; - if(!(cData = chan->channel_info)) - return 0; - change = find_matching_bans(&chan->banlist, user, NULL); if (change) return 1; - /* ircd list - if (chan->banlist.used) { - unsigned int i; - for (i=0; ibanlist.used; i++) { - if (!user_matches_glob(user, chan->banlist.list[i], MATCH_USENICK)) - return 1; - } - } -*/ /* lamer list */ - if(chan->banlist.used < MAXBANS) - { - for(bData = cData->bans; - bData && !user_matches_glob(user, bData->mask, MATCH_USENICK); - bData = bData->next); + if (chan->channel_info) { + for(bData = chan->channel_info->bans; bData; bData = bData->next) { - if(bData) { - return 1; + if(!user_matches_glob(user, bData->mask, MATCH_USENICK)) + continue; + + if(bData) + return 1; } }