diff options
author | MadCamel <madcamel@gmail.com> | 2009-04-22 19:54:23 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-22 14:02:33 -0600 |
commit | e6db3f5fc85fcf73875d7384b7700eb48cf92c47 (patch) | |
tree | 5ece8446e6b1c4498c18262c5ed20977cbc3f6fd /src/map/clif.c | |
parent | e3b1c53ecd84c871d1adf3dcccf25622799f29d6 (diff) | |
download | tmwa-e6db3f5fc85fcf73875d7384b7700eb48cf92c47.tar.gz tmwa-e6db3f5fc85fcf73875d7384b7700eb48cf92c47.tar.bz2 tmwa-e6db3f5fc85fcf73875d7384b7700eb48cf92c47.tar.xz tmwa-e6db3f5fc85fcf73875d7384b7700eb48cf92c47.zip |
Spam checks for trade
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index ae0eed2..c68841d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6488,9 +6488,10 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < return; } - int ret = tmw_CheckChatSpam(sd, RFIFOP(fd,4)); - if (ret == 2) clif_setwaitclose(fd); - if (ret > 0) + + tmw_CheckChatSpam(sd, RFIFOP(fd,4)); + + if (strlen(RFIFOP(fd,4)) >= battle_config.chat_maxline) return; //printf("clif_parse_GlobalMessage: message: '%s'.\n", RFIFOP(fd,4)); @@ -6746,12 +6747,10 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni return; } - int ret = tmw_CheckChatSpam(sd, RFIFOP(fd,28)); - if (ret == 2) clif_setwaitclose(fd); - if (ret > 0) { - printf("returning from whisper (spam)\n"); + tmw_CheckChatSpam(sd, RFIFOP(fd,28)); + + if (strlen(RFIFOP(fd,28)) >= battle_config.chat_maxline) return; - } // searching destination character dstsd = map_nick2sd(RFIFOP(fd,4)); @@ -7082,6 +7081,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) nullpo_retv(sd); if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 1){ + tmw_CheckChatSpam(sd, NULL); trade_traderequest(sd,RFIFOL(sd->fd,2)); } else clif_skill_fail(sd,1,0,0); |