diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-04 14:11:10 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-04 14:11:10 -0600 |
commit | 6aac86cbd7f618ca0717d36149f35d845b6b821c (patch) | |
tree | d22478446ff74e2de09b122ad561d84d6f10b145 /src/map/clif.c | |
parent | 896a8d2b9f6f4a8b1ca70aac0aa25fa6fd3985e6 (diff) | |
download | tmwa-6aac86cbd7f618ca0717d36149f35d845b6b821c.tar.gz tmwa-6aac86cbd7f618ca0717d36149f35d845b6b821c.tar.bz2 tmwa-6aac86cbd7f618ca0717d36149f35d845b6b821c.tar.xz tmwa-6aac86cbd7f618ca0717d36149f35d845b6b821c.zip |
Fix spam detection
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index fa008cf..3cece43 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6494,7 +6494,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < return; } - int ret = tmw_CheckChatSpam(sd, message); + int ret = tmw_CheckChatSpam(sd, RFIFOP(fd,4)); if (ret == 2) clif_setwaitclose(fd); if (ret > 0) { free(message); @@ -6769,14 +6769,10 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni if (RFIFOW(fd,2)-28 <= 0) return; - char *message = (char *) malloc(RFIFOW(fd,2) + 128); - memset(message, '\0', RFIFOW(fd,2) + 128); - - int ret = tmw_CheckChatSpam(sd, message); + int ret = tmw_CheckChatSpam(sd, RFIFOP(fd,28)); if (ret == 2) clif_setwaitclose(fd); if (ret > 0) { printf("returning from whisper (spam)\n"); - free(message); return; } @@ -6816,8 +6812,6 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni } } - free(message); - return; } |