From 415983958551f0e7ff72bec2921a67918d96d130 Mon Sep 17 00:00:00 2001 From: MadCamel Date: Sun, 23 Aug 2009 10:52:01 -0400 Subject: Improved chat spam detection Repeats are now checked only to the length of the shortest line (last line, current line) so "SPAM!!" and "SPAM!!!!!" would be considered a repeat. Total repeats are now counted and a ban is triggered if they exceed battle_config.chat_spam_flood repeats, regardless of time frame. --- src/map/pc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 6f1cc86..0c304ce 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -816,11 +816,9 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, short tmw_versio } } - sd->chat_reset_due = sd->chat_lines_in = 0; + sd->chat_reset_due = sd->chat_lines_in = sd->chat_total_repeats = 0; sd->chat_lastmsg[0] = '\0'; - sd->trade_reset_due = sd->trades_in = 0; - sd->sit_reset_due = sd->sits_in = 0; // message of the limited time of the account -- cgit v1.2.3-60-g2f50