Perl Plugin: Send Pidgin User a Message

Tom Krizan tomkrizan at
Mon Dec 14 16:36:30 EST 2009

Hi all,
I would like to send the user of Pidgin a message on an event.  The
documentation told me to use:
print "Message";
But I get this error in the debug window:
(15:10:31) oscar: incomingim_ch1: unknown TLV 0x0013 (len 1)
(15:10:31) oscar: Received IM from tom with 1 parts
If I delete the print "Message"; part, the plugin works fine.  Also,
there should be another item that sends text to both users but that
does not happen (the print error kills it?).  I tried
$im->conv_write("message"); but that sends the message to both users
(whereas I only want the Pidgin user to see it.)
If I'm unclear, I want a message to be sent to the Pidgin User, but
not the chat buddy.  For an example, when sending a file to someone,
Pidgin says "Attempting to start file transfer of ..." and you'll
notice that that is only in the Pidgin users window.  The Chat buddy
see's "Tom is attempting to send you a file."

While we're at it, I manipulate the conversation so that my sent
message is changed, but the conversation still sees both messages.
How can I stop the original message?
My Code:
			my $im;
			my @convs = Purple::get_conversations();
			foreach my $conv (@convs) {
				$im = $conv->get_im_data() and last if $conv->get_name eq $sender;
$im->send("My manipulated message is: $message"); #BUG: Shows both
users the message but sends the original non-manipulated message

I want only the above to be sent, getting rid of the original message.


More information about the Devel mailing list