summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:37 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:37 +0000
commit2aff20acc0ef925781e1a118985332c0fac85d49 (patch)
tree88ff1d5a55852d88cdcf4cd7304a3e5c1e6ea1e9
parentdb43487faff43bd28801b4661cd60285697b204e (diff)
Added useprivmsg directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1722 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 b4784a141..89fe19c36 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -368,6 +368,17 @@ options {
* well. This directive is optional.
*/
forceforbidreason = yes
+
+ /*
+ * If set, this will allow users to let Services send PRIVMSGs to them
+ * instead of NOTICEs. Also see the defmsg option of nickserv:defaults,
+ * which also toggles the default communication (PRIVMSG or NOTICE) to
+ * use for unregistered users. This directive is optional.
+ *
+ * This is a feature that is against the IRC RFC and should be used ONLY
+ * if absolutely necessary.
+ */
+ #useprivmsg = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 36001911c..32da48085 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -295,7 +295,7 @@ E time_t TimeoutCheck;
E int KeepLogs;
E int KeepBackups;
E bool ForceForbidReason;
-E int UsePrivmsg;
+E bool UsePrivmsg;
E int UseStrictPrivMsg;
E int DumpCore;
E int LogUsers;
diff --git a/src/config.c b/src/config.c
index 2f69b67b7..2aa1600a7 100644
--- a/src/config.c
+++ b/src/config.c
@@ -97,7 +97,7 @@ time_t TimeoutCheck;
int KeepLogs;
int KeepBackups;
bool ForceForbidReason;
-int UsePrivmsg;
+bool UsePrivmsg;
int UseStrictPrivMsg;
int DumpCore;
int LogUsers;
@@ -650,6 +650,7 @@ int ServerConfig::Read(bool bail)
{"options", "keeplogs", "0", new ValueContainerInt(&KeepLogs), DT_INTEGER, NoValidation},
{"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},
{"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},
@@ -1390,7 +1391,6 @@ Directive directives[] = {
{"GlobalOnCycleMessage",
{{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleMessage}}},
{"GlobalOnCycleUP", {{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleUP}}},
- {"UsePrivmsg", {{PARAM_SET, PARAM_RELOAD, &UsePrivmsg}}},
{"UseStrictPrivMsg", {{PARAM_SET, PARAM_RELOAD, &UseStrictPrivMsg}}},
{"UseSVSHOLD", {{PARAM_SET, PARAM_RELOAD, &UseSVSHOLD}}},
{"UseTS6", {{PARAM_SET, 0, &UseTS6}}},