aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-14 00:25:40 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-14 00:25:40 +0200
commit3d1481f0c57ade74fb1d888bce8ce4e8e17bc269 (patch)
treea38e0b5565cc65f2d49b84d493a24e8df07cec05
parent40bc82df007cb78b155a098dae86b1d5bc7cda9f (diff)
Adding -V flag to show version info from a not-serving binary. (Bug #580)
-rw-r--r--conf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index b997fb0a..337d0cfe 100644
--- a/conf.c
+++ b/conf.c
@@ -78,7 +78,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:hR:u:" ) ) >= 0 )
+ while( argc > 0 && ( opt = getopt( argc, argv, "i:p:P:nvIDFc:d:hR:u:V" ) ) >= 0 )
/* ^^^^ Just to make sure we skip this step from the REHASH handler. */
{
if( opt == 'i' )
@@ -144,7 +144,14 @@ conf_t *conf_load( int argc, char *argv[] )
" -c Load alternative configuration file\n"
" -d Specify alternative user configuration directory\n"
" -x Command-line interface to password encryption/hashing\n"
- " -h Show this help page.\n" );
+ " -h Show this help page.\n"
+ " -V Show version info.\n" );
+ return NULL;
+ }
+ else if( opt == 'V' )
+ {
+ printf( "BitlBee %s\nAPI version %06x\n",
+ BITLBEE_VERSION, BITLBEE_VERSION_CODE );
return NULL;
}
else if( opt == 'R' )