Changeset e5d8d21 for protocols


Ignore:
Timestamp:
2009-11-25T00:45:27Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
487f555
Parents:
0ac1a375
Message:

Added in-memory help info, which I wanted to implement for ages already.
Sadly the way I'm using it now doesn't work yet since nogaim_init() is
called before help_init(). I'll fix that later. (Have to do that anyway
to at least make ForkDaemon mode work..)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    r0ac1a375 re5d8d21  
    2323
    2424#include "bitlbee.h"
     25#include "help.h"
    2526
    2627#include <stdarg.h>
     
    475476       
    476477        g_free( q );
     478       
     479        return pqad;
    477480}
    478481
     
    535538        struct prpl funcs;
    536539        GList *prots;
     540        GString *help;
    537541       
    538542        if( B_EV_IO_READ != PURPLE_INPUT_READ ||
     
    574578        funcs.handle_cmp = g_strcasecmp;
    575579       
     580        help = g_string_new("BitlBee libpurple module supports the following IM protocols:\n");
     581       
    576582        for( prots = purple_plugins_get_protocols(); prots; prots = prots->next )
    577583        {
     
    584590                        ret->name += 5;
    585591                register_protocol( ret );
     592               
     593                g_string_append_printf( help, "\n* %s (%s)", ret->name, prot->info->name );
    586594               
    587595                if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 )
     
    593601                }
    594602        }
    595 }
     603       
     604        help_add_mem( &global.help, "purple", help->str );
     605        g_string_free( help, TRUE );
     606}
Note: See TracChangeset for help on using the changeset viewer.