diff options
author | Adam <Adam@anope.org> | 2010-10-21 23:20:48 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-10-21 23:20:48 -0400 |
commit | 791c2b89a5b09d3e3e3785669b29438ffec26295 (patch) | |
tree | 60a4647572e80d5f037fe2d9e49338a34cc0d6ea /src/mail.cpp | |
parent | 4f317a242104b623d2e5257bc672fd56c0240a0e (diff) |
Changed the log:normal config directive to a list like the other log values, and fixed a potential crash from rehashing while sending mail
Diffstat (limited to 'src/mail.cpp')
-rw-r--r-- | src/mail.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mail.cpp b/src/mail.cpp index 66cf1b81e..d59903726 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -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()); |