Handle email dumping separately from chat dumping

This makes it actually possible to unambiguously parse the full thing
on the receiving end.
This commit is contained in:
2021-12-03 22:23:59 +01:00
parent 9ab998688c
commit 05d6174351
3 changed files with 56 additions and 3 deletions

View File

@@ -10,6 +10,8 @@
using namespace Email;
std::vector<std::string> Email::dump;
// New email notification
static void emailUpdateCheck(CNSocket* sock, CNPacketData* data) {
INITSTRUCT(sP_FE2CL_REP_PC_NEW_EMAIL, resp);
@@ -307,7 +309,7 @@ static void emailSend(CNSocket* sock, CNPacketData* data) {
std::string logEmail = "[Email] " + PlayerManager::getPlayerName(plr, true) + " (to " + PlayerManager::getPlayerName(&otherPlr, true) + "): <" + email.SubjectLine + ">\n" + email.MsgBody;
std::cout << logEmail << std::endl;
Chat::dump.push_back(logEmail);
dump.push_back(logEmail);
}
void Email::init() {