ban log: only log once when adding, not when increasing score when already banned

Signed-off-by: Stefan Bühler <stbuehler@web.de>
This commit is contained in:
Stefan Bühler
2020-03-22 12:11:05 +01:00
parent 3382277e97
commit 23430d1118

View File

@@ -155,9 +155,9 @@ int add_ip_to_ban_list(main_server_st *s, const unsigned char *ip, unsigned ip_s
* periodically polls the server */
if (e->score < GETCONFIG(s)->max_ban_score) {
e->expires = expiration;
print_msg = 0;
} else
print_msg = 1;
} else
print_msg = 0;
/* prevent overflow */
e->score = (e->score + score) > e->score ? (e->score + score) : (e->score);