# HG changeset patch # User Elliott Sales de Andrade # Date 1260867489 0 # Node ID cb28babdf3fe1670b01a89bb35537b69f7000dac # Parent 20f4bce8894d3d86f33aa4e5bba93e091527d9bf# Parent 19be6fe515ca960ccee9638e7e798ca5aefd6f18 merge of '773d9ac497939f57a24695fab18a54da73d55aeb' and '97b2685bf2254aa12c4030861adf51107f366f25' diff -r 20f4bce8894d -r cb28babdf3fe ChangeLog --- 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 diff -r 20f4bce8894d -r cb28babdf3fe libpurple/protocols/msn/switchboard.c --- 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;