# HG changeset patch # User Christian Hammond # Date 1086491981 0 # Node ID 364aa73323b5a1e9ad50f18fcb258c8b322e7300 # Parent 502707ca18364ff78e990ce142badf6633a9377c [gaim-migrate @ 9989] A few things here. First, some spelling corrections. Second, make sure we always send a group ID when we add somebody. Default to 0 if nothing else. We were sending an ADD in some cases without a group ID, and then MSN sent back a 224 - Invalid Group (I swear that never happened before?), and we misinterpreted the error and figured the passport was invalid. Third, don't spit out the "Unhandled command 'BLP'" errors. committer: Tailor Script diff -r 502707ca1836 -r 364aa73323b5 src/protocols/msn/notification.c --- a/src/protocols/msn/notification.c Sun Jun 06 02:39:08 2004 +0000 +++ b/src/protocols/msn/notification.c Sun Jun 06 03:19:41 2004 +0000 @@ -444,6 +444,7 @@ MsnUser *user; MsnObject *msnobj; int status = 0; + int idle = 0; const char *state, *passport, *friendly; GaimBuddy *b; @@ -473,7 +474,10 @@ if (!g_ascii_strcasecmp(state, "BSY")) status |= UC_UNAVAILABLE | (MSN_BUSY << 1); else if (!g_ascii_strcasecmp(state, "IDL")) + { status |= UC_UNAVAILABLE | (MSN_IDLE << 1); + idle = -1; + } else if (!g_ascii_strcasecmp(state, "BRB")) status |= UC_UNAVAILABLE | (MSN_BRB << 1); else if (!g_ascii_strcasecmp(state, "AWY")) @@ -483,7 +487,7 @@ else if (!g_ascii_strcasecmp(state, "LUN")) status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); - serv_got_update(gc, passport, 1, 0, 0, 0, status); + serv_got_update(gc, passport, 1, 0, 0, idle, status); } static void @@ -512,6 +516,7 @@ const char *passport; const char *friendly; int status = 0; + int idle = 0; session = cmdproc->session; gc = session->account->gc; @@ -536,7 +541,10 @@ if (!g_ascii_strcasecmp(state, "BSY")) status |= UC_UNAVAILABLE | (MSN_BUSY << 1); else if (!g_ascii_strcasecmp(state, "IDL")) + { status |= UC_UNAVAILABLE | (MSN_IDLE << 1); + idle = -1; + } else if (!g_ascii_strcasecmp(state, "BRB")) status |= UC_UNAVAILABLE | (MSN_BRB << 1); else if (!g_ascii_strcasecmp(state, "AWY")) @@ -546,7 +554,7 @@ else if (!g_ascii_strcasecmp(state, "LUN")) status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); - serv_got_update(gc, passport, 1, 0, 0, 0, status); + serv_got_update(gc, passport, 1, 0, 0, idle, status); } static void @@ -1130,16 +1138,11 @@ MsnCmdProc *cmdproc; cmdproc = notification->servconn->cmdproc; - if (group_id >= 0) - { - msn_cmdproc_send(cmdproc, "ADD", "%s %s %s %d", list, who, - store_name, group_id); - } - else - { - msn_cmdproc_send(cmdproc, "ADD", "%s %s %s", list, who, - store_name); - } + if (group_id < 0) + group_id = 0; + + msn_cmdproc_send(cmdproc, "ADD", "%s %s %s %d", + list, who, store_name, group_id); } void @@ -1181,6 +1184,7 @@ msn_table_add_cmd(cbs_table, "REA", "REA", rea_cmd); /* msn_table_add_cmd(cbs_table, "PRP", "PRP", prp_cmd); */ /* msn_table_add_cmd(cbs_table, "BLP", "BLP", blp_cmd); */ + msn_table_add_cmd(cbs_table, "BLP", "BLP", NULL); msn_table_add_cmd(cbs_table, "REG", "REG", reg_cmd); msn_table_add_cmd(cbs_table, "ADG", "ADG", adg_cmd); msn_table_add_cmd(cbs_table, "RMG", "RMG", rmg_cmd); @@ -1204,7 +1208,7 @@ msn_table_add_cmd(cbs_table, NULL, "RNG", rng_cmd); msn_table_add_cmd(cbs_table, NULL, "URL", url_cmd); - + /* msn_table_add_cmd(cbs_table, NULL, "XFR", xfr_cmd); */ msn_table_add_error(cbs_table, "ADD", add_error); diff -r 502707ca1836 -r 364aa73323b5 src/protocols/msn/switchboard.c --- a/src/protocols/msn/switchboard.c Sun Jun 06 02:39:08 2004 +0000 +++ b/src/protocols/msn/switchboard.c Sun Jun 06 03:19:41 2004 +0000 @@ -150,7 +150,7 @@ { GList *l; - /* But we alredy know the switchboard... */ + /* But we already know the switchboard... */ /* What if there is more than one user? */ for (l = swboard->users; l != NULL; l = l->next) { @@ -266,7 +266,7 @@ #if 1 if (session->protocol_ver >= 9) - /* But we alredy know the switchboard... */ + /* But we already know the switchboard... */ msn_request_buddy_icon(gc, passport); #endif } diff -r 502707ca1836 -r 364aa73323b5 src/protocols/msn/userlist.c --- a/src/protocols/msn/userlist.c Sun Jun 06 02:39:08 2004 +0000 +++ b/src/protocols/msn/userlist.c Sun Jun 06 03:19:41 2004 +0000 @@ -549,7 +549,7 @@ int group_id; const char *list; const char *store_name; - + group_id = -1; if (group_name != NULL) @@ -566,12 +566,11 @@ user = msn_userlist_find_user(userlist, who); - /* First we're going to check if it's alredy there. */ + /* First we're going to check if it's already there. */ if (user_is_there(user, list_id, group_id)) { list = lists[list_id]; - gaim_debug_error("msn", "User '%s' is alredy there: %s\n", - who, list); + gaim_debug_error("msn", "User '%s' is already there: %s\n", who, list); return; }