diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-09-06 01:20:01 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-09-06 01:20:01 +0100 |
commit | 674a01d4640fd869d54e1b9f1474986fda2994de (patch) | |
tree | a4100503ffdadd0b22abafb020f4bf4ffa261a9e /root_commands.c | |
parent | d6657ce1d4fa016bfa0e013f29351229e2cc23d1 (diff) |
Move whatsnew stuff into help.txt. Stop putting too much string content
into the executable.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/root_commands.c b/root_commands.c index 94d22933..f3186562 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1292,37 +1292,21 @@ static void cmd_nick( irc_t *irc, char **cmd ) static void bitlbee_whatsnew( irc_t *irc ) { int last = set_getint( &irc->b->set, "last_version" ); - GString *msg = g_string_new( "" ); - char s[16]; + char s[16], *msg; if( last >= BITLBEE_VERSION_CODE ) return; - if( last < 0x010206 ) /* 1.2.6 */ - { - g_string_append( msg, - "Twitter support. See \x02help account add twitter\x02.\n" ); - } - if( last < 0x010300 ) /* 1.3dev */ - { - g_string_append( msg, - "Support for multiple configurable control channels, " - "each with a subset of your contact list. See " - "\x02help channels\x02 for more information.\n" - "File transfer support for some protocols (more if " - "you use libpurple). Just /DCC SEND stuff. Incoming " - "files also become DCC transfers.\n" - "Many more things, briefly described in " - "\x02help news1.3\x02.\n" ); - } + msg = help_get_whatsnew( &(global.help), last ); - if( msg->len > 0 ) + if( msg ) irc_usermsg( irc, "%s: This seems to be your first time using this " "this version of BitlBee. Here's a list of new " "features you may like to know about:\n\n%s\n", - irc->user->nick, msg->str ); + irc->user->nick, msg ); + + g_free( msg ); - g_string_free( msg, TRUE ); g_snprintf( s, sizeof( s ), "%d", BITLBEE_VERSION_CODE ); set_setstr( &irc->b->set, "last_version", s ); } |