summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf24
-rw-r--r--src/config.c4
2 files changed, 23 insertions, 5 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index bd54496ec..333b651b7 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -17,8 +17,8 @@
* A block is created like so:
* foobar
* {
- * moo = "cow";
- * foo = bar;
+ * moo = "cow"
+ * foo = bar
* }
*
* Keys are case insensitive. Values depend on what key - generally, information is
@@ -43,7 +43,7 @@
* CAUTION:
* Please note that your services might _CRASH_ if you add more format-
* strings (%s, %d, etc.) to custom messages than Anope needs. Use the
- * default messages to see how many format-strings are needed.
+ * default messages to see how many format-strings are needed.
*
* In the documentation for each directive, one of the following will be
* included to indicate whether an option is required:
@@ -119,4 +119,20 @@ uplink
password = "mypassword"
}
-
+/*
+ * [REQUIRED] NickServ Config
+ *
+ * This section is used to set up the Nickname Registration Service pseudo-client.
+ */
+nickserv
+{
+ /*
+ * The nickname of the NickServ client.
+ */
+ nick = "NickServ"
+ /*
+ * The description of the NickServ client, which will be used as the GECOS (real
+ * name) of the client.
+ */
+ description = "Nickname Registration Service"
+}
diff --git a/src/config.c b/src/config.c
index 8b4d6d195..b612352ab 100644
--- a/src/config.c
+++ b/src/config.c
@@ -494,7 +494,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[] = {NULL};
+ static const char *Once[] = {"nickserv", NULL};
// These tags can occur ONCE or not at all
InitialConfig Values[] = {
/* The following comments are from CyberBotX to w00t as examples to use:
@@ -550,6 +550,8 @@ int ServerConfig::Read(bool bail)
{"uplink", "host", "", new ValueContainerChar(RemoteServer), DT_HOSTNAME, ValidateNotEmpty},
{"uplink", "port", "0", new ValueContainerInt(&RemotePort), DT_INTEGER, ValidatePort},
{"uplink", "password", "", new ValueContainerChar(RemotePassword), DT_NOSPACES, ValidateNotEmpty},
+ {"nickserv", "nick", "NickServ", new ValueContainerChar(s_NickServ), DT_CHARPTR, ValidateNotEmpty},
+ {"nickserv", "descrption", "Nickname Registration Service", new ValueContainerChar(desc_NickServ), DT_CHARPTR, ValidateNotEmpty},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them