Mercurial > pidgin.yaz
changeset 29185:cb28babdf3fe
merge of '773d9ac497939f57a24695fab18a54da73d55aeb'
and '97b2685bf2254aa12c4030861adf51107f366f25'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Tue, 15 Dec 2009 08:58:09 +0000 |
parents | 20f4bce8894d (current diff) 19be6fe515ca (diff) |
children | 57ee55097ec8 |
files | |
diffstat | 2 files changed, 22 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Dec 15 00:14:33 2009 +0000 +++ b/ChangeLog Tue Dec 15 08:58:09 2009 +0000 @@ -9,10 +9,12 @@ Chinese characters (broken in 2.6.4) MSN: - * File transfer requests will no longer cause a crash if you delete the file - before the other side accepts. - * Recieved files will no longer hold an extra lock after completion, meaning - they can be moved or deleted without complaints from your OS. + * File transfer requests will no longer cause a crash if you delete the + file before the other side accepts. + * Recieved files will no longer hold an extra lock after completion, + meaning they can be moved or deleted without complaints from your OS. + * Buddies who sign in from a second location will no longer cause an + unnecessary chat window to open. XMPP: * Added support for the SCRAM-SHA-1 SASL mechanism. This is only
--- a/libpurple/protocols/msn/switchboard.c Tue Dec 15 00:14:33 2009 +0000 +++ b/libpurple/protocols/msn/switchboard.c Tue Dec 15 08:58:09 2009 +0000 @@ -222,13 +222,28 @@ { MsnCmdProc *cmdproc; PurpleAccount *account; + char *semicolon; + char *passport; g_return_if_fail(swboard != NULL); cmdproc = swboard->cmdproc; account = cmdproc->session->account; - swboard->users = g_list_prepend(swboard->users, g_strdup(user)); + semicolon = strchr(user, ';'); + /* We don't really care about the machine ID. */ + if (semicolon) + passport = g_strndup(user, semicolon - user); + else + passport = g_strdup(user); + + /* Don't add multiple endpoints to the conversation. */ + if (g_list_find_custom(swboard->users, passport, (GCompareFunc)strcmp)) { + g_free(passport); + return; + } + + swboard->users = g_list_prepend(swboard->users, passport); swboard->current_users++; swboard->empty = FALSE;