From 05d8a68c88d2f5f12596c2efe455f25f74f4b8c4 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 8 Nov 2008 17:22:41 +0100 Subject: [PATCH] Show spambot notices for joins, not for parts. Parts still decrement the counter for showing notices. This shows more channels in the notices. --- src/channel.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/channel.c b/src/channel.c index 52e4b50..80bf5c5 100644 --- a/src/channel.c +++ b/src/channel.c @@ -918,19 +918,14 @@ check_spambot_warning(struct Client *source_p, const char *name) source_p->localClient->oper_warn_count_down--; else source_p->localClient->oper_warn_count_down = 0; - if(source_p->localClient->oper_warn_count_down == 0) + if(source_p->localClient->oper_warn_count_down == 0 && + name != NULL) { /* Its already known as a possible spambot */ - if(name != NULL) - sendto_realops_snomask(SNO_BOTS, L_NETWIDE, - "User %s (%s@%s) trying to join %s is a possible spambot", - source_p->name, - source_p->username, source_p->orighost, name); - else - sendto_realops_snomask(SNO_BOTS, L_NETWIDE, - "User %s (%s@%s) is a possible spambot", - source_p->name, - source_p->username, source_p->orighost); + sendto_realops_snomask(SNO_BOTS, L_NETWIDE, + "User %s (%s@%s) trying to join %s is a possible spambot", + source_p->name, + source_p->username, source_p->orighost, name); source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN; } }