summaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-04-21 11:19:52 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-04-21 11:19:52 +0000
commitab0dc81bc28f0802dc80e6848d3f813baef28f2e (patch)
tree0d374642fcec755c172368fc476985b50bca72b0 /src/init.c
parentdf8e1b5f39359de9003918f7c3beace9070e71c9 (diff)
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
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c28
1 files changed, 22 insertions, 6 deletions
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();
}