From ab0dc81bc28f0802dc80e6848d3f813baef28f2e Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 21 Apr 2007 11:19:52 +0000 Subject: BUILD : 1.7.18 (1237) BUGS : 661 NOTES : Fixed DefCon which did not force DefConChanModes when it was enabled git-svn-id: svn://svn.anope.org/anope/trunk@1237 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@956 5417fbe8-f217-4b02-8779-1006273d7864 --- src/init.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'src/init.c') diff --git a/src/init.c b/src/init.c index f188505b6..880264744 100644 --- a/src/init.c +++ b/src/init.c @@ -475,6 +475,17 @@ int init_secondary(int ac, char **av) /* Parse all remaining command-line options. */ parse_options(ac, av); + /* Parse the defcon mode string if needed */ + if (DefConLevel) { + int defconCount; + for (defconCount = 1; defconCount <= 5; defconCount++) { + if (!defconParseModeString(DefConChanModes)) { + fprintf(stderr, + "services.conf: The given DefConChanModes mode string was incorrect (see log for exact errors)\n"); + return -1; + } + } + } #ifndef _WIN32 if (!nofork) { if ((i = fork()) < 0) { @@ -503,12 +514,17 @@ int init_secondary(int ac, char **av) } } if (!SupportedWindowsVersion()) { - char *winver = GetWindowsVersion(); - alog("%s is not a supported version of Windows", winver); - free(winver); - return -1; - } - if (!nofork) { + + char *winver = GetWindowsVersion(); + + alog("%s is not a supported version of Windows", winver); + + free(winver); + + return -1; + + } + if (!nofork) { alog("Launching Anope into the background"); FreeConsole(); } -- cgit