aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-07-31 23:27:13 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2008-07-31 23:27:13 +0100
commite0798ccc765b309b62844de1ef1ce33bbf558484 (patch)
tree118b0c70fee3655296df1e5f6e1abd79bddc695a
parent0f4c2734cd78168c42700d773cca666fab363f66 (diff)
Fixed #440: If there's a -R command line flag, store the passed filename
in the state environment variable (unless it's set already).
-rw-r--r--conf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 909d331a..8e6b6c69 100644
--- a/conf.c
+++ b/conf.c
@@ -77,7 +77,7 @@ 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:hu:" ) ) >= 0 )
+ while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:" ) ) >= 0 )
/* ^^^^ Just to make sure we skip this step from the REHASH handler. */
{
if( opt == 'i' )
@@ -145,6 +145,13 @@ conf_t *conf_load( int argc, char *argv[] )
" -h Show this help page.\n" );
return NULL;
}
+ else if( opt == 'R' )
+ {
+ /* Backward compatibility; older BitlBees passed this
+ info using a command-line flag. Allow people to
+ upgrade from such a version for now. */
+ setenv( "_BITLBEE_RESTART_STATE", optarg, 0 );
+ }
else if( opt == 'u' )
{
g_free( conf->user );