summaryrefslogtreecommitdiff
path: root/src/map/tmw.c
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-06 14:33:18 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-06 14:33:18 -0600
commit2855e018b8e177878ca0d83c61e4442ddf3e505c (patch)
tree8521b323327952857072214e5a5cbb9195601cb5 /src/map/tmw.c
parent2e87e5b65a02d8d9f867a0510f039cc319b3ffcb (diff)
downloadtmwa-2855e018b8e177878ca0d83c61e4442ddf3e505c.tar.gz
tmwa-2855e018b8e177878ca0d83c61e4442ddf3e505c.tar.bz2
tmwa-2855e018b8e177878ca0d83c61e4442ddf3e505c.tar.xz
tmwa-2855e018b8e177878ca0d83c61e4442ddf3e505c.zip
Revert "Add a new trade spam system"
This reverts commit 2e87e5b65a02d8d9f867a0510f039cc319b3ffcb.
Diffstat (limited to 'src/map/tmw.c')
-rw-r--r--src/map/tmw.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/map/tmw.c b/src/map/tmw.c
index 5d4c991..ba02189 100644
--- a/src/map/tmw.c
+++ b/src/map/tmw.c
@@ -116,36 +116,3 @@ void tmw_GmHackMsg(const char *fmt, ...) {
intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, outbuf, strlen(outbuf) + 1);
}
-
-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_GmHackMsg("Trade spam detected from character '%s' (account: %d)", sd->status.name, sd->status.account_id);
-
- if (battle_config.trade_spam_ban > 0) {
- clif_displaymessage(sd->fd, "You have been banned for trade spamming. Please do not trade spam.");
- tmw_GmHackMsg("This player has been banned for %d hour(s).", battle_config.trade_spam_ban);
-
- chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, battle_config.trade_spam_ban, 0, 0); // type: 2 - ban (year, month, day, hour, minute, second)
- clif_setwaitclose(sd->fd);
- }
- }
-
- 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;
-}