diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 14:04:45 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 14:04:45 +0100 |
commit | 5a673f32c7bdf10cec2e0ccabce605ec9c12859e (patch) | |
tree | 363feaf80659decb0522c6cc1d64c8905c8d4f8e /protocols | |
parent | 47fae0ffdda6ea4509ba00b56d15fb25ffe19eea (diff) |
Pick up buddy group information from OSCAR server-side contact list.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/oscar/oscar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 94dd876e..fa710ece 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -254,8 +254,6 @@ static char *normalize(const char *s) g_return_val_if_fail((s != NULL), NULL); u = t = g_strdup(s); - - strcpy(t, s); g_strdown(t); while (*t && (x < BUF_LEN - 1)) { @@ -2089,7 +2087,7 @@ static int gaim_ssi_parserights(aim_session_t *sess, aim_frame_t *fr, ...) { static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) { struct im_connection *ic = sess->aux_data; - struct aim_ssi_item *curitem; + struct aim_ssi_item *curitem, *curgroup; int tmp; char *nrm; @@ -2105,8 +2103,8 @@ static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) { if (curitem->data && aim_gettlv(curitem->data, 0x0131, 1)) realname = aim_gettlv_str(curitem->data, 0x0131, 1); - - imcb_add_buddy(ic, nrm, NULL); + + imcb_add_buddy(ic, nrm, curgroup->gid == curitem->gid ? curgroup->name : NULL); if (realname) { imcb_buddy_nick_hint(ic, nrm, realname); @@ -2116,6 +2114,10 @@ static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) { } break; + case 0x0001: /* Group */ + curgroup = curitem; + break; + case 0x0002: /* Permit buddy */ if (curitem->name) { GSList *list; |