Changes in / [04cd284:62f53b50]


Ignore:
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.h

    r04cd284 r62f53b50  
    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/CHANGES

    r04cd284 r62f53b50  
    44http://bugs.bitlbee.org/bitlbee/timeline?daysback=90&changeset=on
    55
    6 Version ...
    7 - For the first time since 2007, a dev snapshot. Like then, this is pretty
    8   stable already (running on testing.bitlbee.org for weeks by now), but not
    9   all planned features for the next major release are ready yet, and there
    10   may be some rough edges in the interface and documentation.
    11 - Loads of new stuff, mostly ready for a new major release, but starting with
    12   a dev snapshot. A few changes that were planned for a long time already:
     6Version
     7- Important: This version drops backward compatibility with the file format
     8  used for user settings in versions before 1.2. If you're upgrading from
     9  very old BitlBee versions (like 1.0.x), you'll have to recreate your
     10  BitlBee account - or use an 1.2.x BitlBee once to do the conversion.
    1311- Rewrote the IRC core, which brings:
    1412  * Support for multiple (control) channels, so you can have one channel per
     
    6361- Updated Yahoo! module to be in sync again with libyahoo2. This mostly
    6462  fixes issues with authorization requests.
     63- Show if a contact is mobile or not. See "help set mobile_is_away".
     64- Easier handling of XMPP chatroom invitations.
     65- The chatroom mode of the Twitter module is now enabled by default, since
     66  this was by far the most popular. To disable it, see "help set mode".
     67- Added some Twitter-specific commands that can only be used in the Twitter
     68  window. Most important addition: Retweets. See "help set commands".
     69- Removed some ancient account/nick migration scripts and added one for
     70  easier switching from Pidgin and other libpurple-based clients to BitlBee.
     71- Many bug fixes in both the core and IM modules, small feature enhancements
     72  and other minor changes.
    6573
    6674Finished ...
  • doc/FAQ

    r04cd284 r62f53b50  
    6262   These days, we replaced the Yahoo! code with libyahoo2 (which is a
    6363   separate Yahoo! module. It's derived from Gaim, but separately
    64    maintained) and wrote our own MSN module. More modules are probably going
    65    to be changed, so in the near future, the API might be the only thing
    66    left from Gaim.
    67 
    68 Q: What's that Gaim doing in BitlBee error messages and my Jabber resource?
    69 A: Ah, well, as you probably know we use some of Gaim's IM-modules, and we
    70    don't think it's worth our time to do a search-and-replace over the whole
    71    source to get rid of every reference to Gaim. In fact, we don't want to,
    72    since we don't want to pretend we wrote all that code.
     64   maintained) and wrote our own MSN, Jabber and Twitter modules from
     65   scratch. Most of the API has also been changed, so by now the only traces
     66   of Gaim left are in the "nogaim" filename.
    7367   
    74    About Jabber: If you want a different resource string, you can set it
    75    when logging in by appending it to your Jabber ID, like:
    76    lintux@jabber.com/BitlBee
     68   There is good news for Gaim (or now Pidgin, of course) fans though:
     69   BitlBee can now be compiled to use libpurple for all IM interactions.
     70   This makes BitlBee a bit more resource-hungry, but adds support for many
     71   IM protocols/networks that couldn't be used from BitlBee so far.
  • doc/README

    r04cd284 r62f53b50  
    6767platform. Any recent version of GLib (2.4 or higher) will work.
    6868
    69 These days, MSN Messenger clients have to connect to the MS Passport servers
    70 through HTTPS. BitlBee can use several SSL libraries for this: GnuTLS, NSS
    71 (which comes with Mozilla) and OpenSSL. OpenSSL is not GPL-compatible in some
    72 situations, so using GnuTLS or NSS is preferred. However, especially on *BSD,
    73 OpenSSL can be considered part of the operating system, which eliminates the
    74 GPL incompatibility.
     69These days, many IM protocols use SSL/TLS connections (for authentication
     70or for the whole session). BitlBee can use several SSL libraries for this:
     71GnuTLS, NSS (which comes with Mozilla) and OpenSSL. OpenSSL is not GPL-
     72compatible in some situations, so using GnuTLS is preferred. However,
     73especially on *BSD, OpenSSL can be considered part of the operating system,
     74which eliminates the GPL incompatibility.
    7575
    7676The incompatibility is also the reason why the SSL library detection code
  • doc/user-guide/misc.xml

    r04cd284 r62f53b50  
    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

    r04cd284 r62f53b50  
    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

    r04cd284 r62f53b50  
    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

    r04cd284 r62f53b50  
    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_channel.c

    r04cd284 r62f53b50  
    192192        if( strcmp( value, "control" ) == 0 )
    193193                new = &control_channel_funcs;
    194         else if( strcmp( value, "chat" ) == 0 )
     194        else if( ic != ic->irc->default_channel && strcmp( value, "chat" ) == 0 )
    195195                new = &irc_channel_im_chat_funcs;
    196196        else
  • irc_commands.c

    r04cd284 r62f53b50  
    2626#define BITLBEE_CORE
    2727#include "bitlbee.h"
     28#include "help.h"
    2829#include "ipc.h"
    2930
  • irc_im.c

    r04cd284 r62f53b50  
    530530        irc_channel_t *ic = c->ui_data;
    531531       
    532         if( ic == NULL )
     532        if( ic == NULL || bu == NULL )
    533533                return FALSE;
    534534       
  • irc_send.c

    r04cd284 r62f53b50  
    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;
  • motd.txt

    r04cd284 r62f53b50  
    1717 
    1818... Buzzing, haha, get it?
    19 %
  • protocols/bee_chat.c

    r04cd284 r62f53b50  
    196196        }
    197197       
    198         if( bee->ui->chat_remove_user )
     198        if( bee->ui->chat_remove_user && bu )
    199199                bee->ui->chat_remove_user( bee, c, bu );
    200200}
  • protocols/purple/purple.c

    r04cd284 r62f53b50  
    8080        char help_title[64];
    8181        GString *help;
     82        static gboolean dir_fixed = FALSE;
     83       
     84        /* Layer violation coming up: Making an exception for libpurple here.
     85           Dig in the IRC state a bit to get a username. Ideally we should
     86           check if s/he identified but this info doesn't seem *that* important.
     87           It's just that fecking libpurple can't *not* store this shit.
     88           
     89           Remember that libpurple is not really meant to be used on public
     90           servers anyway! */
     91        if( !dir_fixed )
     92        {
     93                irc_t *irc = acc->bee->ui_data;
     94                char *dir;
     95               
     96                dir = g_strdup_printf( "%s/purple/%s", global.conf->configdir, irc->user->nick );
     97                purple_util_set_user_dir( dir );
     98                g_free( dir );
     99               
     100                purple_blist_load();
     101                purple_prefs_load();
     102                dir_fixed = TRUE;
     103        }
    82104       
    83105        help = g_string_new( "" );
     
    254276        PurpleAccount *pa;
    255277       
    256         if( local_bee != NULL && local_bee != acc->bee )
     278        if( ( local_bee != NULL && local_bee != acc->bee ) ||
     279            ( global.conf->runmode == RUNMODE_DAEMON && !getenv( "BITLBEE_DEBUG" ) ) )
    257280        {
    258281                imcb_error( ic,  "Daemon mode detected. Do *not* try to use libpurple in daemon mode! "
     
    351374        account_t *acc = set->data;
    352375        struct im_connection *ic = acc->ic;
     376       
     377        if( ic )
     378                imcb_log( ic, "Changing display_name not currently supported with libpurple!" );
    353379       
    354380        return NULL;
     
    517543}
    518544
    519 struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password )
     545struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password, set_t **sets )
    520546{
    521547        PurpleAccount *pa = ic->proto_data;
     
    11321158        GList *prots;
    11331159        GString *help;
     1160        char *dir;
    11341161       
    11351162        if( B_EV_IO_READ != PURPLE_INPUT_READ ||
     
    11401167        }
    11411168       
    1142         purple_util_set_user_dir( "/tmp" );
     1169        dir = g_strdup_printf( "%s/purple", global.conf->configdir );
     1170        purple_util_set_user_dir( dir );
     1171        g_free( dir );
     1172       
    11431173        purple_debug_set_enabled( FALSE );
    11441174        purple_core_set_ui_ops( &bee_core_uiops );
     
    11511181        }
    11521182       
    1153         /* This seems like stateful shit we don't want... */
    11541183        purple_set_blist( purple_blist_new() );
    1155         purple_blist_load();
    1156        
    1157         /* Meh? */
    1158         purple_prefs_load();
    11591184       
    11601185        /* No, really. So far there were ui_ops for everything, but now suddenly
     
    12211246       
    12221247        g_string_append( help, "\n\nFor used protocols, more information about available "
    1223                          "settings can be found using \x02help purple <protocol name>\x02" );
     1248                         "settings can be found using \x02help purple <protocol name>\x02 "
     1249                         "(create an account using that protocol first!)" );
    12241250       
    12251251        /* Add a simple dynamically-generated help item listing all
  • protocols/twitter/twitter.c

    r04cd284 r62f53b50  
    2929#include "url.h"
    3030
     31#define twitter_msg( ic, fmt... ) \
     32        do {                                                        \
     33                struct twitter_data *td = ic->proto_data;           \
     34                if( td->home_timeline_gc )                          \
     35                        imcb_chat_log( td->home_timeline_gc, fmt ); \
     36                else                                                \
     37                        imcb_log( ic, fmt );                        \
     38        } while( 0 );
     39               
     40
    3141/**
    3242 * Main loop function
     
    436446                if( id )
    437447                        twitter_status_destroy( ic, id );
     448                else
     449                        twitter_msg( ic, "Could not undo last action" );
    438450               
    439451                g_free( cmds );
     
    467479                if( id )
    468480                        twitter_status_retweet( ic, id );
     481                else
     482                        twitter_msg( ic, "User `%s' does not exist or didn't "
     483                                         "post any statuses recently", cmd[1] );
    469484               
    470485                g_free( cmds );
  • root_commands.c

    r04cd284 r62f53b50  
    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.