Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    rf4a5940 r4bfca70  
    4646        conf = g_new0( conf_t, 1 );
    4747       
    48 #ifdef IPV6
    49         conf->iface = "::";
    50 #else
    5148        conf->iface = "0.0.0.0";
    52 #endif
    5349        conf->port = 6667;
    5450        conf->nofork = 0;
     
    5753        conf->runmode = RUNMODE_INETD;
    5854        conf->authmode = AUTHMODE_OPEN;
    59         conf->auth_pass = NULL;
    60         conf->oper_pass = NULL;
     55        conf->password = NULL;
    6156        conf->configdir = g_strdup( CONFIG );
    6257        conf->plugindir = g_strdup( PLUGINDIR );
     
    6459        conf->ping_interval = 180;
    6560        conf->ping_timeout = 300;
    66         proxytype = 0;
    6761       
    6862        i = conf_loadini( conf, CONF_FILE );
     
    7771        }
    7872       
    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 )
    8174        {
    8275                if( opt == 'i' )
     
    9487                }
    9588                else if( opt == 'n' )
    96                         conf->nofork = 1;
     89                        conf->nofork=1;
    9790                else if( opt == 'v' )
    98                         conf->verbose = 1;
     91                        conf->verbose=1;
    9992                else if( opt == 'I' )
    100                         conf->runmode = RUNMODE_INETD;
     93                        conf->runmode=RUNMODE_INETD;
    10194                else if( opt == 'D' )
    102                         conf->runmode = RUNMODE_DAEMON;
    103                 else if( opt == 'F' )
    104                         conf->runmode = RUNMODE_FORKDAEMON;
     95                        conf->runmode=RUNMODE_DAEMON;
    10596                else if( opt == 'c' )
    10697                {
     
    110101                                CONF_FILE = g_strdup( optarg );
    111102                                g_free( conf );
    112                                 /* Re-evaluate arguments. Don't use this option twice,
    113                                    you'll end up in an infinite loop! Hope this trick
    114                                    works with all libcs BTW.. */
    115                                 optind = 1;
    116103                                return( conf_load( argc, argv ) );
    117104                        }
     
    131118                                "  -I  Classic/InetD mode. (Default)\n"
    132119                                "  -D  Daemon mode. (Still EXPERIMENTAL!)\n"
    133                                 "  -F  Forking daemon. (one process per client)\n"
    134120                                "  -i  Specify the interface (by IP address) to listen on.\n"
    135121                                "      (Default: 0.0.0.0 (any interface))\n"
     
    171157                                if( g_strcasecmp( ini->value, "daemon" ) == 0 )
    172158                                        conf->runmode = RUNMODE_DAEMON;
    173                                 else if( g_strcasecmp( ini->value, "forkdaemon" ) == 0 )
    174                                         conf->runmode = RUNMODE_FORKDAEMON;
    175159                                else
    176160                                        conf->runmode = RUNMODE_INETD;
     
    200184                        else if( g_strcasecmp( ini->key, "authpassword" ) == 0 )
    201185                        {
    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 );
    207187                        }
    208188                        else if( g_strcasecmp( ini->key, "hostname" ) == 0 )
Note: See TracChangeset for help on using the changeset viewer.