Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 4299:6c67b7bfe6cf
[gaim-migrate @ 4553]
I got rid of all those "Do you want to request authorization from..."
popup dialogs when you log in. I also added a protocol action that
lists people in your buddy list that have not authorized you.
I also made it so you can right click on ICQ names that are in AIM
lists and re-request authorization, if needed. And I tried to
de-uglify a little bit of gaim_ssi_parselist()
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 11 Jan 2003 20:00:57 +0000 |
parents | 79d871c11eb9 |
children | 22ebfa41525a |
comparison
equal
deleted
inserted
replaced
4298:cddb50734169 | 4299:6c67b7bfe6cf |
---|---|
4134 } else { | 4134 } else { |
4135 debug_printf("ssi: adding buddy %s to group %s to local list\n", curitem->name, gname); | 4135 debug_printf("ssi: adding buddy %s to group %s to local list\n", curitem->name, gname); |
4136 add_buddy(gc, (gname ? gname : "orphans"), curitem->name, alias); | 4136 add_buddy(gc, (gname ? gname : "orphans"), curitem->name, alias); |
4137 tmp++; | 4137 tmp++; |
4138 } | 4138 } |
4139 if (curitem->name && gname && aim_ssi_waitingforauth(sess->ssi.local, gname, curitem->name)) | |
4140 gaim_auth_sendrequest(gc, curitem->name); | |
4141 free(alias); | 4139 free(alias); |
4142 } | 4140 } |
4143 } break; | 4141 } break; |
4144 | 4142 |
4145 case 0x0001: { /* Group */ | 4143 case 0x0001: { /* Group */ |
4202 if (gc) { | 4200 if (gc) { |
4203 GSList *cur; | 4201 GSList *cur; |
4204 | 4202 |
4205 /* Buddies */ | 4203 /* Buddies */ |
4206 cur = gc->groups; | 4204 cur = gc->groups; |
4207 while (cur) { | 4205 for (cur=gc->groups; cur; cur=g_slist_next(cur)) { |
4208 GSList *curbud; | 4206 GSList *curb; |
4209 for (curbud=((struct group*)cur->data)->members; curbud; curbud=curbud->next) { | 4207 struct group *group = cur->data; |
4210 struct buddy *buddy = curbud->data; | 4208 for (curb=group->members; curb; curb=curb->next) { |
4211 char *gname = aim_ssi_itemlist_findparentname(sess->ssi.local, buddy->name); | 4209 struct buddy *buddy = curb->data; |
4212 char *alias = aim_ssi_getalias(sess->ssi.local, gname, buddy->name); | |
4213 if (aim_ssi_itemlist_exists(sess->ssi.local, buddy->name)) { | 4210 if (aim_ssi_itemlist_exists(sess->ssi.local, buddy->name)) { |
4214 /* Store local alias on server */ | 4211 /* Store local alias on server */ |
4212 char *alias = aim_ssi_getalias(sess->ssi.local, group->name, buddy->name); | |
4215 if (!alias && buddy->alias[0]) | 4213 if (!alias && buddy->alias[0]) |
4216 aim_ssi_aliasbuddy(sess, od->conn, gname, buddy->name, buddy->alias); | 4214 aim_ssi_aliasbuddy(sess, od->conn, group->name, buddy->name, buddy->alias); |
4215 free(alias); | |
4217 } else { | 4216 } else { |
4218 debug_printf("ssi: adding buddy %s from local list to server list\n", ((struct buddy*)curbud->data)->name); | 4217 debug_printf("ssi: adding buddy %s from local list to server list\n", buddy->name); |
4219 aim_ssi_addbuddy(sess, od->conn, buddy->name, ((struct group*)cur->data)->name, get_buddy_alias_only((struct buddy *)curbud->data), NULL, NULL, 0); | 4218 aim_ssi_addbuddy(sess, od->conn, buddy->name, group->name, get_buddy_alias_only(buddy), NULL, NULL, 0); |
4220 } | 4219 } |
4221 free(alias); | |
4222 } | 4220 } |
4223 cur = g_slist_next(cur); | |
4224 } | 4221 } |
4225 | 4222 |
4226 /* Permit list */ | 4223 /* Permit list */ |
4227 if (gc->permit) { | 4224 if (gc->permit) { |
4228 for (cur=gc->permit; cur; cur=cur->next) | 4225 for (cur=gc->permit; cur; cur=cur->next) |
4962 pbm = g_new0(struct proto_buddy_menu, 1); | 4959 pbm = g_new0(struct proto_buddy_menu, 1); |
4963 pbm->label = _("Get Info"); | 4960 pbm->label = _("Get Info"); |
4964 pbm->callback = oscar_get_info; | 4961 pbm->callback = oscar_get_info; |
4965 pbm->gc = gc; | 4962 pbm->gc = gc; |
4966 m = g_list_append(m, pbm); | 4963 m = g_list_append(m, pbm); |
4967 | 4964 } |
4968 if (od->sess->ssi.received_data) { | 4965 |
4969 char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, who); | 4966 if (od->sess->ssi.received_data) { |
4970 if (gname && aim_ssi_waitingforauth(od->sess->ssi.local, gname, who)) { | 4967 char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, who); |
4971 pbm = g_new0(struct proto_buddy_menu, 1); | 4968 if (gname && aim_ssi_waitingforauth(od->sess->ssi.local, gname, who)) { |
4972 pbm->label = _("Re-Request Authorization"); | 4969 pbm = g_new0(struct proto_buddy_menu, 1); |
4973 pbm->callback = gaim_auth_sendrequest; | 4970 pbm->label = _("Re-request Authorization"); |
4974 pbm->gc = gc; | 4971 pbm->callback = gaim_auth_sendrequest; |
4975 m = g_list_append(m, pbm); | 4972 pbm->gc = gc; |
4976 } | 4973 m = g_list_append(m, pbm); |
4977 } | 4974 } |
4978 } | 4975 } |
4979 | 4976 |
4980 return m; | 4977 return m; |
4981 } | 4978 } |
5156 aim_reqservice(od->sess, od->conn, AIM_CONN_TYPE_AUTH); | 5153 aim_reqservice(od->sess, od->conn, AIM_CONN_TYPE_AUTH); |
5157 } else | 5154 } else |
5158 aim_admin_getinfo(od->sess, conn, 0x11); | 5155 aim_admin_getinfo(od->sess, conn, 0x11); |
5159 } else if (!strcmp(act, "Change Current Registered Address")) { | 5156 } else if (!strcmp(act, "Change Current Registered Address")) { |
5160 do_prompt_dialog("Change Address To: ", NULL, gc, oscar_change_email, NULL); | 5157 do_prompt_dialog("Change Address To: ", NULL, gc, oscar_change_email, NULL); |
5158 } else if (!strcmp(act, "Show Buddies Awaiting Authorization")) { | |
5159 gchar *nombre, *text, *tmp; | |
5160 GSList *curg, *curb; | |
5161 | |
5162 text = g_strdup(_("You are awaiting authorization from the following buddies:")); | |
5163 | |
5164 for (curg=gc->groups; curg; curg=g_slist_next(curg)) { | |
5165 struct group *group = curg->data; | |
5166 for (curb=group->members; curb; curb=g_slist_next(curb)) { | |
5167 struct buddy *buddy = curb->data; | |
5168 if (aim_ssi_waitingforauth(od->sess->ssi.local, group->name, buddy->name)) { | |
5169 if (get_buddy_alias_only(buddy)) | |
5170 nombre = g_strdup_printf(" %s (%s)", buddy->name, get_buddy_alias_only(buddy)); | |
5171 else | |
5172 nombre = g_strdup(buddy->name); | |
5173 tmp = g_strdup_printf("%s<BR>%s", text, nombre); | |
5174 g_free(text); | |
5175 text = tmp; | |
5176 g_free(nombre); | |
5177 } | |
5178 } | |
5179 } | |
5180 | |
5181 tmp = g_strdup_printf(_("%s<BR><BR>You can re-request authorization from these buddies by right-clicking on them in the \"Edit Buddies\" pane and selecting \"Re-request authorization.\""), text); | |
5182 g_free(text); | |
5183 text = tmp; | |
5184 g_show_info_text(gc, gc->username, 2, text, NULL); | |
5185 g_free(text); | |
5161 } else if (!strcmp(act, "Search for Buddy by Email")) { | 5186 } else if (!strcmp(act, "Search for Buddy by Email")) { |
5162 show_find_email(gc); | 5187 show_find_email(gc); |
5163 } | 5188 } |
5164 } | 5189 } |
5165 | 5190 |
5172 m = g_list_append(m, "Change Password"); | 5197 m = g_list_append(m, "Change Password"); |
5173 m = g_list_append(m, "Format Screenname"); | 5198 m = g_list_append(m, "Format Screenname"); |
5174 m = g_list_append(m, "Confirm Account"); | 5199 m = g_list_append(m, "Confirm Account"); |
5175 m = g_list_append(m, "Display Current Registered Address"); | 5200 m = g_list_append(m, "Display Current Registered Address"); |
5176 m = g_list_append(m, "Change Current Registered Address"); | 5201 m = g_list_append(m, "Change Current Registered Address"); |
5202 m = g_list_append(m, NULL); | |
5203 m = g_list_append(m, "Show Buddies Awaiting Authorization"); | |
5177 m = g_list_append(m, NULL); | 5204 m = g_list_append(m, NULL); |
5178 m = g_list_append(m, "Search for Buddy by Email"); | 5205 m = g_list_append(m, "Search for Buddy by Email"); |
5179 | 5206 |
5180 return m; | 5207 return m; |
5181 } | 5208 } |