responding to IM's with a plugin

Michael mailinglists at fuzzymonkey.org
Sun Mar 2 12:09:53 EST 2008


I'm having difficulty responding to received IM's using a plugin.  I was
wondering if anyone has an example or sending a response based on what is
received.  I happen to be using Perl but would welcome a C example as well.

The problem is that the received message has a $conv element that appears to be
null.  If it wasn't null, I could just do the following in the received IM callback:

sub newmessage_cb
{
     my ($account, $sender, $message, $conv, $flags, $data) = @_;

     ...

     $im = $conv->get_im_data();
     $im->send("Message Test.");
}

Again, unfortunately $conv appears to be null upon receiving a message even
though the $sender and $message appear to be valid.  I cannot seem to find
another way to get the $im (or PurpleConvIm *im).

Thanks in advance for the help,
Michael




More information about the Devel mailing list