From c0ffcaed31edcd5bad1ce35e15b7bade6e557166 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sun, 25 Feb 2018 13:24:47 +0100 Subject: [PATCH] Update others.cpp --- src/hooks/others.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp index c541ff22..fa522a09 100644 --- a/src/hooks/others.cpp +++ b/src/hooks/others.cpp @@ -693,9 +693,11 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf) } } static const char *lastfilter; + static const char *lastname; static bool retrun = false; if (retrun) - PrintChat("%s: %s", name.c_str(), lastfilter); + PrintChat("\x07%06X%s\x01: \x07%06X%s\x01", 0xe05938, 0xefec1f, lastname, + lastfilter); retrun = false; if (chat_filter_enabled && data[0] != LOCAL_E->m_IDX) { @@ -814,10 +816,9 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf) clear += "\n"; } chat_stack::Say(". " + clear, true); - PrintChat("%s: %s", 0xe05938, name.c_str(), - filter.c_str()); retrun = true; lastfilter = filter.c_str(); + lastname = name.c_str(); } } } @@ -848,6 +849,8 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf) } chat_stack::Say(". " + clear, true); retrun = true; + lastfilter = filter.c_str(); + lastname = name.c_str(); } } } @@ -858,7 +861,7 @@ bool DispatchUserMessage_hook(void *_this, int type, bf_read &buf) { if (ucccccp::validate(message)) { - PrintChat("\x07%06X%s\x01: %s", name.c_str(), + PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(), ucccccp::decrypt(message).c_str()); } }