Mercurial > pidgin
changeset 2210:3a6fd1e8f00a
[gaim-migrate @ 2220]
i haven't even tested this.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 05 Sep 2001 05:25:13 +0000 |
parents | 9b8b32ae3b41 |
children | 1790163019ee |
files | src/conversation.c src/multi.h src/protocols/icq/gaim_icq.c src/protocols/msn/msn.c src/protocols/yahoo/yay.c |
diffstat | 5 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Tue Sep 04 18:42:44 2001 +0000 +++ b/src/conversation.c Wed Sep 05 05:25:13 2001 +0000 @@ -1333,6 +1333,8 @@ b = find_buddy(c->gc, c->gc->username); if (b) who = b->show; + else if (c->gc->displayname[0]) + who = c->gc->displayname; else who = c->gc->username; } else {
--- a/src/multi.h Tue Sep 04 18:42:44 2001 +0000 +++ b/src/multi.h Wed Sep 05 05:25:13 2001 +0000 @@ -53,6 +53,7 @@ struct aim_user *user; char username[64]; + char displayname[128]; char password[32]; int options; /* same as aim_user options */ guint keepalive;
--- a/src/protocols/icq/gaim_icq.c Tue Sep 04 18:42:44 2001 +0000 +++ b/src/protocols/icq/gaim_icq.c Wed Sep 05 05:25:13 2001 +0000 @@ -282,6 +282,7 @@ link = id->link = icq_ICQLINKNew(atol(user->username), ps, user->proto_opt[USEROPT_NICK][0] ? user->proto_opt[USEROPT_NICK] : "gaim user", TRUE); + g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", user->proto_opt[USEROPT_NICK]); link->icq_Logged = icq_online; link->icq_Disconnected = icq_logged_off;
--- a/src/protocols/msn/msn.c Tue Sep 04 18:42:44 2001 +0000 +++ b/src/protocols/msn/msn.c Wed Sep 05 05:25:13 2001 +0000 @@ -497,6 +497,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { + close(source); g_free(ms->sessid); g_free(ms->auth); g_free(ms); @@ -528,6 +529,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { + close(source); g_free(ms->auth); g_free(ms); return; @@ -900,8 +902,10 @@ struct msn_data *md; char buf[MSN_BUF_LEN]; - if (!g_slist_find(connections, gc)) + if (!g_slist_find(connections, gc)) { + close(source); return; + } md = gc->proto_data; @@ -975,8 +979,21 @@ set_login_progress(gc, 3, "Requesting to send password"); } else if (!g_strncasecmp(buf, "USR", 3)) { + char *resp, *friend, *tmp = buf; + + GET_NEXT(tmp); + GET_NEXT(tmp); + resp = tmp; + GET_NEXT(tmp); + GET_NEXT(tmp); + friend = tmp; + + debug_printf("resp: %s; friend: %s\n", resp, friend); + /* so here, we're either getting the challenge or the OK */ if (strstr(buf, "OK")) { + g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend); + g_snprintf(buf, sizeof(buf), "SYN %d 0\n", ++md->trId); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Unable to write"); @@ -1082,8 +1099,10 @@ struct msn_data *md; char buf[1024]; - if (!g_slist_find(connections, gc)) + if (!g_slist_find(connections, gc)) { + close(source); return; + } md = gc->proto_data;
--- a/src/protocols/yahoo/yay.c Tue Sep 04 18:42:44 2001 +0000 +++ b/src/protocols/yahoo/yay.c Wed Sep 05 05:25:13 2001 +0000 @@ -644,6 +644,7 @@ if (yd->active_id) g_free(yd->active_id); yd->active_id = g_strdup(entry); + g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", yd->active_id); } static void yahoo_do_action(struct gaim_connection *gc, char *act) {