summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:49 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:49 +0000
commitdc2176560d4974b4fdadf81ade10286e120a9930 (patch)
tree45e462bac64611cac3662c5d2941056699333c42
parent2aff20acc0ef925781e1a118985332c0fac85d49 (diff)
Added usestrictprivmsg directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1723 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 89fe19c36..19d79111b 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -379,6 +379,17 @@ options {
* if absolutely necessary.
*/
#useprivmsg = yes
+
+ /*
+ * If set, will force Services to only respond to PRIVMSGs addresses to
+ * Nick@ServerName - e.g. NickServ@localhost.net. This should be used in
+ * conjunction with IRCd aliases. This directive is optional.
+ *
+ * When using Bahamut, this option will NOT work if the uplink server is
+ * configured as a services hub. The serviceshub option is not designed to
+ * be used with Anope.
+ */
+ #usestrictprivmsg = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 32da48085..c37a1c86d 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -296,7 +296,7 @@ E int KeepLogs;
E int KeepBackups;
E bool ForceForbidReason;
E bool UsePrivmsg;
-E int UseStrictPrivMsg;
+E bool UseStrictPrivMsg;
E int DumpCore;
E int LogUsers;
E int NickRegDelay;
diff --git a/src/config.c b/src/config.c
index 2aa1600a7..4680c949b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -98,7 +98,7 @@ int KeepLogs;
int KeepBackups;
bool ForceForbidReason;
bool UsePrivmsg;
-int UseStrictPrivMsg;
+bool UseStrictPrivMsg;
int DumpCore;
int LogUsers;
int NickRegDelay;
@@ -651,6 +651,7 @@ int ServerConfig::Read(bool bail)
{"options", "keepbackups", "0", new ValueContainerInt(&KeepBackups), DT_INTEGER, NoValidation},
{"options", "forceforbidreason", "no", new ValueContainerBool(&ForceForbidReason), DT_BOOLEAN, NoValidation},
{"options", "useprivmsg", "no", new ValueContainerBool(&UsePrivmsg), DT_BOOLEAN, NoValidation},
+ {"options", "usestrictprivmsg", "no", new ValueContainerBool(&UseStrictPrivMsg), DT_BOOLEAN, NoValidation},
{"nickserv", "nick", "NickServ", new ValueContainerChar(&s_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"nickserv", "description", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"nickserv", "database", "nick.db", new ValueContainerChar(&NickDBName), DT_CHARPTR, ValidateNotEmpty},
@@ -1391,7 +1392,6 @@ Directive directives[] = {
{"GlobalOnCycleMessage",
{{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleMessage}}},
{"GlobalOnCycleUP", {{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleUP}}},
- {"UseStrictPrivMsg", {{PARAM_SET, PARAM_RELOAD, &UseStrictPrivMsg}}},
{"UseSVSHOLD", {{PARAM_SET, PARAM_RELOAD, &UseSVSHOLD}}},
{"UseTS6", {{PARAM_SET, 0, &UseTS6}}},
{"UnRestrictSAdmin", {{PARAM_SET, PARAM_RELOAD, &UnRestrictSAdmin}}},