X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/0ae330b43f5a31c51c70a39e4b297bde049cfdf1..6abfcc55d0633e93af512c2679dc33a767960334:/src/channel.c diff --git a/src/channel.c b/src/channel.c index e3e2c06..80bf5c5 100644 --- a/src/channel.c +++ b/src/channel.c @@ -26,6 +26,7 @@ #include "stdinc.h" #include "channel.h" +#include "chmode.h" #include "client.h" #include "common.h" #include "hash.h" @@ -917,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; } }