mirror of
https://github.com/anope/anope.git
synced 2026-06-25 05:56:38 +02:00
Added sendfrom directive to mail block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1623 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -240,6 +240,12 @@ mail
|
||||
* to be used.
|
||||
*/
|
||||
sendmailpath = "/usr/sbin/sendmail -t"
|
||||
|
||||
/*
|
||||
* This is the e-mail address from which all the e-mails are to be sent from.
|
||||
* It should really exist.
|
||||
*/
|
||||
sendfrom = "services@localhost.net"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+2
-6
@@ -546,7 +546,7 @@ bool ValidateNickLen(ServerConfig *, const char *, const char *, ValueItem &data
|
||||
bool ValidateMail(ServerConfig *, const char *tag, const char *value, ValueItem &data)
|
||||
{
|
||||
if (UseMail) {
|
||||
if (static_cast<std::string>(value) == "sendmailpath") {
|
||||
if (static_cast<std::string>(value) == "sendmailpath" || static_cast<std::string>(value) == "sendfrom") {
|
||||
if (!*data.GetString()) throw ConfigException(static_cast<std::string>("The value for <") + tag + ":" + value + "> cannot be empty when e-mail is enabled!");
|
||||
}
|
||||
}
|
||||
@@ -664,6 +664,7 @@ int ServerConfig::Read(bool bail)
|
||||
{"nickserv", "addaccessonreg", "no", new ValueContainerBool(&NSAddAccessOnReg), DT_BOOLEAN, NoValidation},
|
||||
{"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},
|
||||
{"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},
|
||||
@@ -1362,7 +1363,6 @@ Directive directives[] = {
|
||||
{PARAM_STRING, 0, &RemotePassword3}}},
|
||||
{"RestrictMail", {{PARAM_SET, PARAM_RELOAD, &RestrictMail}}},
|
||||
{"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
|
||||
{"SendFrom", {{PARAM_STRING, PARAM_RELOAD, &SendFrom}}},
|
||||
{"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},
|
||||
{"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},
|
||||
{"AnonymousGlobal", {{PARAM_SET, PARAM_RELOAD, &AnonymousGlobal}}},
|
||||
@@ -1899,10 +1899,6 @@ int read_config(int reload)
|
||||
}
|
||||
}
|
||||
|
||||
if (UseMail) {
|
||||
CHECK(SendFrom);
|
||||
}
|
||||
|
||||
if (GlobalOnCycle) {
|
||||
if (!GlobalOnCycleMessage && !GlobalOnCycleUP) {
|
||||
alog("GlobalOnCycleMessage and GlobalOnCycleUP are not defined; disabling GlobalOnCycle");
|
||||
|
||||
Reference in New Issue
Block a user