summaryrefslogtreecommitdiff
path: root/src/map/tmw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/tmw.cpp')
-rw-r--r--src/map/tmw.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/map/tmw.cpp b/src/map/tmw.cpp
index 7506270..4b1831b 100644
--- a/src/map/tmw.cpp
+++ b/src/map/tmw.cpp
@@ -30,7 +30,7 @@
#include "storage.hpp"
#include "trade.hpp"
-int tmw_CheckChatSpam (struct map_session_data *sd, char *message)
+int tmw_CheckChatSpam (struct map_session_data *sd, const char *message)
{
nullpo_retr (1, sd);
time_t now = time (NULL);
@@ -86,16 +86,14 @@ int tmw_CheckChatSpam (struct map_session_data *sd, char *message)
(sd->chat_lines_in >= battle_config.chat_spam_warn
|| sd->chat_total_repeats >= battle_config.chat_spam_warn))
{
- /* "WARNING: You are about to be automatically banned for spam!" */
- clif_displaymessage (sd->fd, msg_txt (506));
- /* "WARNING: Please slow down, do not repeat, and do not SHOUT!" */
- clif_displaymessage (sd->fd, msg_txt (507));
+ clif_displaymessage (sd->fd, "WARNING: You are about to be automatically banned for spam!");
+ clif_displaymessage (sd->fd, "WARNING: Please slow down, do not repeat, and do not SHOUT!");
}
return 0;
}
-void tmw_AutoBan(struct map_session_data *sd, char *reason, int length)
+void tmw_AutoBan(struct map_session_data *sd, const char *reason, int length)
{
char anotherbuf[512];
@@ -111,8 +109,7 @@ void tmw_AutoBan(struct map_session_data *sd, char *reason, int length)
map[sd->bl.m].name, sd->bl.x, sd->bl.y,
sd->status.name, length, reason);
- /* "You have been banned for %s spamming. Please do not spam." */
- snprintf (anotherbuf, 511, msg_txt (508), reason);
+ snprintf (anotherbuf, 511, "You have been banned for %s spamming. Please do not spam.", reason);
clif_displaymessage (sd->fd, anotherbuf);
/* type: 2 - ban (year, month, day, hour, minute, second) */
@@ -121,7 +118,7 @@ void tmw_AutoBan(struct map_session_data *sd, char *reason, int length)
}
// Compares the length of two strings and returns that of the shorter
-int tmw_ShorterStrlen (char *s1, char *s2)
+int tmw_ShorterStrlen (const char *s1, const char *s2)
{
int s1_len = strlen (s1);
int s2_len = strlen (s2);
@@ -129,7 +126,7 @@ int tmw_ShorterStrlen (char *s1, char *s2)
}
// Returns true if more than 50% of input message is caps or punctuation
-int tmw_CheckChatLameness (struct map_session_data *sd, char *message)
+int tmw_CheckChatLameness (struct map_session_data *sd, const char *message)
{
int count, lame;