Changeset 674a01d for root_commands.c


Ignore:
Timestamp:
2010-09-06T00:20:01Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
3c9b095
Parents:
d6657ce
Message:

Move whatsnew stuff into help.txt. Stop putting too much string content
into the executable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rd6657ce r674a01d  
    12931293{
    12941294        int last = set_getint( &irc->b->set, "last_version" );
    1295         GString *msg = g_string_new( "" );
    1296         char s[16];
     1295        char s[16], *msg;
    12971296       
    12981297        if( last >= BITLBEE_VERSION_CODE )
    12991298                return;
    13001299       
    1301         if( last < 0x010206 ) /* 1.2.6 */
    1302         {
    1303                 g_string_append( msg,
    1304                         "Twitter support. See \x02help account add twitter\x02.\n" );
    1305         }
    1306         if( last < 0x010300 ) /* 1.3dev */
    1307         {
    1308                 g_string_append( msg,
    1309                         "Support for multiple configurable control channels, "
    1310                         "each with a subset of your contact list. See "
    1311                         "\x02help channels\x02 for more information.\n"
    1312                         "File transfer support for some protocols (more if "
    1313                         "you use libpurple). Just /DCC SEND stuff. Incoming "
    1314                         "files also become DCC transfers.\n"
    1315                         "Many more things, briefly described in "
    1316                         "\x02help news1.3\x02.\n" );
    1317         }
    1318        
    1319         if( msg->len > 0 )
     1300        msg = help_get_whatsnew( &(global.help), last );
     1301       
     1302        if( msg )
    13201303                irc_usermsg( irc, "%s: This seems to be your first time using this "
    13211304                                  "this version of BitlBee. Here's a list of new "
    13221305                                  "features you may like to know about:\n\n%s\n",
    1323                                   irc->user->nick, msg->str );
    1324        
    1325         g_string_free( msg, TRUE );
     1306                                  irc->user->nick, msg );
     1307       
     1308        g_free( msg );
     1309       
    13261310        g_snprintf( s, sizeof( s ), "%d", BITLBEE_VERSION_CODE );
    13271311        set_setstr( &irc->b->set, "last_version", s );
Note: See TracChangeset for help on using the changeset viewer.