Mercurial > pidgin.yaz
changeset 1981:7739e648a28a
[gaim-migrate @ 1991]
hi luigiwalser
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 10 Jun 2001 00:45:43 +0000 |
parents | 5b79252ea95c |
children | 03bebfa8247f |
files | src/server.c |
diffstat | 1 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server.c Sat Jun 09 23:57:28 2001 +0000 +++ b/src/server.c Sun Jun 10 00:45:43 2001 +0000 @@ -388,15 +388,27 @@ /* woo. i'm actually going to comment this function. isn't that fun. make sure to follow along, kids */ void serv_got_im(struct gaim_connection *gc, char *name, char *message, int away, time_t mtime) { + char *buffy; + char *angel; + int plugin_return; + struct conversation *cnv; int new_conv = 0; + /* we should update the conversation window buttons and menu, if it exists. */ + cnv = find_conversation(name); + if (cnv) + set_convo_gc(cnv, gc); + /* we do the new_conv check here in case any plugins decide to create it */ + else + new_conv = 1; + /* plugin stuff. we pass a char ** but we don't want to pass what's been given us * by the prpls. so we create temp holders and pass those instead. it's basically * just to avoid segfaults. */ - char *buffy = g_strdup(message); - char *angel = g_strdup(name); - int plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0); + buffy = g_strdup(message); + angel = g_strdup(name); + plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0); if (!buffy || !angel || plugin_return) { if (buffy) @@ -421,11 +433,6 @@ return; } - /* we should update the conversation window buttons and menu, if it exists. */ - cnv = find_conversation(name); - if (cnv) - set_convo_gc(cnv, gc); - /* if you can't figure this out, stop reading right now. * "we're not worthy! we're not worthy!" */ if (general_options & OPT_GEN_SEND_LINKS) @@ -497,7 +504,6 @@ * will take care of not playing while away), and then write it to the * convo window. */ if (cnv == NULL) { - new_conv = 1; cnv = new_conversation(name); set_convo_gc(cnv, gc); } @@ -550,7 +556,6 @@ * it (if it does exist it was updated earlier), then play a sound indicating we've * received it and then display it. easy. */ if (cnv == NULL) { - new_conv = 1; cnv = new_conversation(name); set_convo_gc(cnv, gc); }