summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 00:54:47 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 00:54:47 +0000
commit303428a59e65b4cc17cb0c15ab983591b429760e (patch)
tree6df26226e735fc908f84a417eb45879a5e40d796
parent7f28456680a849903749c0720124288cc0572c3d (diff)
Started operserv block in new config, added nick and description directives to it.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1466 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf20
-rw-r--r--src/config.c7
2 files changed, 23 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 92ef81507..f42645735 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -636,3 +636,23 @@ helpserv
*/
description = "Help Service"
}
+
+/*
+ * [REQUIRED] OperServ Config
+ *
+ * This section is used to set up the Operator Service pseudo-client. Unless specified otherwise,
+ * all directives are required.
+ */
+operserv
+{
+ /*
+ * The nickname of the OperServ client.
+ */
+ nick = "OperServ"
+
+ /*
+ * The description of the OperServ client, which will be used as the GECOS (real
+ * name) of the client.
+ */
+ description = "Operator Service"
+}
diff --git a/src/config.c b/src/config.c
index e51f77773..cfcf0b38b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -515,7 +515,7 @@ int ServerConfig::Read(bool bail)
{
errstr.clear();
// These tags MUST occur and must ONLY occur once in the config file
- static const char *Once[] = {"nickserv", "chanserv", "memoserv", "helpserv", NULL};
+ static const char *Once[] = {"nickserv", "chanserv", "memoserv", "helpserv", "operserv", NULL};
// These tags can occur ONCE or not at all
InitialConfig Values[] = {
/* The following comments are from CyberBotX to w00t as examples to use:
@@ -636,6 +636,8 @@ int ServerConfig::Read(bool bail)
{"hostserv", "hostsetters", "", new ValueContainerChar(&HostSetter), DT_CHARPTR, NoValidation},
{"helpserv", "nick", "HelpServ", new ValueContainerChar(&s_HelpServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"helpserv", "description", "Help Service", new ValueContainerChar(&desc_HelpServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "nick", "OperServ", new ValueContainerChar(&s_OperServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "description", "Operator Service", new ValueContainerChar(&desc_OperServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1287,8 +1289,6 @@ Directive directives[] = {
{"NoBackupOkay", {{PARAM_SET, PARAM_RELOAD, &NoBackupOkay}}},
{"OperCoreModules", {{PARAM_STRING, PARAM_RELOAD, &OperCoreModules}}},
{"OperServDB", {{PARAM_STRING, PARAM_RELOAD, &OperDBName}}},
- {"OperServName", {{PARAM_STRING, 0, &s_OperServ},
- {PARAM_STRING, 0, &desc_OperServ}}},
{"PIDFile", {{PARAM_STRING, 0, &PIDFilename}}},
{"ReadTimeout", {{PARAM_TIME, PARAM_RELOAD, &ReadTimeout}}},
{"RemoteServer2", {{PARAM_STRING, 0, &RemoteServer2},
@@ -1687,7 +1687,6 @@ int read_config(int reload)
CHECK(NetworkName);
if (!reload) {
CHEK2(temp_userhost, ServiceUser);
- CHEK2(s_OperServ, OperServName);
CHEK2(s_GlobalNoticer, GlobalName);
CHEK2(PIDFilename, PIDFile);
}