diff --git a/core/include/logger.h b/core/include/logger.h index 2866f47..52965d7 100644 --- a/core/include/logger.h +++ b/core/include/logger.h @@ -52,7 +52,7 @@ public slots: * @param f_ipid_r The IPID of the aforementioned client. * @param f_message_r The text of the IC message. */ - void logIC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r); + void logIC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r, const QString& f_showname); /** * @brief Logs an OOC message. diff --git a/core/src/area_data.cpp b/core/src/area_data.cpp index 2654707..eca662a 100644 --- a/core/src/area_data.cpp +++ b/core/src/area_data.cpp @@ -282,7 +282,7 @@ void AreaData::log(const QString &f_clientName_r, const QString &f_clientIpid_r, auto l_header = f_packet_r.header; if (l_header == "MS") { - m_logger->logIC(f_clientName_r, f_clientIpid_r, f_packet_r.contents.at(4)); + m_logger->logIC(f_clientName_r, f_clientIpid_r, f_packet_r.contents.at(4), f_packet_r.contents.at(15)); } else if (l_header == "CT") { m_logger->logOOC(f_clientName_r, f_clientIpid_r, f_packet_r.contents.at(1)); } else if (l_header == "ZZ") { diff --git a/core/src/logger.cpp b/core/src/logger.cpp index 55203a7..cde57e4 100644 --- a/core/src/logger.cpp +++ b/core/src/logger.cpp @@ -20,9 +20,9 @@ #include "include/logger.h" -void Logger::logIC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r) +void Logger::logIC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r, const QString& f_showname_r) { - addEntry(f_charName_r, f_ipid_r, "IC", f_message_r); + addEntry((f_charName_r + " (" + f_showname_r + ") "), f_ipid_r, "IC", f_message_r); } void Logger::logOOC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r)