Add autoconnect option for Connect block.
[ircu2.10.12-pk.git] / ircd / ircd.c
index 5703c39905dc16754add18c1cfe2260df242ce0d..f2903003fdc476ef3068d3068aa80b51cc0b3bdd 100644 (file)
@@ -69,6 +69,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/time.h>
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
@@ -264,6 +265,7 @@ static void try_connections(struct Event* ev) {
      */
     if (!(aconf->status & CONF_SERVER)
         || aconf->address.port == 0
+        || !(aconf->flags & CONF_AUTOCONNECT)
         || ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)))
       continue;
 
@@ -500,11 +502,18 @@ static void parse_command_line(int argc, char** argv) {
       debugmode = optarg;
       thisServer.bootopt |= BOOT_DEBUG;
       break;
-      
+
     default:
-      printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntvk]\n");
-      printf("\n -n -t\t Don't detach\n -v\t display version\n -k\t exit after checking config\n\n");
-      printf("Server not started.\n");
+      printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntv] [-k [-c clispec]]\n"
+             "\n -f config\t specify explicit configuration file"
+             "\n -x loglevel\t set debug logging verbosity"
+             "\n -n or -t\t don't detach"
+             "\n -v\t\t display version"
+             "\n -k\t\t exit after checking config"
+             "\n -c clispec\t search for client/kill blocks matching client"
+             "\n\t\t clispec is comma-separated list of user@host,"
+             "\n\t\t user@ip, $Rrealname, and port number"
+             "\n\nServer not started.\n");
       exit(1);
     }
 }