1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 01:46:38 +02:00

Changed the log:normal config directive to a list like the other log values, and fixed a potential crash from rehashing while sending mail

This commit is contained in:
Adam
2010-10-21 23:20:48 -04:00
parent 4f317a2421
commit 791c2b89a5
11 changed files with 31 additions and 26 deletions
+7 -3
View File
@@ -1,11 +1,15 @@
#include "services.h"
MailThread::MailThread(const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message) : Thread(), MailTo(mailto), Addr(addr), Subject(subject), Message(message), Success(false), DontQuoteAddresses(Config->DontQuoteAddresses)
{
}
MailThread::~MailThread()
{
if (Success)
Log() << "Successfully delivered mail for " << MailTo << " (" << Addr << ")";
Log(LOG_NORMAL, "mail") << "Successfully delivered mail for " << MailTo << " (" << Addr << ")";
else
Log() << "Error delivering mail for " << MailTo << " (" << Addr << ")";
Log(LOG_NORMAL, "mail") << "Error delivering mail for " << MailTo << " (" << Addr << ")";
}
void MailThread::Run()
@@ -19,7 +23,7 @@ void MailThread::Run()
}
fprintf(pipe, "From: %s\n", Config->SendFrom.c_str());
if (Config->DontQuoteAddresses)
if (this->DontQuoteAddresses)
fprintf(pipe, "To: %s <%s>\n", MailTo.c_str(), Addr.c_str());
else
fprintf(pipe, "To: \"%s\" <%s>\n", MailTo.c_str(), Addr.c_str());