Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    r4bfca70 r2a6ca4f  
    4646        conf = g_new0( conf_t, 1 );
    4747       
     48#ifdef IPV6
     49        conf->iface = "::";
     50#else
    4851        conf->iface = "0.0.0.0";
     52#endif
    4953        conf->port = 6667;
    5054        conf->nofork = 0;
     
    5357        conf->runmode = RUNMODE_INETD;
    5458        conf->authmode = AUTHMODE_OPEN;
    55         conf->password = NULL;
     59        conf->auth_pass = NULL;
     60        conf->oper_pass = NULL;
    5661        conf->configdir = g_strdup( CONFIG );
    5762        conf->plugindir = g_strdup( PLUGINDIR );
     
    7176        }
    7277       
    73         while( ( opt = getopt( argc, argv, "i:p:nvIDc:d:h" ) ) >= 0 )
     78        while( ( opt = getopt( argc, argv, "i:p:nvIDFc:d:h" ) ) >= 0 )
    7479        {
    7580                if( opt == 'i' )
     
    9499                else if( opt == 'D' )
    95100                        conf->runmode=RUNMODE_DAEMON;
     101                else if( opt == 'F' )
     102                        conf->runmode=RUNMODE_FORKDAEMON;
    96103                else if( opt == 'c' )
    97104                {
     
    118125                                "  -I  Classic/InetD mode. (Default)\n"
    119126                                "  -D  Daemon mode. (Still EXPERIMENTAL!)\n"
     127                                "  -F  Forking daemon. (one process per client)\n"
    120128                                "  -i  Specify the interface (by IP address) to listen on.\n"
    121129                                "      (Default: 0.0.0.0 (any interface))\n"
     
    157165                                if( g_strcasecmp( ini->value, "daemon" ) == 0 )
    158166                                        conf->runmode = RUNMODE_DAEMON;
     167                                else if( g_strcasecmp( ini->value, "forkdaemon" ) == 0 )
     168                                        conf->runmode = RUNMODE_FORKDAEMON;
    159169                                else
    160170                                        conf->runmode = RUNMODE_INETD;
     
    184194                        else if( g_strcasecmp( ini->key, "authpassword" ) == 0 )
    185195                        {
    186                                 conf->password = g_strdup( ini->value );
     196                                conf->auth_pass = g_strdup( ini->value );
     197                        }
     198                        else if( g_strcasecmp( ini->key, "operpassword" ) == 0 )
     199                        {
     200                                conf->oper_pass = g_strdup( ini->value );
    187201                        }
    188202                        else if( g_strcasecmp( ini->key, "hostname" ) == 0 )
Note: See TracChangeset for help on using the changeset viewer.