add in blist request, fake home dir

Anatoliy Belsky thinker at online.de
Sun Feb 10 02:40:48 EST 2008


On Saturday 09 February 2008, Mark Doliner wrote:
> I think you could use purple_find_buddies() or purple_find_buddy().  If it
> returns NULL then the person is not in your buddy list.

pbuddy = purple_find_buddy(paccount, !who ? 
purple_conversation_get_name(conv) : who);
		
if(!pbuddy) {
	pbuddy = purple_buddy_new(paccount, !who ? 
purple_conversation_get_name(conv) : who, NULL);
}

if(purple_find_buddy(paccount, !who ? purple_conversation_get_name(conv) : 
who)) {
	/*shouldn't come into this*/
	php_printf("the buddy is found\n");
}

so this piece of code worked, but I don't understand why ...) the buddy was 
created but isn't on the blist and will not be automatically saved... this is 
the case, where we become messages from the buddies, which aren't in our 
blist .. ok, this is exactly what i need

i would ask a couple of questions more:

- while creating an account one must provide the password/username pair and 
use purple_account_new, purple_account_set_password and so on. One thing i 
can't find is - how i could set the server address and port. Or is this read 
from the xml only?

- is there any info, how many accounts/buddies/groups etc. can libpurple hold 
at once?

thanks for the help

Anatoliy




More information about the Devel mailing list