summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-09 23:47:54 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-09 23:47:54 +0000
commit1a89f2475ccc29a649f36fbb23e545f34b0cfafd (patch)
treeb9b9b6cefc2d6d487950975e3875db0c045eba23
parentfc21dbc2ec9f83dde90f69e42e2181a6455903dd (diff)
Added restrictmail directive in mail block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1624 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf11
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index dff8b7644..154683c80 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -246,6 +246,17 @@ mail
* It should really exist.
*/
sendfrom = "services@localhost.net"
+
+ /*
+ * If set, SENDPASS will be restricted to IRC operators. This directive is
+ * optional.
+ *
+ * WARNING: If you choose to not enable this option, you should limit the
+ * number of processes that the services user can have at a time (you can
+ * create a special user for this; remember to NEVER launch Services as
+ * root).
+ */
+ restrictmail = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 1b1d8a75d..9ff543839 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -313,7 +313,7 @@ E int HostNumber;
E bool UseMail;
E char *SendMailPath;
E char *SendFrom;
-E int RestrictMail;
+E bool RestrictMail;
E int MailDelay;
E int DontQuoteAddresses;
diff --git a/src/config.c b/src/config.c
index 03edb963a..0709f92a7 100644
--- a/src/config.c
+++ b/src/config.c
@@ -108,7 +108,7 @@ int NewsCount;
bool UseMail;
char *SendMailPath;
char *SendFrom;
-int RestrictMail;
+bool RestrictMail;
int MailDelay;
int DontQuoteAddresses;
@@ -665,6 +665,7 @@ int ServerConfig::Read(bool bail)
{"mail", "usemail", "no", new ValueContainerBool(&UseMail), DT_BOOLEAN, ValidateEmailReg},
{"mail", "sendmailpath", "", new ValueContainerChar(&SendMailPath), DT_CHARPTR, ValidateMail},
{"mail", "sendfrom", "", new ValueContainerChar(&SendFrom), DT_CHARPTR, ValidateMail},
+ {"mail", "restrictmail", "no", new ValueContainerBool(&RestrictMail), DT_BOOLEAN, NoValidation},
{"chanserv", "nick", "ChanServ", new ValueContainerChar(&s_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"chanserv", "description", "Channel Registration Service", new ValueContainerChar(&desc_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"chanserv", "database", "chan.db", new ValueContainerChar(&ChanDBName), DT_CHARPTR, ValidateNotEmpty},
@@ -1361,7 +1362,6 @@ Directive directives[] = {
{"RemoteServer3", {{PARAM_STRING, 0, &RemoteServer3},
{PARAM_PORT, 0, &RemotePort3},
{PARAM_STRING, 0, &RemotePassword3}}},
- {"RestrictMail", {{PARAM_SET, PARAM_RELOAD, &RestrictMail}}},
{"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
{"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},
{"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},