From de0e93c9acf7221f1c1ccd0d1f0ab7612bf67781 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 2 May 2012 08:58:22 +0100 Subject: [PATCH] Set PACKAGE to BitlBee-LIBPURPLE for the libpurple variant, because in many ways it's not BitlBee and I'm tired of getting libpurple-related bug reports. --- bitlbee.h | 2 +- configure | 3 +++ ipc.c | 2 +- irc_commands.c | 4 ++-- irc_send.c | 5 +++-- irc_user.c | 2 +- unix.c | 6 +++--- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bitlbee.h b/bitlbee.h index 6426685..6c3a437 100644 --- a/bitlbee.h +++ b/bitlbee.h @@ -122,7 +122,7 @@ extern "C" { #define DEFAULT_AWAY "Away from computer" #define CONTROL_TOPIC "Welcome to the control channel. Type \2help\2 for help information." -#define IRCD_INFO "BitlBee " +#define IRCD_INFO PACKAGE " " #define MAX_NICK_LENGTH 24 diff --git a/configure b/configure index 5cfa903..91e7612 100755 --- a/configure +++ b/configure @@ -640,6 +640,9 @@ EOF jabber=0 oscar=0 yahoo=0 + + echo '#undef PACKAGE' >> config.h + echo '#define PACKAGE "BitlBee-LIBPURPLE"' >> config.h if [ "$events" = "libevent" ]; then echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling' diff --git a/ipc.c b/ipc.c index 26102d4..fa23d98 100644 --- a/ipc.c +++ b/ipc.c @@ -989,7 +989,7 @@ int ipc_master_load_state( char *statefile ) } ipc_to_children_str( "HELLO\r\n" ); - ipc_to_children_str( "OPERMSG :New BitlBee master process started (version " BITLBEE_VERSION ")\r\n" ); + ipc_to_children_str( "OPERMSG :New %s master process started (version %s)\r\n", PACKAGE, BITLBEE_VERSION ); fclose( fp ); return 1; diff --git a/irc_commands.c b/irc_commands.c index 0dbf8ee..9a46f88 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -681,8 +681,8 @@ static void irc_cmd_list( irc_t *irc, char **cmd ) static void irc_cmd_version( irc_t *irc, char **cmd ) { - irc_send_num( irc, 351, "bitlbee-%s. %s :%s/%s ", - BITLBEE_VERSION, irc->root->host, ARCH, CPU ); + irc_send_num( irc, 351, "%s-%s. %s :%s/%s ", + PACKAGE, BITLBEE_VERSION, irc->root->host, ARCH, CPU ); } static void irc_cmd_completions( irc_t *irc, char **cmd ) diff --git a/irc_send.c b/irc_send.c index 7739f79..ba9678b 100644 --- a/irc_send.c +++ b/irc_send.c @@ -39,8 +39,9 @@ void irc_send_num( irc_t *irc, int code, char *format, ... ) void irc_send_login( irc_t *irc ) { - irc_send_num( irc, 1, ":Welcome to the BitlBee gateway, %s", irc->user->nick ); - irc_send_num( irc, 2, ":Host %s is running BitlBee " BITLBEE_VERSION " " ARCH "/" CPU ".", irc->root->host ); + irc_send_num( irc, 1, ":Welcome to the %s gateway, %s", PACKAGE, irc->user->nick ); + irc_send_num( irc, 2, ":Host %s is running %s %s %s/%s.", irc->root->host, + PACKAGE, BITLBEE_VERSION, ARCH, CPU ); irc_send_num( irc, 3, ":%s", IRCD_INFO ); irc_send_num( irc, 4, "%s %s %s %s", irc->root->host, BITLBEE_VERSION, UMODES UMODES_PRIV, CMODES ); irc_send_num( irc, 5, "PREFIX=(ohv)@%%+ CHANTYPES=%s CHANMODES=,,,%s NICKLEN=%d CHANNELLEN=%d " diff --git a/irc_user.c b/irc_user.c index db6fe53..affea60 100644 --- a/irc_user.c +++ b/irc_user.c @@ -232,7 +232,7 @@ static gboolean root_ctcp( irc_user_t *iu, char * const *ctcp ) if( g_strcasecmp( ctcp[0], "VERSION" ) == 0 ) { irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001", - ctcp[0], "BitlBee " BITLBEE_VERSION " " ARCH "/" CPU ); + ctcp[0], PACKAGE " " BITLBEE_VERSION " " ARCH "/" CPU ); } else if( g_strcasecmp( ctcp[0], "PING" ) == 0 ) { diff --git a/unix.c b/unix.c index 2ad2edf..b2b235e 100644 --- a/unix.c +++ b/unix.c @@ -112,7 +112,7 @@ int main( int argc, char *argv[] ) log_link( LOGLVL_WARNING, LOGOUTPUT_IRC ); i = bitlbee_inetd_init(); - log_message( LOGLVL_INFO, "BitlBee %s starting in inetd mode.", BITLBEE_VERSION ); + log_message( LOGLVL_INFO, "%s %s starting in inetd mode.", PACKAGE, BITLBEE_VERSION ); } else if( global.conf->runmode == RUNMODE_DAEMON ) @@ -121,7 +121,7 @@ int main( int argc, char *argv[] ) log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE ); i = bitlbee_daemon_init(); - log_message( LOGLVL_INFO, "BitlBee %s starting in daemon mode.", BITLBEE_VERSION ); + log_message( LOGLVL_INFO, "%s %s starting in daemon mode.", PACKAGE, BITLBEE_VERSION ); } else if( global.conf->runmode == RUNMODE_FORKDAEMON ) { @@ -138,7 +138,7 @@ int main( int argc, char *argv[] ) } i = bitlbee_daemon_init(); - log_message( LOGLVL_INFO, "BitlBee %s starting in forking daemon mode.", BITLBEE_VERSION ); + log_message( LOGLVL_INFO, "%s %s starting in forking daemon mode.", PACKAGE, BITLBEE_VERSION ); } if( i != 0 ) return( i ); -- 2.11.4.GIT