summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorremoitnane <remoit(DOT)nane(AT)gmail(DOT)com>2010-08-15 13:47:59 -0700
committerremoitnane <remoit(DOT)nane(AT)gmail(DOT)com>2010-08-15 13:47:59 -0700
commitb20e8a4006cbebc90d87bba445a093f494da8c7e (patch)
tree803ab5ed6f2ccf0392ac39707f7505c1a1623e1b
parent6cbbea94da23c7afda8d29d1bb76a5086b16296b (diff)
downloadtmwa-b20e8a4006cbebc90d87bba445a093f494da8c7e.tar.gz
tmwa-b20e8a4006cbebc90d87bba445a093f494da8c7e.tar.bz2
tmwa-b20e8a4006cbebc90d87bba445a093f494da8c7e.tar.xz
tmwa-b20e8a4006cbebc90d87bba445a093f494da8c7e.zip
Let players spam spells again
Sorry for the inconvenience
-rw-r--r--src/map/clif.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e78da71..93ff805 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7149,6 +7149,15 @@ void clif_parse_GlobalMessage (int fd, struct map_session_data *sd)
if (!magic_message (sd, buf, msg_len))
{
+ /* Don't send chat that results in an automatic ban. */
+ if (tmw_CheckChatSpam (sd, message))
+ {
+ free (buf);
+ /* "Your message could not be sent." */
+ clif_displaymessage (fd, msg_txt (505));
+ return;
+ }
+
/* It's not a spell/magic message, so send the message to others. */
WBUFW (buf, 0) = 0x8d;
WBUFW (buf, 2) = msg_len + 8; /* Header (2) + length (2) + ID (4). */
@@ -7426,6 +7435,15 @@ void clif_parse_Wis (int fd, struct map_session_data *sd)
return;
}
+ /* Don't send chat that results in an automatic ban. */
+ if (tmw_CheckChatSpam (sd, message))
+ {
+ free (buf);
+ /* "Your message could not be sent." */
+ clif_displaymessage (fd, msg_txt (505));
+ return;
+ }
+
/*
* The player is not on this server. Only send the whisper if the name is
* exactly the same, because if there are multiple map-servers and a name
@@ -8497,6 +8515,15 @@ void clif_parse_PartyMessage (int fd, struct map_session_data *sd)
return;
}
+ /* Don't send chat that results in an automatic ban. */
+ if (tmw_CheckChatSpam (sd, message))
+ {
+ free (buf);
+ /* "Your message could not be sent." */
+ clif_displaymessage (fd, msg_txt (505));
+ return;
+ }
+
party_send_message (sd, message, RFIFOW (fd, 2) - 4);
free (buf);
}
@@ -8720,6 +8747,16 @@ void clif_parse_GuildMessage (int fd, struct map_session_data *sd)
return;
}
+ /* Don't send chat that results in an automatic ban. */
+ if (tmw_CheckChatSpam (sd, message))
+ {
+ free (buf);
+ /* "Your message could not be sent." */
+ clif_displaymessage (fd, msg_txt (505));
+ return;
+ }
+
+
guild_send_message (sd, message, RFIFOW (fd, 2) - 4);
free (buf);
}
@@ -9945,13 +9982,6 @@ static char *clif_validate_chat (struct map_session_data *sd, int type,
buf[buf_len - 1] = '\0';
p = (type != 2) ? buf : buf + 8;
- /* Don't send chat that results in an automatic ban. */
- if (tmw_CheckChatSpam (sd, p))
- {
- free (buf);
- return NULL;
- }
-
if (type != 2)
{
*message = buf;