summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/anope.example.conf8
-rw-r--r--docs/BUGS2
-rw-r--r--docs/README4
-rw-r--r--include/mail.h1
-rw-r--r--modules/commands/bs_kick.cpp6
-rw-r--r--modules/commands/ns_register.cpp2
-rw-r--r--modules/commands/os_sxline.cpp2
-rw-r--r--modules/protocol/inspircd.cpp2
-rw-r--r--modules/protocol/unrealircd.cpp1
-rw-r--r--modules/pseudoclients/memoserv.cpp5
-rw-r--r--src/config.cpp3
-rw-r--r--src/mail.cpp27
12 files changed, 47 insertions, 16 deletions
diff --git a/data/anope.example.conf b/data/anope.example.conf
index 79bee85ec..f2fe66837 100644
--- a/data/anope.example.conf
+++ b/data/anope.example.conf
@@ -984,6 +984,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.
*
* Available tokens for this template are:
diff --git a/docs/BUGS b/docs/BUGS
index d805dd78f..38398be01 100644
--- a/docs/BUGS
+++ b/docs/BUGS
@@ -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
diff --git a/docs/README b/docs/README
index fe01e9f86..da9c5a010 100644
--- a/docs/README
+++ b/docs/README
@@ -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. :)
diff --git a/include/mail.h b/include/mail.h
index 41f3b3fe4..e06357825 100644
--- a/include/mail.h
+++ b/include/mail.h
@@ -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;
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp
index 9a376d9d2..f3a3ef7cd 100644
--- a/modules/commands/bs_kick.cpp
+++ b/modules/commands/bs_kick.cpp
@@ -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;
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index cae204eca..ab113b934 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -83,7 +83,7 @@ class CommandNSConfirm : public Command
source.Reply(_("Invalid passcode."));
}
else
- source.Reply(_("Invalid passcode."));
+ source.Reply(NICK_IDENTIFY_REQUIRED);
return;
}
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp
index 87a952a31..b280297a8 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/commands/os_sxline.cpp
@@ -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"
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index b70987ea8..0e5b94f19 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -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'));
diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp
index b27b92b98..6f4b75541 100644
--- a/modules/protocol/unrealircd.cpp
+++ b/modules/protocol/unrealircd.cpp
@@ -31,6 +31,7 @@ class UnrealIRCdProto : public IRCDProto
CanSetVIdent = true;
CanSNLine = true;
CanSQLine = true;
+ CanSQLineChannel = true;
CanSZLine = true;
CanSVSHold = true;
CanCertFP = true;
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index 1e2ee329e..4efd20ee6 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -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> &params) override
{
if (!params.empty() || source.c || source.service != *MemoServ)
diff --git a/src/config.cpp b/src/config.cpp
index fe2336441..1f0951183 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -640,6 +640,9 @@ Block *Conf::GetModule(const Anope::string &mname)
}
}
+ if (!block)
+ block = &Block::EmptyBlock;
+
return GetModule(mname);
}
diff --git a/src/mail.cpp b/src/mail.cpp
index bf53a6c7b..7ad9c75f2 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -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);