Blocking conversations
    Sadrul Habib Chowdhury 
    imadil at gmail.com
       
    Wed Aug 27 21:24:42 EDT 2008
    
    
  
* Leandro Rodrigo Saad Cruz had this to say on [27 Aug 2008, 17:18:47 -0300]:
> Hi all. I'm new to pidgin.
> I'm trying to create my first plugin. The plugin should block all
> conversations with a contact based on some criteria.
> How can I accomplish this?
> I tried to hook a function to "writing-im-message" and return TRUE|FALSE.
> but the message is sent anyway.
> >>> purple_signal_connect(conversation, "writing-im-msg", plugin,
> PURPLE_CALLBACK(filterMessage), NULL);
> 
> Am I using the wrong signal?
You need to hook to the 'receiving-im-msg' signal and return non-zero
from the callback if you want to block incoming messages.
The Bot Sentry plugin (http://sourceforge.net/projects/pidgin-bs/)
might interest you.
Sadrul
    
    
More information about the Devel
mailing list