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:
parent
f2943c5ebe
commit
7f0ff0f2e6
@ -52,7 +52,7 @@ public slots:
|
|||||||
* @param f_ipid_r The IPID of the aforementioned client.
|
* @param f_ipid_r The IPID of the aforementioned client.
|
||||||
* @param f_message_r The text of the IC message.
|
* @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.
|
* @brief Logs an OOC message.
|
||||||
|
@ -282,7 +282,7 @@ void AreaData::log(const QString &f_clientName_r, const QString &f_clientIpid_r,
|
|||||||
auto l_header = f_packet_r.header;
|
auto l_header = f_packet_r.header;
|
||||||
|
|
||||||
if (l_header == "MS") {
|
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") {
|
} else if (l_header == "CT") {
|
||||||
m_logger->logOOC(f_clientName_r, f_clientIpid_r, f_packet_r.contents.at(1));
|
m_logger->logOOC(f_clientName_r, f_clientIpid_r, f_packet_r.contents.at(1));
|
||||||
} else if (l_header == "ZZ") {
|
} else if (l_header == "ZZ") {
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#include "include/logger.h"
|
#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)
|
void Logger::logOOC(const QString& f_charName_r, const QString& f_ipid_r, const QString& f_message_r)
|
||||||
|
Loading…
Reference in New Issue
Block a user