src/conversation.c

changeset 2124
7b91bd0ce3ef
parent 2123
4cfdde0aa3f1
child 2138
e829e961b154
equal deleted inserted replaced
2123:4cfdde0aa3f1 2124:7b91bd0ce3ef
847 } 847 }
848 848
849 if (!c->is_chat) { 849 if (!c->is_chat) {
850 char *buffy; 850 char *buffy;
851 851
852 write_to_conv(c, buf, WFLAG_SEND, NULL, time((time_t)NULL));
853
854 buffy = g_strdup(buf); 852 buffy = g_strdup(buf);
855 plugin_event(event_im_displayed_sent, c->gc, c->name, &buffy, 0); 853 plugin_event(event_im_displayed_sent, c->gc, c->name, &buffy, 0);
856 if (buffy) { 854 if (buffy) {
857 err = serv_send_im(c->gc, c->name, buffy, 0); 855 err = serv_send_im(c->gc, c->name, buffy, 0);
858 g_free(buffy); 856 g_free(buffy);
859 } 857 }
860 858
861 859
862 if (c->makesound && (sound_options & OPT_SOUND_SEND)) 860 if (err >= 0) {
863 play_sound(SEND); 861 write_to_conv(c, buf, WFLAG_SEND, NULL, time((time_t)NULL));
862
863 if (c->makesound && (sound_options & OPT_SOUND_SEND))
864 play_sound(SEND);
865 }
864 } else { 866 } else {
865 serv_chat_send(c->gc, c->id, buf); 867 serv_chat_send(c->gc, c->id, buf);
866 868
867 /* no sound because we do that when we receive our message */ 869 /* no sound because we do that when we receive our message */
868 } 870 }

mercurial