summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/map.h6
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/tmw.c70
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];