summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-23 15:08:23 -0300
committerJesusaves <cpntb1@ymail.com>2022-01-23 15:08:23 -0300
commit5a4bd61515039879debc668c1934341b4bb7cbf6 (patch)
treed62c8618bfb00d1f3327048d71e3429468738aca
parentb704afa14405e84e6861262d9a70e2e5ced2ffad (diff)
downloadhercules-5a4bd61515039879debc668c1934341b4bb7cbf6.tar.gz
hercules-5a4bd61515039879debc668c1934341b4bb7cbf6.tar.bz2
hercules-5a4bd61515039879debc668c1934341b4bb7cbf6.tar.xz
hercules-5a4bd61515039879debc668c1934341b4bb7cbf6.zip
[TMW2] Hash with MD5 chat messages, we don't care with contents
-rw-r--r--src/map/log.c9
1 files changed, 8 insertions, 1 deletions
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)