Show spambot notices for joins, not for parts.

Parts still decrement the counter for showing notices.
This shows more channels in the notices.
This commit is contained in:
Jilles Tjoelker 2008-11-08 17:22:41 +01:00
parent 5807e0beaa
commit e0c1f4ecab

View file

@ -918,19 +918,14 @@ check_spambot_warning(struct Client *source_p, const char *name)
source_p->localClient->oper_warn_count_down--; source_p->localClient->oper_warn_count_down--;
else else
source_p->localClient->oper_warn_count_down = 0; 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 */ /* Its already known as a possible spambot */
if(name != NULL) sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
sendto_realops_snomask(SNO_BOTS, L_NETWIDE, "User %s (%s@%s) trying to join %s is a possible spambot",
"User %s (%s@%s) trying to join %s is a possible spambot", source_p->name,
source_p->name, source_p->username, source_p->orighost, 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);
source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN; source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN;
} }
} }