mirror of
https://github.com/anope/anope.git
synced 2026-06-12 19:14:47 +02:00
Merge branch '2.0' into 2.1.
This commit is contained in:
@@ -983,6 +983,14 @@ mail
|
||||
*/
|
||||
#dontquoteaddresses = yes
|
||||
|
||||
/*
|
||||
* The content type to use when sending emails.
|
||||
*
|
||||
* This directive is optional, and is generally only needed if you want to
|
||||
* use HTML or non UTF-8 text in your services emails.
|
||||
*/
|
||||
#content_type = "text/plain; charset=UTF-8"
|
||||
|
||||
/*
|
||||
* The subject and message of emails sent to users when they register accounts.
|
||||
*
|
||||
|
||||
@@ -1 +1 @@
|
||||
For all bug reports / updates please see https://bugs.anope.org/
|
||||
For all bug reports / updates please see https://github.com/anope/anope/issues
|
||||
|
||||
+2
-2
@@ -252,7 +252,7 @@ Table of Contents
|
||||
The more precise you are the sooner you'll be likely to get an answer.
|
||||
|
||||
If you think you found a bug, add it to the bug tracking system
|
||||
(https://bugs.anope.org/) and - again - be as precise as possible. Also say
|
||||
whether the bug happens always or under what circumstances, and anything
|
||||
(https://github.com/anope/anope/issues) and - again - be as precise as possible.
|
||||
Also say whether the bug happens always or under what circumstances, and anything
|
||||
that could be useful to track your bug down. If you wrote a patch, send
|
||||
it over. :)
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace Mail
|
||||
Anope::string addr;
|
||||
Anope::string subject;
|
||||
Anope::string message;
|
||||
Anope::string content_type;
|
||||
bool dont_quote_addresses;
|
||||
|
||||
bool success = false;
|
||||
|
||||
@@ -31,7 +31,7 @@ struct KickerDataImpl : KickerData
|
||||
|
||||
void Check(ChannelInfo *ci) override
|
||||
{
|
||||
if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines)
|
||||
if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines || dontkickops || dontkickvoices)
|
||||
return;
|
||||
|
||||
ci->Shrink<KickerData>("kickerdata");
|
||||
@@ -67,6 +67,8 @@ struct KickerDataImpl : KickerData
|
||||
data.SetType("floodlines", Serialize::Data::DT_INT); data["floodlines"] << kd->floodlines;
|
||||
data.SetType("floodsecs", Serialize::Data::DT_INT); data["floodsecs"] << kd->floodsecs;
|
||||
data.SetType("repeattimes", Serialize::Data::DT_INT); data["repeattimes"] << kd->repeattimes;
|
||||
data.SetType("dontkickops", Serialize::Data::DT_INT); data["dontkickops"] << kd->dontkickops;
|
||||
data.SetType("dontkickvoices", Serialize::Data::DT_INT); data["dontkickvoices"] << kd->dontkickvoices;
|
||||
for (int16_t i = 0; i < TTB_SIZE; ++i)
|
||||
data["ttb"] << kd->ttb[i] << " ";
|
||||
}
|
||||
@@ -95,6 +97,8 @@ struct KickerDataImpl : KickerData
|
||||
data["floodlines"] >> kd->floodlines;
|
||||
data["floodsecs"] >> kd->floodsecs;
|
||||
data["repeattimes"] >> kd->repeattimes;
|
||||
data["dontkickops"] >> kd->dontkickops;
|
||||
data["dontkickvoices"] >> kd->dontkickvoices;
|
||||
|
||||
Anope::string ttb, tok;
|
||||
data["ttb"] >> ttb;
|
||||
|
||||
@@ -83,7 +83,7 @@ class CommandNSConfirm : public Command
|
||||
source.Reply(_("Invalid passcode."));
|
||||
}
|
||||
else
|
||||
source.Reply(_("Invalid passcode."));
|
||||
source.Reply(NICK_IDENTIFY_REQUIRED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
|
||||
"regular expression, the expression will be matched against\n"
|
||||
"channels too."));
|
||||
source.Reply(_(" \n"
|
||||
"\002SQLINE ADD\002 adds the given (nick's) mask to the SQLINE\n"
|
||||
"\002SQLINE ADD\002 adds the given (nick/channel) mask to the SQLINE\n"
|
||||
"list for the given reason (which \002must\002 be given).\n"
|
||||
"\037expiry\037 is specified as an integer followed by one of \037d\037\n"
|
||||
"(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as\n"
|
||||
|
||||
@@ -1159,7 +1159,7 @@ struct IRCDMessageCapab : Message::Capab
|
||||
ModeManager::AddChannelMode(new InspIRCdExtban::ChannelMatcher("CHANNELBAN", "BAN", 'j'));
|
||||
else if (module == "m_gecosban.so")
|
||||
ModeManager::AddChannelMode(new InspIRCdExtban::RealnameMatcher("REALNAMEBAN", "BAN", 'r'));
|
||||
else if (module == "m_nopartmessage.so")
|
||||
else if (module == "m_nopartmsg.so")
|
||||
ModeManager::AddChannelMode(new InspIRCdExtban::EntryMatcher("PARTMESSAGEBAN", "BAN", 'p'));
|
||||
else if (module == "m_serverban.so")
|
||||
ModeManager::AddChannelMode(new InspIRCdExtban::ServerMatcher("SERVERBAN", "BAN", 's'));
|
||||
|
||||
@@ -31,6 +31,7 @@ class UnrealIRCdProto : public IRCDProto
|
||||
CanSetVIdent = true;
|
||||
CanSNLine = true;
|
||||
CanSQLine = true;
|
||||
CanSQLineChannel = true;
|
||||
CanSZLine = true;
|
||||
CanSVSHold = true;
|
||||
CanCertFP = true;
|
||||
|
||||
@@ -207,6 +207,11 @@ class MemoServCore : public Module, public MemoServService
|
||||
this->Check(u);
|
||||
}
|
||||
|
||||
void OnUserConnect(User *user, bool &exempt) override
|
||||
{
|
||||
this->Check(user);
|
||||
}
|
||||
|
||||
EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
if (!params.empty() || source.c || source.service != *MemoServ)
|
||||
|
||||
@@ -640,6 +640,9 @@ Block *Conf::GetModule(const Anope::string &mname)
|
||||
}
|
||||
}
|
||||
|
||||
if (!block)
|
||||
block = &Block::EmptyBlock;
|
||||
|
||||
return GetModule(mname);
|
||||
}
|
||||
|
||||
|
||||
+18
-9
@@ -13,7 +13,16 @@
|
||||
#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"))
|
||||
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)
|
||||
, content_type(Config->GetBlock("mail")->Get<const Anope::string>("content_type", "text/plain; charset=UTF-8"))
|
||||
, dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -35,17 +44,17 @@ void Mail::Message::Run()
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(pipe, "From: %s\n", send_from.c_str());
|
||||
fprintf(pipe, "From: %s\r\n", send_from.c_str());
|
||||
if (this->dont_quote_addresses)
|
||||
fprintf(pipe, "To: %s <%s>\n", mail_to.c_str(), addr.c_str());
|
||||
fprintf(pipe, "To: %s <%s>\r\n", mail_to.c_str(), addr.c_str());
|
||||
else
|
||||
fprintf(pipe, "To: \"%s\" <%s>\n", mail_to.c_str(), addr.c_str());
|
||||
fprintf(pipe, "Subject: %s\n", subject.c_str());
|
||||
fprintf(pipe, "Content-Type: text/plain; charset=UTF-8;\n");
|
||||
fprintf(pipe, "Content-Transfer-Encoding: 8bit\n");
|
||||
fprintf(pipe, "\n");
|
||||
fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.c_str(), addr.c_str());
|
||||
fprintf(pipe, "Subject: %s\r\n", subject.c_str());
|
||||
fprintf(pipe, "Content-Type: %s\r\n", content_type.c_str());
|
||||
fprintf(pipe, "Content-Transfer-Encoding: 8bit\r\n");
|
||||
fprintf(pipe, "\r\n");
|
||||
fprintf(pipe, "%s", message.c_str());
|
||||
fprintf(pipe, "\n.\n");
|
||||
fprintf(pipe, "\r\n.\r\n");
|
||||
|
||||
pclose(pipe);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user