# HG changeset patch # User Mark Doliner # Date 1151779153 0 # Node ID e40263ba96807766febd899fdbe7c2ece29df019 # Parent 47c3d00713afd2cf204e80b34e71439b6a0193dc [gaim-migrate @ 16388] When moving a buddy on AIM, remove the buddy from the server list before adding it to the new group (it used to be the other way around). The downside of this is that, if you're moving an ICQ buddy who requires authorization, you'll have to rerequest authorization. The upside of this is that it actually works, and moving an ICQ buddy won't inadvertently delete them from your list. committer: Tailor Script diff -r 47c3d00713af -r e40263ba9680 src/protocols/oscar/family_feedbag.c --- a/src/protocols/oscar/family_feedbag.c Sat Jul 01 18:04:55 2006 +0000 +++ b/src/protocols/oscar/family_feedbag.c Sat Jul 01 18:39:13 2006 +0000 @@ -456,14 +456,14 @@ * @param sn The name of the buddy. * @return 1 if you are waiting for authorization; 0 if you are not */ -int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn) +gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn) { struct aim_ssi_item *cur = aim_ssi_itemlist_finditem(list, gn, sn, AIM_SSI_TYPE_BUDDY); if (cur) { if (aim_tlv_gettlv(cur->data, 0x0066, 1)) - return 1; + return TRUE; } - return 0; + return FALSE; } /** @@ -945,10 +945,17 @@ */ int aim_ssi_movebuddy(OscarData *od, const char *oldgn, const char *newgn, const char *sn) { - char *alias = aim_ssi_getalias(od->ssi.local, oldgn, sn); - aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, aim_ssi_waitingforauth(od->ssi.local, oldgn, sn)); + char *alias; + gboolean waitingforauth; + + alias = aim_ssi_getalias(od->ssi.local, oldgn, sn); + waitingforauth = aim_ssi_waitingforauth(od->ssi.local, oldgn, sn); + aim_ssi_delbuddy(od, sn, oldgn); + aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, waitingforauth); + free(alias); + return 0; } diff -r 47c3d00713af -r e40263ba9680 src/protocols/oscar/oscar.h --- a/src/protocols/oscar/oscar.h Sat Jul 01 18:04:55 2006 +0000 +++ b/src/protocols/oscar/oscar.h Sat Jul 01 18:39:13 2006 +0000 @@ -1144,7 +1144,7 @@ guint32 aim_ssi_getpresence(struct aim_ssi_item *list); char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn); -int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); +gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); /* Client functions for changing SSI data */ int aim_ssi_addbuddy(OscarData *od, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth);