+
+ if (CheckLegacyNoOption(Var, Arg)) {
+ /* TODO: This function and support for "NoXXX" could be
+ * be removed starting with ngIRCd release 19 (one release
+ * after marking it "deprecated"). */
+ Config_Error(LOG_WARNING,
+ "%s, line %d (section \"Global\"): \"No\"-Prefix is deprecated, use \"%s = %s\" in [Options] section!",
+ NGIRCd_ConfFile, Line, NoNo(Var), InvertArg(Arg));
+ if (strcasecmp(Var, "NoIdent") == 0)
+ WarnIdent(Line);
+ else if (strcasecmp(Var, "NoPam") == 0)
+ WarnPAM(Line);
+ return;
+ }
+ if ((section = CheckLegacyGlobalOption(Line, Var, Arg))) {
+ /** 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"). */
+ Config_Error(LOG_WARNING,
+ "%s, line %d (section \"Global\"): \"%s\" is deprecated here, move it to %s!",
+ NGIRCd_ConfFile, Line, Var, section);
+ return;
+ }
+
+ Config_Error_Section(Line, Var, "Global");
+}
+
+/**
+ * Handle variable in [Limits] configuration section.
+ *
+ * @param Line Line numer in configuration file.
+ * @param Var Variable name.
+ * @param Arg Variable argument.
+ */
+static void
+Handle_LIMITS(int Line, char *Var, char *Arg)
+{
+ assert(Line > 0);
+ assert(Var != NULL);
+ assert(Arg != NULL);
+
+ if (strcasecmp(Var, "ConnectRetry") == 0) {
+ Conf_ConnectRetry = atoi(Arg);
+ if (Conf_ConnectRetry < 5) {
+ Config_Error(LOG_WARNING,
+ "%s, line %d: Value of \"ConnectRetry\" too low!",
+ NGIRCd_ConfFile, Line);
+ Conf_ConnectRetry = 5;
+ }
+ return;
+ }
+ if (strcasecmp(Var, "MaxConnections") == 0) {
+ Conf_MaxConnections = atol(Arg);
+ if (!Conf_MaxConnections && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
+ return;
+ }
+ if (strcasecmp(Var, "MaxConnectionsIP") == 0) {
+ Conf_MaxConnectionsIP = atoi(Arg);
+ if (!Conf_MaxConnectionsIP && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
+ return;
+ }
+ if (strcasecmp(Var, "MaxJoins") == 0) {
+ Conf_MaxJoins = atoi(Arg);
+ if (!Conf_MaxJoins && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
+ return;
+ }
+ if (strcasecmp(Var, "MaxNickLength") == 0) {
+ Conf_MaxNickLength = Handle_MaxNickLength(Line, Arg);
+ return;
+ }
+ if (strcasecmp(Var, "PingTimeout") == 0) {
+ Conf_PingTimeout = atoi(Arg);
+ if (Conf_PingTimeout < 5) {
+ Config_Error(LOG_WARNING,
+ "%s, line %d: Value of \"PingTimeout\" too low!",
+ NGIRCd_ConfFile, Line);