diff options
author | MadCamel <madcamel@gmail.com> | 2010-04-04 15:55:43 -0400 |
---|---|---|
committer | MadCamel <madcamel@gmail.com> | 2010-04-04 15:55:43 -0400 |
commit | 3db7c2cd1c4fb0d8888416e9b5733abab574ebe9 (patch) | |
tree | 3eb409c32009e596d0f3006f0cf2a5ae61e6b39d /src | |
parent | 30728fa5dca858af79038878d597ffd24cb1fc26 (diff) | |
download | tmwa-3db7c2cd1c4fb0d8888416e9b5733abab574ebe9.tar.gz tmwa-3db7c2cd1c4fb0d8888416e9b5733abab574ebe9.tar.bz2 tmwa-3db7c2cd1c4fb0d8888416e9b5733abab574ebe9.tar.xz tmwa-3db7c2cd1c4fb0d8888416e9b5733abab574ebe9.zip |
Removed obsoleted trade and sit spam code
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/map.h | 6 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/tmw.c | 70 |
4 files changed, 0 insertions, 82 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 61410e9..2f922eb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7331,8 +7331,6 @@ void clif_parse_ActionRequest (int fd, struct map_session_data *sd) pc_attack (sd, target_id, action_type != 0); break; case 0x02: // sitdown - if (tmw_CheckSitSpam (sd)) - break; pc_stop_walking (sd, 1); skill_gangsterparadise (sd, 1); // �M�����O�X�^�[�p���_�C�X�ݒ� pc_setsit (sd); @@ -7796,8 +7794,6 @@ void clif_parse_TradeRequest (int fd, struct map_session_data *sd) if (battle_config.basic_skill_check == 0 || pc_checkskill (sd, NV_TRADE) >= 1) { - if (tmw_CheckTradeSpam (sd)) - return; trade_traderequest (sd, RFIFOL (sd->fd, 2)); } else diff --git a/src/map/map.h b/src/map/map.h index 936513b..d7c0d44 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -397,12 +397,6 @@ struct map_session_data int chat_total_repeats; char chat_lastmsg[513]; - time_t trade_reset_due; - int trades_in; - - time_t sit_reset_due; - int sits_in; - unsigned int flood_rates[0x220]; time_t packet_flood_reset_due; int packet_flood_in; diff --git a/src/map/pc.c b/src/map/pc.c index fd30066..748abf9 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -958,8 +958,6 @@ int pc_authok (int id, int login_id2, time_t connect_until_time, sd->chat_reset_due = sd->chat_lines_in = sd->chat_total_repeats = sd->chat_repeat_reset_due = 0; sd->chat_lastmsg[0] = '\0'; - sd->trade_reset_due = sd->trades_in = 0; - sd->sit_reset_due = sd->sits_in = 0; memset(sd->flood_rates, 0, sizeof(sd->flood_rates)); sd->packet_flood_reset_due = sd->packet_flood_in = 0; diff --git a/src/map/tmw.c b/src/map/tmw.c index 7070331..46e02bc 100644 --- a/src/map/tmw.c +++ b/src/map/tmw.c @@ -96,76 +96,6 @@ int tmw_CheckChatSpam (struct map_session_data *sd, char *message) return 0; } -int tmw_CheckTradeSpam (struct map_session_data *sd) -{ - nullpo_retr (1, sd); - time_t now = time (NULL); - - if (pc_isGM (sd)) - return 0; - - if (now > sd->trade_reset_due) - { - sd->trade_reset_due = now + battle_config.trade_spam_threshold; - sd->trades_in = 0; - } - - sd->trades_in++; - - if (sd->trades_in >= battle_config.trade_spam_flood) - { - sd->trades_in = 0; - - tmw_AutoBan(sd, "trade", battle_config.trade_spam_ban); - - return 1; - } - - if (battle_config.trade_spam_ban - && sd->trades_in >= battle_config.trade_spam_warn) - { - clif_displaymessage (sd->fd, - "WARNING : You are about to be automaticly banned for trade spam!"); - } - - return 0; -} - -int tmw_CheckSitSpam (struct map_session_data *sd) -{ - nullpo_retr (1, sd); - time_t now = time (NULL); - - if (pc_isGM (sd)) - return 0; - - if (now > sd->sit_reset_due) - { - sd->sit_reset_due = now + battle_config.sit_spam_threshold; - sd->sits_in = 0; - } - - sd->sits_in++; - - if (sd->sits_in >= battle_config.sit_spam_flood) - { - sd->sits_in = 0; - - tmw_AutoBan(sd, "sit", battle_config.sit_spam_ban); - - return 1; - } - - if (battle_config.sit_spam_ban - && sd->sits_in >= battle_config.sit_spam_warn) - { - clif_displaymessage (sd->fd, - "WARNING : You are about to be automaticly banned for sit spam!"); - } - - return 0; -} - void tmw_AutoBan(struct map_session_data *sd, char *reason, int length) { char anotherbuf[512]; |