Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    rcd63d58 r7c9db24  
    7878        }
    7979       
    80         while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hu:" ) ) >= 0 )
     80        while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:" ) ) >= 0 )
    8181        /*     ^^^^ Just to make sure we skip this step from the REHASH handler. */
    8282        {
     
    127127                {
    128128                        printf( "Usage: bitlbee [-D/-F [-i <interface>] [-p <port>] [-n] [-v]] [-I]\n"
    129                                 "               [-c <file>] [-d <dir>] [-h]\n"
     129                                "               [-c <file>] [-d <dir>] [-x] [-h]\n"
    130130                                "\n"
    131131                                "An IRC-to-other-chat-networks gateway\n"
     
    143143                                "  -c  Load alternative configuration file\n"
    144144                                "  -d  Specify alternative user configuration directory\n"
     145                                "  -x  Command-line interface to password encryption/hashing\n"
    145146                                "  -h  Show this help page.\n" );
    146147                        return NULL;
     148                }
     149                else if( opt == 'R' )
     150                {
     151                        /* Backward compatibility; older BitlBees passed this
     152                           info using a command-line flag. Allow people to
     153                           upgrade from such a version for now. */
     154                        setenv( "_BITLBEE_RESTART_STATE", optarg, 0 );
    147155                }
    148156                else if( opt == 'u' )
     
    301309                        else
    302310                        {
    303                                 fprintf( stderr, "Error: Unknown setting `%s` in configuration file.\n", ini->key );
     311                                fprintf( stderr, "Error: Unknown setting `%s` in configuration file (line %d).\n", ini->key, ini->line );
    304312                                return 0;
    305313                                /* For now just ignore unknown keys... */
     
    308316                else if( g_strcasecmp( ini->section, "defaults" ) != 0 )
    309317                {
    310                         fprintf( stderr, "Error: Unknown section [%s] in configuration file. "
    311                                          "BitlBee configuration must be put in a [settings] section!\n", ini->section );
     318                        fprintf( stderr, "Error: Unknown section [%s] in configuration file (line %d). "
     319                                         "BitlBee configuration must be put in a [settings] section!\n", ini->section, ini->line );
    312320                        return 0;
    313321                }
Note: See TracChangeset for help on using the changeset viewer.