Changeset 674a01d


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.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.h

    rd6657ce r674a01d  
    137137#include "log.h"
    138138#include "ini.h"
    139 #include "help.h"
    140139#include "query.h"
    141140#include "sock.h"
     
    147146        int listen_socket;
    148147        gint listen_watch_source_id;
    149         help_t *help;
     148        struct help *help;
    150149        char *conf_file;
    151150        conf_t *conf;
  • doc/user-guide/misc.xml

    rd6657ce r674a01d  
    268268</sect1>
    269269
     270<sect1 id="whatsnew010206">
     271<title>New stuff in BitlBee 1.2.6</title>
     272
     273<para>
     274Twitter support. See <emphasis>help account add twitter</emphasis>.
     275</para>
     276</sect1>
     277
     278<sect1 id="whatsnew010300">
     279<title>New stuff in BitlBee 1.3dev</title>
     280
     281<para>
     282Support for multiple configurable control channels, each with a subset of
     283your contact list. See <emphasis>help channels</emphasis> for more
     284information.
     285</para>
     286
     287<para>
     288File transfer support for some protocols (more if you use libpurple). Just
     289/DCC SEND stuff. Incoming files also become DCC transfers.
     290</para>
     291
     292<para>
     293Only if you run your own BitlBee instance: You can build a BitlBee that uses
     294libpurple for connecting to IM networks instead of its own code, adding
     295support for some of the more obscure IM protocols and features.
     296</para>
     297
     298<para>
     299Many more things, briefly described in <emphasis>help news1.3</emphasis>.
     300</para>
     301</sect1>
     302
    270303<sect1 id="news1.3">
    271 <title>New stuff in BitlBee 1.3dev</title>
     304<title>New stuff in BitlBee 1.3dev (details)</title>
    272305
    273306<para>
  • help.c

    rd6657ce r674a01d  
    22  * BitlBee -- An IRC to other IM-networks gateway                     *
    33  *                                                                    *
    4   * Copyright 2002-2009 Wilmer van der Gaast and others                *
     4  * Copyright 2002-2010 Wilmer van der Gaast and others                *
    55  \********************************************************************/
    66
     
    2626#define BITLBEE_CORE
    2727#include "bitlbee.h"
     28#include "help.h"
    2829#undef read
    2930#undef write
     
    194195        return 1;
    195196}
     197
     198char *help_get_whatsnew( help_t **help, int old )
     199{
     200        GString *ret = NULL;
     201        help_t *h;
     202        int v;
     203       
     204        for( h = *help; h; h = h->next )
     205                if( h->title != NULL && strncmp( h->title, "whatsnew", 8 ) == 0 &&
     206                    sscanf( h->title + 8, "%x", &v ) == 1 && v > old )
     207                {
     208                        char *s = help_get( &h, h->title );
     209                        if( ret == NULL )
     210                                ret = g_string_new( s );
     211                        else
     212                                g_string_append_printf( ret, "\n\n%s", s );
     213                        g_free( s );
     214                }
     215       
     216        return ret ? g_string_free( ret, FALSE ) : NULL;
     217}
  • help.h

    rd6657ce r674a01d  
    4747char *help_get( help_t **help, char *title );
    4848int help_add_mem( help_t **help, const char *title, const char *content_ );
     49char *help_get_whatsnew( help_t **help, int old );
    4950
    5051#endif
  • irc.c

    rd6657ce r674a01d  
    112112        s = set_add( &b->set, "last_version", NULL, NULL, irc );
    113113        s->flags |= SET_HIDDEN;
     114        s->value = g_strdup_printf( "%d", BITLBEE_VERSION_CODE );
    114115        s = set_add( &b->set, "lcnicks", "true", set_eval_bool, irc );
    115116        s = set_add( &b->set, "nick_format", "%-@nick", NULL, irc );
  • irc_commands.c

    rd6657ce r674a01d  
    2626#define BITLBEE_CORE
    2727#include "bitlbee.h"
     28#include "help.h"
    2829#include "ipc.h"
    2930
  • irc_send.c

    rd6657ce r674a01d  
    114114        irc_channel_t *ic = NULL;
    115115        irc_user_t *iu = irc->root;
    116         char text[1024];
     116        char text[1100];
    117117        va_list params;
    118118        char *dst;
  • 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.