Ignore:
Timestamp:
2006-09-24T19:25:06Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4ecdc69
Parents:
cfbb3a6
Message:

Handling of incoming authorization requests, manual block/allow. (Doesn't
seem to be completely like how it works on other IM networks.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber_util.c

    rcfbb3a6 r8e5e2e9  
    149149        return NULL;
    150150}
     151
     152struct jabber_buddy_ask_data
     153{
     154        struct gaim_connection *gc;
     155        char *handle;
     156        char *realname;
     157};
     158
     159static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla )
     160{
     161        presence_send_request( bla->gc, bla->handle, "subscribed" );
     162       
     163        if( find_buddy( bla->gc, bla->handle ) == NULL )
     164                show_got_added( bla->gc, bla->handle, NULL );
     165       
     166        g_free( bla->handle );
     167        g_free( bla );
     168}
     169
     170static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla )
     171{
     172        presence_send_request( bla->gc, bla->handle, "subscribed" );
     173       
     174        g_free( bla->handle );
     175        g_free( bla );
     176}
     177
     178void jabber_buddy_ask( struct gaim_connection *gc, char *handle )
     179{
     180        struct jabber_buddy_ask_data *bla = g_new0( struct jabber_buddy_ask_data, 1 );
     181        char *buf;
     182       
     183        bla->gc = gc;
     184        bla->handle = g_strdup( handle );
     185       
     186        buf = g_strdup_printf( "The user %s wants to add you to his/her buddy list.", handle );
     187        do_ask_dialog( gc, buf, bla, jabber_buddy_ask_yes, jabber_buddy_ask_no );
     188}
Note: See TracChangeset for help on using the changeset viewer.