| 904 if (err > 0) { |
904 if (err > 0) { |
| 905 write_to_conv(c, buf, WFLAG_SEND, NULL, time(NULL)); |
905 write_to_conv(c, buf, WFLAG_SEND, NULL, time(NULL)); |
| 906 |
906 |
| 907 if (c->makesound && (sound_options & OPT_SOUND_SEND)) |
907 if (c->makesound && (sound_options & OPT_SOUND_SEND)) |
| 908 play_sound(SEND); |
908 play_sound(SEND); |
| |
909 |
| |
910 if (im_options & OPT_IM_POPDOWN) |
| |
911 gtk_widget_hide(c->window); |
| 909 } |
912 } |
| 910 } else { |
913 } else { |
| 911 err = serv_chat_send(c->gc, c->id, buf); |
914 err = serv_chat_send(c->gc, c->id, buf); |
| 912 |
915 |
| 913 /* no sound because we do that when we receive our message */ |
916 /* no sound because we do that when we receive our message */ |
| 1352 if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) |
1355 if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) |
| 1353 return; |
1356 return; |
| 1354 |
1357 |
| 1355 if (!c->is_chat && !g_list_find(conversations, c)) |
1358 if (!c->is_chat && !g_list_find(conversations, c)) |
| 1356 return; |
1359 return; |
| |
1360 |
| |
1361 gtk_widget_show(c->window); |
| 1357 |
1362 |
| 1358 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
1363 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
| 1359 if (!who) { |
1364 if (!who) { |
| 1360 if (flags & WFLAG_SEND) { |
1365 if (flags & WFLAG_SEND) { |
| 1361 b = find_buddy(c->gc, c->gc->username); |
1366 b = find_buddy(c->gc, c->gc->username); |