| 181 PurpleConnection *gc = console->gc; |
181 PurpleConnection *gc = console->gc; |
| 182 GtkTextBuffer *buffer; |
182 GtkTextBuffer *buffer; |
| 183 char *text; |
183 char *text; |
| 184 |
184 |
| 185 gc = console->gc; |
185 gc = console->gc; |
| 186 |
186 |
| 187 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); |
187 if (gc) |
| 188 |
188 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); |
| |
189 |
| 189 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry)); |
190 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry)); |
| 190 gtk_text_buffer_get_start_iter(buffer, &start); |
191 gtk_text_buffer_get_start_iter(buffer, &start); |
| 191 gtk_text_buffer_get_end_iter(buffer, &end); |
192 gtk_text_buffer_get_end_iter(buffer, &end); |
| 192 |
193 |
| 193 text = gtk_imhtml_get_text(GTK_IMHTML(console->entry), &start, &end); |
194 text = gtk_imhtml_get_text(GTK_IMHTML(console->entry), &start, &end); |
| 194 |
195 |
| 195 if (gc && prpl_info->convo_closed != NULL) |
196 if (prpl_info && prpl_info->send_raw != NULL) |
| 196 prpl_info->send_raw(gc, text, strlen(text)); |
197 prpl_info->send_raw(gc, text, strlen(text)); |
| 197 |
198 |
| 198 g_free(text); |
199 g_free(text); |
| 199 gtk_imhtml_clear(GTK_IMHTML(console->entry)); |
200 gtk_imhtml_clear(GTK_IMHTML(console->entry)); |
| 200 } |
201 } |