diff options
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -44,7 +44,8 @@ conf_t *conf_load( int argc, char *argv[] ) conf = g_new0( conf_t, 1 ); - conf->iface = NULL; + conf->iface_in = NULL; + conf->iface_out = NULL; conf->port = g_strdup( "6667" ); conf->nofork = 0; conf->verbose = 0; @@ -77,12 +78,12 @@ conf_t *conf_load( int argc, char *argv[] ) at a *valid* configuration file. */ } - while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:" ) ) >= 0 ) + while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hu:" ) ) >= 0 ) /* ^^^^ Just to make sure we skip this step from the REHASH handler. */ { if( opt == 'i' ) { - conf->iface = g_strdup( optarg ); + conf->iface_in = g_strdup( optarg ); } else if( opt == 'p' ) { @@ -131,7 +132,7 @@ conf_t *conf_load( int argc, char *argv[] ) "An IRC-to-other-chat-networks gateway\n" "\n" " -I Classic/InetD mode. (Default)\n" - " -D Daemon mode. (Still EXPERIMENTAL!)\n" + " -D Daemon mode. (one process serves all)\n" " -F Forking daemon. (one process per client)\n" " -u Run daemon as specified user.\n" " -P Specify PID-file (not for inetd mode)\n" @@ -145,14 +146,6 @@ conf_t *conf_load( int argc, char *argv[] ) " -h Show this help page.\n" ); return NULL; } - else if( opt == 'R' ) - { - /* We can't load the statefile yet (and should make very sure we do this - only once), so set the filename here and load the state information - when initializing ForkDaemon. (This option only makes sense in that - mode anyway!) */ - ipc_master_set_statefile( optarg ); - } else if( opt == 'u' ) { g_free( conf->user ); @@ -202,14 +195,19 @@ static int conf_loadini( conf_t *conf, char *file ) } else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) { - g_free( conf->iface ); - conf->iface = g_strdup( ini->value ); + g_free( conf->iface_in ); + conf->iface_in = g_strdup( ini->value ); } else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) { g_free( conf->port ); conf->port = g_strdup( ini->value ); } + else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 ) + { + g_free( conf->iface_out ); + conf->iface_out = g_strdup( ini->value ); + } else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) { if( g_strcasecmp( ini->value, "registered" ) == 0 ) @@ -257,7 +255,7 @@ static int conf_loadini( conf_t *conf, char *file ) else if( g_strcasecmp( ini->key, "account_storage_migrate" ) == 0 ) { g_strfreev( conf->migrate_storage ); - conf->migrate_storage = g_strsplit( ini->value, " \t,;", -1 ); + conf->migrate_storage = g_strsplit_set( ini->value, " \t,;", -1 ); } else if( g_strcasecmp( ini->key, "pinginterval" ) == 0 ) { |