+}
+
+/**
+ * Output a warning messages if IDENT is configured but not compiled in.
+ */
+static void
+WarnIdent(int UNUSED Line)
+{
+#ifndef IDENTAUTH
+ if (Conf_Ident) {
+ /* user has enabled ident lookups explicitly, but ... */
+ Config_Error(LOG_WARNING,
+ "%s: line %d: \"Ident = yes\", but ngircd was built without IDENT support!",
+ NGIRCd_ConfFile, Line);
+ }
+#endif
+}
+
+/**
+ * Output a warning messages if IPv6 is configured but not compiled in.
+ */
+static void
+WarnIPv6(int UNUSED Line)
+{
+#ifndef WANT_IPV6
+ if (Conf_ConnectIPv6) {
+ /* user has enabled IPv6 explicitly, but ... */
+ Config_Error(LOG_WARNING,
+ "%s: line %d: \"ConnectIPv6 = yes\", but ngircd was built without IPv6 support!",
+ NGIRCd_ConfFile, Line);
+ }
+#endif
+}
+
+/**
+ * Output a warning messages if PAM is configured but not compiled in.
+ */
+static void
+WarnPAM(int UNUSED Line)
+{
+#ifndef PAM
+ if (Conf_PAM) {
+ Config_Error(LOG_WARNING,
+ "%s: line %d: \"PAM = yes\", but ngircd was built without PAM support!",
+ NGIRCd_ConfFile, Line);
+ }
+#endif
+}
+
+/**
+ * Handle legacy "NoXXX" options in [GLOBAL] section.
+ *
+ * TODO: This function and support for "NoXXX" could be removed starting
+ * with ngIRCd release 19 (one release after marking it "deprecated").
+ *
+ * @param Var Variable name.
+ * @param Arg Argument string.
+ * @returns true if a NoXXX option has been processed; false otherwise.
+ */
+static bool
+CheckLegacyNoOption(const char *Var, const char *Arg)
+{
+ if(strcasecmp(Var, "NoDNS") == 0) {
+ Conf_DNS = !Check_ArgIsTrue( Arg );
+ return true;
+ }
+ if (strcasecmp(Var, "NoIdent") == 0) {
+ Conf_Ident = !Check_ArgIsTrue(Arg);
+ return true;
+ }
+ if(strcasecmp(Var, "NoPAM") == 0) {
+ Conf_PAM = !Check_ArgIsTrue(Arg);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Handle deprecated legacy options in [GLOBAL] section.
+ *
+ * TODO: This function and support for these options in the [Global] section
+ * could be removed starting with ngIRCd release 19 (one release after
+ * marking it "deprecated").
+ *
+ * @param Var Variable name.
+ * @param Arg Argument string.
+ * @returns true if a legacy option has been processed; false otherwise.
+ */
+static const char*
+CheckLegacyGlobalOption(int Line, char *Var, char *Arg)
+{
+ if (strcasecmp(Var, "AllowRemoteOper") == 0
+ || strcasecmp(Var, "ChrootDir") == 0
+ || strcasecmp(Var, "ConnectIPv4") == 0
+ || strcasecmp(Var, "ConnectIPv6") == 0
+ || strcasecmp(Var, "OperCanUseMode") == 0
+ || strcasecmp(Var, "OperServerMode") == 0
+ || strcasecmp(Var, "PredefChannelsOnly") == 0
+ || strcasecmp(Var, "SyslogFacility") == 0
+ || strcasecmp(Var, "WebircPassword") == 0) {
+ Handle_OPTIONS(Line, Var, Arg);
+ return "[Options]";
+ }
+ if (strcasecmp(Var, "ConnectRetry") == 0
+ || strcasecmp(Var, "MaxConnections") == 0
+ || strcasecmp(Var, "MaxConnectionsIP") == 0
+ || strcasecmp(Var, "MaxJoins") == 0
+ || strcasecmp(Var, "MaxNickLength") == 0
+ || strcasecmp(Var, "PingTimeout") == 0
+ || strcasecmp(Var, "PongTimeout") == 0) {
+ Handle_LIMITS(Line, Var, Arg);
+ return "[Limits]";
+ }
+#ifdef SSL_SUPPORT
+ if (strcasecmp(Var, "SSLCertFile") == 0
+ || strcasecmp(Var, "SSLDHFile") == 0
+ || strcasecmp(Var, "SSLKeyFile") == 0
+ || strcasecmp(Var, "SSLKeyFilePassword") == 0
+ || strcasecmp(Var, "SSLPorts") == 0) {
+ Handle_SSL(Line, Var + 3, Arg);
+ return "[SSL]";
+ }
+#endif