Changes in conf.c [f4a5940:4bfca70]
Legend:
- Unmodified
- Added
- Removed
-
conf.c
rf4a5940 r4bfca70 46 46 conf = g_new0( conf_t, 1 ); 47 47 48 #ifdef IPV649 conf->iface = "::";50 #else51 48 conf->iface = "0.0.0.0"; 52 #endif53 49 conf->port = 6667; 54 50 conf->nofork = 0; … … 57 53 conf->runmode = RUNMODE_INETD; 58 54 conf->authmode = AUTHMODE_OPEN; 59 conf->auth_pass = NULL; 60 conf->oper_pass = NULL; 55 conf->password = NULL; 61 56 conf->configdir = g_strdup( CONFIG ); 62 57 conf->plugindir = g_strdup( PLUGINDIR ); … … 64 59 conf->ping_interval = 180; 65 60 conf->ping_timeout = 300; 66 proxytype = 0;67 61 68 62 i = conf_loadini( conf, CONF_FILE ); … … 77 71 } 78 72 79 while( argc > 0 && ( opt = getopt( argc, argv, "i:p:nvIDFc:d:h" ) ) >= 0 ) 80 /* ^^^^ Just to make sure we skip this step from the REHASH handler. */ 73 while( ( opt = getopt( argc, argv, "i:p:nvIDc:d:h" ) ) >= 0 ) 81 74 { 82 75 if( opt == 'i' ) … … 94 87 } 95 88 else if( opt == 'n' ) 96 conf->nofork =1;89 conf->nofork=1; 97 90 else if( opt == 'v' ) 98 conf->verbose =1;91 conf->verbose=1; 99 92 else if( opt == 'I' ) 100 conf->runmode =RUNMODE_INETD;93 conf->runmode=RUNMODE_INETD; 101 94 else if( opt == 'D' ) 102 conf->runmode = RUNMODE_DAEMON; 103 else if( opt == 'F' ) 104 conf->runmode = RUNMODE_FORKDAEMON; 95 conf->runmode=RUNMODE_DAEMON; 105 96 else if( opt == 'c' ) 106 97 { … … 110 101 CONF_FILE = g_strdup( optarg ); 111 102 g_free( conf ); 112 /* Re-evaluate arguments. Don't use this option twice,113 you'll end up in an infinite loop! Hope this trick114 works with all libcs BTW.. */115 optind = 1;116 103 return( conf_load( argc, argv ) ); 117 104 } … … 131 118 " -I Classic/InetD mode. (Default)\n" 132 119 " -D Daemon mode. (Still EXPERIMENTAL!)\n" 133 " -F Forking daemon. (one process per client)\n"134 120 " -i Specify the interface (by IP address) to listen on.\n" 135 121 " (Default: 0.0.0.0 (any interface))\n" … … 171 157 if( g_strcasecmp( ini->value, "daemon" ) == 0 ) 172 158 conf->runmode = RUNMODE_DAEMON; 173 else if( g_strcasecmp( ini->value, "forkdaemon" ) == 0 )174 conf->runmode = RUNMODE_FORKDAEMON;175 159 else 176 160 conf->runmode = RUNMODE_INETD; … … 200 184 else if( g_strcasecmp( ini->key, "authpassword" ) == 0 ) 201 185 { 202 conf->auth_pass = g_strdup( ini->value ); 203 } 204 else if( g_strcasecmp( ini->key, "operpassword" ) == 0 ) 205 { 206 conf->oper_pass = g_strdup( ini->value ); 186 conf->password = g_strdup( ini->value ); 207 187 } 208 188 else if( g_strcasecmp( ini->key, "hostname" ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.