Mercurial > pidgin.yaz
comparison src/server.c @ 10104:60db14d54914
[gaim-migrate @ 11131]
"This patch that makes received-im-msg and
received-chat-msg signals correspond with each other.
My motivation was to add flags to received-chat-msg,
but I also added conv to received-im-msg to make the
signals match each other."
-- Nathan Fredrickson (noif)
I also updated the receiving-im-msg and receiving-chat-msg signals to match.
Now I can finally reject patch 909745 with "this should be a plugin", which
I've wanted to be able to say for a while. Yay :)
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 16 Oct 2004 15:07:22 +0000 |
parents | eaec201b2688 |
children | 9f358a718f38 |
comparison
equal
deleted
inserted
replaced
10103:a9521c791afe | 10104:60db14d54914 |
---|---|
805 angel = g_strdup(who); | 805 angel = g_strdup(who); |
806 | 806 |
807 plugin_return = GPOINTER_TO_INT( | 807 plugin_return = GPOINTER_TO_INT( |
808 gaim_signal_emit_return_1(gaim_conversations_get_handle(), | 808 gaim_signal_emit_return_1(gaim_conversations_get_handle(), |
809 "receiving-im-msg", gc->account, | 809 "receiving-im-msg", gc->account, |
810 &angel, &buffy, &imflags)); | 810 &angel, &buffy, cnv, &imflags)); |
811 | 811 |
812 if (!buffy || !angel || plugin_return) { | 812 if (!buffy || !angel || plugin_return) { |
813 if (buffy) | 813 if (buffy) |
814 g_free(buffy); | 814 g_free(buffy); |
815 if (angel) | 815 if (angel) |
819 | 819 |
820 name = angel; | 820 name = angel; |
821 message = buffy; | 821 message = buffy; |
822 | 822 |
823 gaim_signal_emit(gaim_conversations_get_handle(), "received-im-msg", gc->account, | 823 gaim_signal_emit(gaim_conversations_get_handle(), "received-im-msg", gc->account, |
824 name, message, imflags); | 824 name, message, cnv, imflags); |
825 | 825 |
826 /* Make sure URLs are clickable */ | 826 /* Make sure URLs are clickable */ |
827 buffy = gaim_markup_linkify(message); | 827 buffy = gaim_markup_linkify(message); |
828 g_free(message); | 828 g_free(message); |
829 message = buffy; | 829 message = buffy; |
1275 angel = g_strdup(who); | 1275 angel = g_strdup(who); |
1276 | 1276 |
1277 plugin_return = GPOINTER_TO_INT( | 1277 plugin_return = GPOINTER_TO_INT( |
1278 gaim_signal_emit_return_1(gaim_conversations_get_handle(), | 1278 gaim_signal_emit_return_1(gaim_conversations_get_handle(), |
1279 "receiving-chat-msg", g->account, | 1279 "receiving-chat-msg", g->account, |
1280 &angel, &buffy, conv)); | 1280 &angel, &buffy, conv, &chatflags)); |
1281 | 1281 |
1282 if (!buffy || !angel || plugin_return) { | 1282 if (!buffy || !angel || plugin_return) { |
1283 if (buffy) | 1283 if (buffy) |
1284 g_free(buffy); | 1284 g_free(buffy); |
1285 if (angel) | 1285 if (angel) |
1288 } | 1288 } |
1289 who = angel; | 1289 who = angel; |
1290 message = buffy; | 1290 message = buffy; |
1291 | 1291 |
1292 gaim_signal_emit(gaim_conversations_get_handle(), "received-chat-msg", g->account, | 1292 gaim_signal_emit(gaim_conversations_get_handle(), "received-chat-msg", g->account, |
1293 who, message, conv); | 1293 who, message, conv, chatflags); |
1294 | 1294 |
1295 /* Make sure URLs are clickable */ | 1295 /* Make sure URLs are clickable */ |
1296 buf = gaim_markup_linkify(message); | 1296 buf = gaim_markup_linkify(message); |
1297 | 1297 |
1298 if (chatflags & GAIM_CONV_CHAT_WHISPER) | 1298 if (chatflags & GAIM_CONV_CHAT_WHISPER) |
1299 msgflags |= GAIM_MESSAGE_WHISPER; | 1299 msgflags |= GAIM_MESSAGE_WHISPER; |
1300 if (chatflags & GAIM_CONV_CHAT_DELAYED) | 1300 if (chatflags & GAIM_CONV_CHAT_DELAYED) |
1301 msgflags |= GAIM_MESSAGE_DELAYED; | 1301 msgflags |= GAIM_MESSAGE_DELAYED; |
1302 if (chatflags & GAIM_CONV_CHAT_ALERT) | |
1303 msgflags |= GAIM_MESSAGE_NICK; | |
1302 | 1304 |
1303 gaim_conv_chat_write(chat, who, buf, msgflags, mtime); | 1305 gaim_conv_chat_write(chat, who, buf, msgflags, mtime); |
1304 | 1306 |
1305 g_free(angel); | 1307 g_free(angel); |
1306 g_free(buf); | 1308 g_free(buf); |