problem with PURPLE_MESSAGE_AUTO_RESP

Ka-Hing Cheung khc at hxbc.us
Mon Sep 28 13:52:47 EDT 2009


On Mon, 2009-09-28 at 17:13 +0200, Kim Stebel wrote:
> Hello List!
> 
> I'd like to ask for your help with a problem with a plugin I wrote. This plugin replies to certain messages automatically and this can get into an infinite loop if both users use the plugin. I thought this could be fixed like that:
> 
> /*Sending*/
> PurpleMessageFlags flags = PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_AUTO_RESP;
> serv_send_im(gc, who, reply, flag);
> purple_debug_misc(PLUGIN_ID, "flags sent = %d\n", flags);
> 
> 
> 
> /*Receiving*/
> purple_debug_misc(PLUGIN_ID, "flags received = %d\n", flags);
> if (flags & PURPLE_MESSAGE_AUTO_RESP) {
> 	return; //do not send autoreply message
> }
> 
> Unfortunately it doesn't work. The flags received don't match the flags sent. I get sent = 9 and received = 2. Please enlighten me.

Most protocols don't actually carry this flag over. This probably only
works for AIM.

-khc





More information about the Devel mailing list