0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

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--;
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;
}
}