Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 3867:43e396e94095
[gaim-migrate @ 4019]
compile cleanups by nathan
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sun, 03 Nov 2002 07:36:09 +0000 |
parents | b5d7232c3e76 |
children | e73c48cf1645 |
comparison
equal
deleted
inserted
replaced
3866:994b5c4d15dd | 3867:43e396e94095 |
---|---|
1983 * For when other people ask you for authorization | 1983 * For when other people ask you for authorization |
1984 */ | 1984 */ |
1985 static void gaim_icq_authask(struct gaim_connection *gc, fu32_t uin, char *msg) { | 1985 static void gaim_icq_authask(struct gaim_connection *gc, fu32_t uin, char *msg) { |
1986 struct channel4_data *data = g_new(struct channel4_data, 1); | 1986 struct channel4_data *data = g_new(struct channel4_data, 1); |
1987 /* The first 6 chars of the message are some type of alien gibberish, so skip them */ | 1987 /* The first 6 chars of the message are some type of alien gibberish, so skip them */ |
1988 char *dialog_msg = g_strdup_printf("The user %lu wants to add you to their buddy list for the following reason:", uin, (msg && strlen(msg)>6) ? msg+6 : "No reason given."); | 1988 char *dialog_msg = g_strdup_printf("The user %lu wants to add you to their buddy list for the following reason: %s", uin, (msg && strlen(msg)>6) ? msg+6 : "No reason given."); |
1989 debug_printf("Received an authorization request from UIN %lu\n", uin); | 1989 debug_printf("Received an authorization request from UIN %lu\n", uin); |
1990 data->gc = gc; | 1990 data->gc = gc; |
1991 data->uin = g_strdup_printf("%lu", uin); | 1991 data->uin = g_strdup_printf("%lu", uin); |
1992 do_ask_dialog(dialog_msg, (msg && strlen(msg) > 6) ? msg+6 : _("No reason given."), data, _("Authorize"), gaim_icq_authgrant, _("Deny"), gaim_icq_authdeny); | 1992 do_ask_dialog(dialog_msg, (msg && strlen(msg) > 6) ? msg+6 : _("No reason given."), data, _("Authorize"), gaim_icq_authgrant, _("Deny"), gaim_icq_authdeny); |
1993 g_free(dialog_msg); | 1993 g_free(dialog_msg); |
3699 } | 3699 } |
3700 } | 3700 } |
3701 } | 3701 } |
3702 } | 3702 } |
3703 | 3703 |
3704 static void oscar_move_buddy(struct gaim_connection *g, char *name, char *old_group, char *new_group) { | 3704 static void oscar_move_buddy(struct gaim_connection *g, const char *name, const char *old_group, const char *new_group) { |
3705 struct oscar_data *odata = (struct oscar_data *)g->proto_data; | 3705 struct oscar_data *odata = (struct oscar_data *)g->proto_data; |
3706 if (!odata->icq) | 3706 if (!odata->icq) |
3707 if (odata->sess->ssi.received_data) { | 3707 if (odata->sess->ssi.received_data) { |
3708 aim_ssi_movebuddy(odata->sess, odata->conn, old_group, new_group, name); | 3708 aim_ssi_movebuddy(odata->sess, odata->conn, old_group, new_group, name); |
3709 debug_printf("ssi: moved buddy %s from group %s to group %s\n", name, old_group, new_group); | 3709 debug_printf("ssi: moved buddy %s from group %s to group %s\n", name, old_group, new_group); |
3721 debug_printf("ssi: deleted buddy %s from group %s\n", name, group); | 3721 debug_printf("ssi: deleted buddy %s from group %s\n", name, group); |
3722 } | 3722 } |
3723 } | 3723 } |
3724 } | 3724 } |
3725 | 3725 |
3726 static void oscar_remove_buddies(struct gaim_connection *g, GList *buddies, char *group) { | 3726 static void oscar_remove_buddies(struct gaim_connection *g, GList *buddies, const char *group) { |
3727 struct oscar_data *odata = (struct oscar_data *)g->proto_data; | 3727 struct oscar_data *odata = (struct oscar_data *)g->proto_data; |
3728 if (odata->icq) { | 3728 if (odata->icq) { |
3729 GList *cur; | 3729 GList *cur; |
3730 for (cur=buddies; cur; cur=cur->next) | 3730 for (cur=buddies; cur; cur=cur->next) |
3731 aim_remove_buddy(odata->sess, odata->conn, cur->data); | 3731 aim_remove_buddy(odata->sess, odata->conn, cur->data); |
3751 } | 3751 } |
3752 } | 3752 } |
3753 } | 3753 } |
3754 } | 3754 } |
3755 | 3755 |
3756 static void oscar_rename_group(struct gaim_connection *g, char *old_group, char *new_group, GList *members) { | 3756 static void oscar_rename_group(struct gaim_connection *g, const char *old_group, const char *new_group, GList *members) { |
3757 struct oscar_data *odata = (struct oscar_data *)g->proto_data; | 3757 struct oscar_data *odata = (struct oscar_data *)g->proto_data; |
3758 if (!odata->icq) | 3758 if (!odata->icq) |
3759 if (odata->sess->ssi.received_data) { | 3759 if (odata->sess->ssi.received_data) { |
3760 if (aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, new_group, 0x0001)) { | 3760 if (aim_ssi_itemlist_finditem(odata->sess->ssi.items, NULL, new_group, 0x0001)) { |
3761 oscar_remove_buddies(g, members, old_group); | 3761 oscar_remove_buddies(g, members, old_group); |