fix(Log): Chat/Spam logs using the old IP address (#1363)
IP addresses are not being logged properly via the chat/spam logger.
This commit is contained in:
parent
fa53e65995
commit
0c0c1cc2ed
@ -70,10 +70,10 @@ namespace big::spam
|
|||||||
std::ofstream spam_log(g_file_manager->get_project_file(is_spam ? "./spam.log" : "./chat.log").get_path(), std::ios::app);
|
std::ofstream spam_log(g_file_manager->get_project_file(is_spam ? "./spam.log" : "./chat.log").get_path(), std::ios::app);
|
||||||
|
|
||||||
auto& plData = *player->get_net_data();
|
auto& plData = *player->get_net_data();
|
||||||
|
auto ip = player->get_ip_address();
|
||||||
|
|
||||||
spam_log << player->get_name() << " (" << plData.m_gamer_handle.m_rockstar_id << ") <"
|
spam_log << player->get_name() << " (" << plData.m_gamer_handle.m_rockstar_id << ") <" << (int)ip.m_field1 << "."
|
||||||
<< (int)plData.m_external_ip.m_field1 << "." << (int)plData.m_external_ip.m_field2 << "."
|
<< (int)ip.m_field2 << "." << (int)ip.m_field3 << "." << (int)ip.m_field4 << ">: " << msg << std::endl;
|
||||||
<< (int)plData.m_external_ip.m_field3 << "." << (int)plData.m_external_ip.m_field4 << ">: " << msg << std::endl;
|
|
||||||
|
|
||||||
spam_log.close();
|
spam_log.close();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user