Add showname to the IC logs

This is a bit hacky, but eh, I've commited worse crimes against AO.
This commit is contained in:
Salanto 2021-08-01 17:00:01 +02:00
parent f2943c5ebe
commit 7f0ff0f2e6
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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") {

View File

@ -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)