Immediate email notifications (#281)

This commit is contained in:
Gent Semaj 2024-06-23 08:32:22 -07:00 committed by GitHub
parent 6d2f120305
commit 003186d97a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,6 +325,13 @@ 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;
dump.push_back(logEmail);
// notification to recipient if online
CNSocket* recipient = PlayerManager::getSockFromID(pkt->iTo_PCUID);
if (recipient != nullptr)
{
emailUpdateCheck(recipient, nullptr);
}
}
void Email::init() {