mirror of
https://github.com/anope/anope.git
synced 2026-06-26 04:06:41 +02:00
That doesn't work either, just don't use references.
find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
This commit is contained in:
+7
-7
@@ -14,7 +14,7 @@
|
||||
#include "mail.h"
|
||||
#include "config.h"
|
||||
|
||||
Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m) : Thread(), sendmail_path(Config->GetBlock("mail")->Get<const Anope::string &>("sendmailpath")), send_from(sf), mail_to(mailto), addr(a), subject(s), message(m), dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses")), success(false)
|
||||
Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m) : Thread(), sendmail_path(Config->GetBlock("mail")->Get<const Anope::string>("sendmailpath")), send_from(sf), mail_to(mailto), addr(a), subject(s), message(m), dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses")), success(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -60,19 +60,19 @@ bool Mail::Send(User *u, NickCore *nc, const BotInfo *service, const Anope::stri
|
||||
|
||||
if (!u)
|
||||
{
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string &>("sendfrom").empty())
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty())
|
||||
return false;
|
||||
else if (nc->email.empty())
|
||||
return false;
|
||||
|
||||
nc->lastmail = Anope::CurTime;
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string &>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
t->Start();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string &>("sendfrom").empty())
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty())
|
||||
u->SendMessage(service, _("Services have been configured to not send mail."));
|
||||
else if (Anope::CurTime - u->lastmail < b->Get<time_t>("delay"))
|
||||
u->SendMessage(service, _("Please wait \002%d\002 seconds and retry."), b->Get<time_t>("delay") - (Anope::CurTime - u->lastmail));
|
||||
@@ -81,7 +81,7 @@ bool Mail::Send(User *u, NickCore *nc, const BotInfo *service, const Anope::stri
|
||||
else
|
||||
{
|
||||
u->lastmail = nc->lastmail = Anope::CurTime;
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string &>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
t->Start();
|
||||
return true;
|
||||
}
|
||||
@@ -93,11 +93,11 @@ bool Mail::Send(User *u, NickCore *nc, const BotInfo *service, const Anope::stri
|
||||
bool Mail::Send(NickCore *nc, const Anope::string &subject, const Anope::string &message)
|
||||
{
|
||||
Configuration::Block *b = Config->GetBlock("mail");
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string &>("sendfrom").empty() || !nc || nc->email.empty() || subject.empty() || message.empty())
|
||||
if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty() || !nc || nc->email.empty() || subject.empty() || message.empty())
|
||||
return false;
|
||||
|
||||
nc->lastmail = Anope::CurTime;
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string &>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->display, nc->email, subject, message);
|
||||
t->Start();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user