From 5a4bd61515039879debc668c1934341b4bb7cbf6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 23 Jan 2022 15:08:23 -0300 Subject: [TMW2] Hash with MD5 chat messages, we don't care with contents --- src/map/log.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/map/log.c b/src/map/log.c index aa2f5f8f3..85cdac84a 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -29,6 +29,8 @@ #include "map/pc.h" #include "common/cbasetypes.h" #include "common/conf.h" +#include "common/memmgr.h" +#include "common/md5calc.h" #include "common/nullpo.h" #include "common/showmsg.h" #include "common/sql.h" // SQL_INNODB @@ -484,7 +486,12 @@ static void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_ if (dst_charname == NULL) dst_charname = ""; - logs->chat_sub(type,type_id,src_charid,src_accid,mapname,x,y,dst_charname,message); + // Hash the message, we don't care with it + char *md5str; + md5str = (char *)aMalloc((32+1)*sizeof(char)); + md5->string(message, md5str); + + logs->chat_sub(type,type_id,src_charid,src_accid,mapname,x,y,dst_charname,md5str); } static void log_sql_init(void) -- cgit v1.2.3-60-g2f50