/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Configuration management (reading, parsing & validation)
*/
-#include "imp.h"
#include <assert.h>
-#include <ctype.h>
#include <errno.h>
#ifdef PROTOTYPES
# include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
+#include <time.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
#include <sys/types.h>
-#include <unistd.h>
#include <dirent.h>
-#include "array.h"
#include "ngircd.h"
#include "conn.h"
#include "channel.h"
-#include "defines.h"
#include "log.h"
#include "match.h"
-#include "tool.h"
-#include "exp.h"
#include "conf.h"
#endif
#ifdef HAVE_LIBSSL
-#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH"
+#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH:!SSLv3"
#endif
#ifdef HAVE_LIBGNUTLS
-#define DEFAULT_CIPHERS "SECURE128"
+#define DEFAULT_CIPHERS "SECURE128:-VERS-SSL3.0"
#endif
#ifdef SSL_SUPPORT
? (const char*) array_start(&Conf_Motd) : "");
}
printf(" Network = %s\n", Conf_Network);
- if (!Conf_PAM)
+ if (!Conf_PAM)
printf(" Password = %s\n", Conf_ServerPwd);
printf(" PidFile = %s\n", Conf_PidFile);
printf(" Ports = ");
#endif
printf(" IncludeDir = %s\n", Conf_IncludeDir);
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
- printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
+ printf(" NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
&& (Conf_Server[i].port > 0)) {
/* BINGO! Enable server */
Conf_Server[i].flags &= ~CONF_SFLAG_DISABLED;
+ Conf_Server[i].lasttry = 0;
return true;
}
}
#endif
strcpy(Conf_IncludeDir, "");
Conf_MorePrivacy = false;
- Conf_NoticeAuth = false;
+ Conf_NoticeBeforeRegistration = false;
Conf_OperCanMode = false;
Conf_OperChanPAutoOp = true;
Conf_OperServerMode = false;
Conf_PAM = false;
#endif
Conf_PAMIsOptional = false;
-#ifdef SYSLOG
Conf_ScrubCTCP = false;
+#ifdef SYSLOG
#ifdef LOG_LOCAL5
Conf_SyslogFacility = LOG_LOCAL5;
#else
}
/**
- * ...
+ * Read in and handle a configuration file.
+ *
+ * @param File Name of the configuration file.
+ * @param fd File descriptor already opened for reading.
*/
-static void Read_Config_File(const char *File, FILE *fd)
+static void
+Read_Config_File(const char *File, FILE *fd)
{
char section[LINE_LEN], str[LINE_LEN], *var, *arg, *ptr;
int i, line = 0;
return;
}
if (strcasecmp(Var, "NoticeAuth") == 0) {
- Conf_NoticeAuth = Check_ArgIsTrue(Arg);
+ /*
+ * TODO: This section and support for "NoticeAuth" variable
+ * could be removed starting with ngIRCd release 24 (one
+ * release after marking it "deprecated") ...
+ */
+ Config_Error(LOG_WARNING,
+ "%s, line %d (section \"Options\"): \"%s\" is deprecated, please use \"NoticeBeforeRegistration\"!",
+ File, Line, Var);
+ Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
+ return;
+ }
+ if (strcasecmp(Var, "NoticeBeforeRegistration") == 0) {
+ Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
return;
}
if (strcasecmp(Var, "OperCanUseMode") == 0) {