|
From: Etan R. <de...@ed...> - 2005-01-06 09:55:21
|
On Thu, 6 Jan 2005, Felipe Ceglia wrote:
> I have the following function in perl, can anyone help me?
>
> sub send_message {
> Gaim::debug_info($::PLUGIN_INFO{name}, "Entering send_message\n");
> #my ($IM, $message) = @{$_[0]}; #not sure why this isnt working
> my ($IM, $message) = @_;
>
> #Gaim::debug_info($::PLUGIN_INFO{name}, "Shifting timeouts\n");
> #shift @timeouts;
>
> Gaim::debug_info($::PLUGIN_INFO{name}, "Sending message: $message
> - To: $IM\n");
> Gaim::Conversation::IM::send($IM,$message);
> Gaim::debug_info($::PLUGIN_INFO{name}, "Exiting send_message\n");
>
> return undef;
> }
>
> when I call it:
> &send_message($IM, $message);
> the debug says:
>
> : Entering send_message
> : Sending message: <FONT FACE="MS Sans Serif"><FONT COLOR="#000000">TEST
> MESSAGE</FONT></FONT> - To: che...@te...
> g_log: file conversation.c: line 1721 (gaim_conv_im_send): assertion `im !=
> NULL' failed
> : Exiting send_message
Where are you getting $IM from?
I don't think the first argument to Gaim::Conversation::IM::send is
supposed to be a string containing the name of the person to send to. I
think it's supposed to be the IM part of a gaim conversation which you
get from something like gaim_conversation_get_im_data($conv) where $conv
is a Gaim::Conversation.
-Etan
|