--- a/splitter/splitter.c Thu Dec 17 20:26:20 2009 -0500
+++ b/splitter/splitter.c Thu Dec 17 21:01:36 2009 -0500
@@ -123,7 +123,6 @@
char *displayed = NULL, *sent = NULL;
if (strlen(message) == 0)
@@ -150,59 +149,12 @@
msgflags |= PURPLE_MESSAGE_SEND;
if (type == PURPLE_CONV_TYPE_IM) {
- PurpleConvIm *im = PURPLE_CONV_IM(conv);
- if (sent != NULL && sent[0] != '\0') {
- err = serv_send_im(gc, purple_conversation_get_name(conv),
- if ((err > 0) && (displayed != NULL))
- purple_conv_im_write(im, NULL, displayed, msgflags, time(NULL));
- purple_signal_emit(purple_conversations_get_handle(), "sent-im-msg",
- purple_conversation_get_name(conv), sent);
+ if (sent != NULL && sent[0] != '\0') + purple_conv_im_send_with_flags(PURPLE_CONV_IM(conv), sent, msgflags); - if (sent != NULL && sent[0] != '\0') {
- err = serv_chat_send(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)), sent, msgflags);
- purple_signal_emit(purple_conversations_get_handle(), "sent-chat-msg",
- purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)));
- who = purple_conversation_get_name(conv);
- msg = _("Unable to send message: The message is too large.");
- if (!purple_conv_present_error(who, account, msg)) {
- char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
- purple_notify_error(gc, NULL, msg2, _("The message is too large."));
- else if (err == -ENOTCONN) {
- purple_debug(PURPLE_DEBUG_ERROR, "conversation",
- "Not yet connected.\n");
- msg = _("Unable to send message.");
- if (!purple_conv_present_error(who, account, msg)) {
- char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
- purple_notify_error(gc, NULL, msg2, NULL);
+ if (sent != NULL && sent[0] != '\0') + purple_conv_chat_send_with_flags(PURPLE_CONV_CHAT(conv), sent, msgflags);