Changeset 7bf0f5f0 for protocols


Ignore:
Timestamp:
2006-04-07T09:22:48Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c2fbf86f
Parents:
36fa9bd
Message:

Filled in show_got_added().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r36fa9bd r7bf0f5f0  
    566566/* prpl.c */
    567567
     568struct show_got_added_data
     569{
     570        struct gaim_connection *gc;
     571        char *handle;
     572};
     573
     574void show_got_added_no( gpointer w, struct show_got_added_data *data )
     575{
     576        g_free( data->handle );
     577        g_free( data );
     578}
     579
     580void show_got_added_yes( gpointer w, struct show_got_added_data *data )
     581{
     582        data->gc->prpl->add_buddy( data->gc, data->handle );
     583        add_buddy( data->gc, NULL, data->handle, data->handle );
     584       
     585        return show_got_added_no( w, data );
     586}
     587
    568588void show_got_added( struct gaim_connection *gc, char *handle, const char *realname )
    569589{
    570         return;
     590        struct show_got_added_data *data = g_new0( struct show_got_added_data, 1 );
     591        char *s;
     592       
     593        /* TODO: Make a setting for this! */
     594        if( user_findhandle( gc, handle ) != NULL )
     595                return;
     596       
     597        s = g_strdup_printf( "The user %s is not in your buddy list yet. Do you want to add him/her now?", handle );
     598       
     599        data->gc = gc;
     600        data->handle = g_strdup( handle );
     601        query_add( gc->irc, gc, s, show_got_added_yes, show_got_added_no, data );
    571602}
    572603
Note: See TracChangeset for help on using the changeset viewer.