Proposed attention API

deckrider deckrider at
Mon Aug 13 16:29:52 EDT 2007

Hmmm....looking through the patches I don't see it, but I would like
some signal like this (I know y'all don't do stuff just for plugins,
but I'll give some rationale):


gboolean (*receiving_im_attention)(PurpleAccount *account, char **sender,
                             PurpleConversation *conv,
                             PurpleMessageFlags *flags);

    Emitted when an IM-Attention is received. The callback can replace
the name of the sender, the message, or the flags by modifying the
pointer to the strings and integer. This can also be used to cancel a
message by returning TRUE.

    Make sure to free *sender before you replace it!

    TRUE if the attention should be canceled, or FALSE otherwise.

    	account 	The account the message was received on.
    	sender 	A pointer to the username of the sender.
    	conv 	The IM conversation.
    	flags 	A pointer to the IM message flags.


Allow privacy and other plugins to block this.  Otherwise, it's
basically a leak around the privacy functions (similar to auth spam).

Account and Sender could be used to see if that person is in your
buddy list (or by bot-sentry to autoreply with its question), and the
return of TRUE/FALSE could permit or block the attention/buzz.  Conv
would be used to check if there is already a conversation (Bot Sentry
allows things through it there is already a conversation).

Thanks for considering this!

More information about the Devel mailing list