Question about udating a buddy in the buddylist

Florian Bruneau-Voisine bruneauvoisine.florian at gmail.com
Wed Mar 21 17:57:36 EDT 2012


Hi!

Here is my code for auto authorization of remote_user.

I still have the problem of the new buddy appearing offline, if someone had
an idea, he is welcome :)



---------- Forwarded message ----------
From: Florian Bruneau-Voisine <bruneauvoisine.florian at gmail.com>
Date: 2012/3/20
Subject: Question about udating a buddy in the buddylist
To: devel at pidgin.im


Hello

My former problem is resolved now.

Now I have a problem : i don't find how to update a buddy in the buddylist.

 my code when someone wants to auto authorize adding of his account:
"...
                              //this part
works------------------------------------------------------------------------------
                                node =
PURPLE_BLIST_NODE(purple_find_buddy(account, remote_user));
 buddy=purple_buddy_new(account,remote_user,NULL);
purple_blist_add_buddy(buddy,NULL,NULL,node);

//----------------------------------------------------------------------------------------------------
                              //Result is the new buddy is on the buddylist
but he appears Disconnected till i restart Pidgin

                              //I tried with this function, but actually i
don't think it's the good one
purple_account_add_buddy(account,buddy);
..."

Mr Bruneau


>Hello,

>I'm develloping a plugin for libpurble in my studies.

>That plugin would be able to accept or deny all purple_account_request, I
mean once plugin loaded if a remote user add me in his buddy list he would
be automatically >added  ( respectively denied ) to my buddy list without
ask me authorization.

>I would like to know what return value my plugin has to send at

          plugin_return = GPOINTER_TO_INT(
purple_signal_emit_return_1(purple_accounts_get_handle(),
 "account-authorization-requested", account, remote_user));

Because i read in the documentation that purple_signal_emit_return_1
returns the first non-NULL returned value; -Has it to be a gpointer ?and
which one ?

Thanks for reading , and answering.

PS: I alreaddy connected my plugin to this signal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20120321/847d28e8/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoauth.c
Type: text/x-csrc
Size: 5189 bytes
Desc: not available
URL: <http://pidgin.im/pipermail/devel/attachments/20120321/847d28e8/attachment-0002.c>


More information about the Devel mailing list