comparison src/protocols/oscar/oscar.c @ 10866:f38bda97f981

[gaim-migrate @ 12552] Get rid of oscar_add_buddies and oscar_remove_buddies. The versions we were using are almost clones of the ones used in src/server.c when the PRPL does not define its own. I also removed the NOSSI checks, since I'm sure it wouldn't work, if you tried it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 25 Apr 2005 00:31:24 +0000
parents d01d81de94d8
children 1adca5a37fb8
comparison
equal deleted inserted replaced
10865:c28766b87f64 10866:f38bda97f981
267 static int gaim_offlinemsg (aim_session_t *, aim_frame_t *, ...); 267 static int gaim_offlinemsg (aim_session_t *, aim_frame_t *, ...);
268 static int gaim_offlinemsgdone (aim_session_t *, aim_frame_t *, ...); 268 static int gaim_offlinemsgdone (aim_session_t *, aim_frame_t *, ...);
269 static int gaim_icqalias (aim_session_t *, aim_frame_t *, ...); 269 static int gaim_icqalias (aim_session_t *, aim_frame_t *, ...);
270 static int gaim_icqinfo (aim_session_t *, aim_frame_t *, ...); 270 static int gaim_icqinfo (aim_session_t *, aim_frame_t *, ...);
271 static int gaim_popup (aim_session_t *, aim_frame_t *, ...); 271 static int gaim_popup (aim_session_t *, aim_frame_t *, ...);
272 #ifndef NOSSI
273 static int gaim_ssi_parseerr (aim_session_t *, aim_frame_t *, ...); 272 static int gaim_ssi_parseerr (aim_session_t *, aim_frame_t *, ...);
274 static int gaim_ssi_parserights (aim_session_t *, aim_frame_t *, ...); 273 static int gaim_ssi_parserights (aim_session_t *, aim_frame_t *, ...);
275 static int gaim_ssi_parselist (aim_session_t *, aim_frame_t *, ...); 274 static int gaim_ssi_parselist (aim_session_t *, aim_frame_t *, ...);
276 static int gaim_ssi_parseack (aim_session_t *, aim_frame_t *, ...); 275 static int gaim_ssi_parseack (aim_session_t *, aim_frame_t *, ...);
277 static int gaim_ssi_parseadd (aim_session_t *, aim_frame_t *, ...); 276 static int gaim_ssi_parseadd (aim_session_t *, aim_frame_t *, ...);
278 static int gaim_ssi_authgiven (aim_session_t *, aim_frame_t *, ...); 277 static int gaim_ssi_authgiven (aim_session_t *, aim_frame_t *, ...);
279 static int gaim_ssi_authrequest (aim_session_t *, aim_frame_t *, ...); 278 static int gaim_ssi_authrequest (aim_session_t *, aim_frame_t *, ...);
280 static int gaim_ssi_authreply (aim_session_t *, aim_frame_t *, ...); 279 static int gaim_ssi_authreply (aim_session_t *, aim_frame_t *, ...);
281 static int gaim_ssi_gotadded (aim_session_t *, aim_frame_t *, ...); 280 static int gaim_ssi_gotadded (aim_session_t *, aim_frame_t *, ...);
282 #endif
283 281
284 /* for DirectIM/image transfer */ 282 /* for DirectIM/image transfer */
285 static int gaim_odc_initiate (aim_session_t *, aim_frame_t *, ...); 283 static int gaim_odc_initiate (aim_session_t *, aim_frame_t *, ...);
286 static int gaim_odc_incoming (aim_session_t *, aim_frame_t *, ...); 284 static int gaim_odc_incoming (aim_session_t *, aim_frame_t *, ...);
287 static int gaim_odc_typing (aim_session_t *, aim_frame_t *, ...); 285 static int gaim_odc_typing (aim_session_t *, aim_frame_t *, ...);
2320 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSG, gaim_offlinemsg, 0); 2318 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSG, gaim_offlinemsg, 0);
2321 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSGCOMPLETE, gaim_offlinemsgdone, 0); 2319 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSGCOMPLETE, gaim_offlinemsgdone, 0);
2322 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_POP, 0x0002, gaim_popup, 0); 2320 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_POP, 0x0002, gaim_popup, 0);
2323 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_ALIAS, gaim_icqalias, 0); 2321 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_ALIAS, gaim_icqalias, 0);
2324 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_INFO, gaim_icqinfo, 0); 2322 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_INFO, gaim_icqinfo, 0);
2325 #ifndef NOSSI
2326 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ERROR, gaim_ssi_parseerr, 0); 2323 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ERROR, gaim_ssi_parseerr, 0);
2327 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RIGHTSINFO, gaim_ssi_parserights, 0); 2324 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RIGHTSINFO, gaim_ssi_parserights, 0);
2328 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_LIST, gaim_ssi_parselist, 0); 2325 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_LIST, gaim_ssi_parselist, 0);
2329 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_NOLIST, gaim_ssi_parselist, 0); 2326 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_NOLIST, gaim_ssi_parselist, 0);
2330 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_SRVACK, gaim_ssi_parseack, 0); 2327 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_SRVACK, gaim_ssi_parseack, 0);
2331 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADD, gaim_ssi_parseadd, 0); 2328 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADD, gaim_ssi_parseadd, 0);
2332 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTH, gaim_ssi_authgiven, 0); 2329 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTH, gaim_ssi_authgiven, 0);
2333 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREQ, gaim_ssi_authrequest, 0); 2330 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREQ, gaim_ssi_authrequest, 0);
2334 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREP, gaim_ssi_authreply, 0); 2331 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREP, gaim_ssi_authreply, 0);
2335 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADDED, gaim_ssi_gotadded, 0); 2332 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADDED, gaim_ssi_gotadded, 0);
2336 #endif
2337 2333
2338 od->conn = bosconn; 2334 od->conn = bosconn;
2339 for (i = 0; i < (int)strlen(info->bosip); i++) { 2335 for (i = 0; i < (int)strlen(info->bosip); i++) {
2340 if (info->bosip[i] == ':') { 2336 if (info->bosip[i] == ':') {
2341 port = atoi(&(info->bosip[i+1])); 2337 port = atoi(&(info->bosip[i+1]));
3719 static void gaim_auth_grant(struct name_data *data) { 3715 static void gaim_auth_grant(struct name_data *data) {
3720 GaimConnection *gc = data->gc; 3716 GaimConnection *gc = data->gc;
3721 3717
3722 if (g_list_find(gaim_connections_get_all(), gc)) { 3718 if (g_list_find(gaim_connections_get_all(), gc)) {
3723 OscarData *od = gc->proto_data; 3719 OscarData *od = gc->proto_data;
3724 #ifdef NOSSI
3725 GaimBuddy *buddy;
3726 gchar message;
3727 message = 0;
3728 buddy = gaim_find_buddy(gc->account, data->name);
3729 aim_im_sendch4(od->sess, data->name, AIM_ICQMSG_AUTHGRANTED, &message);
3730 gaim_account_notify_added(gc->account, NULL, data->name, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
3731 #else
3732 aim_ssi_sendauthreply(od->sess, data->name, 0x01, NULL); 3720 aim_ssi_sendauthreply(od->sess, data->name, 0x01, NULL);
3733 #endif
3734 } 3721 }
3735 3722
3736 oscar_free_name_data(data); 3723 oscar_free_name_data(data);
3737 } 3724 }
3738 3725
3740 static void gaim_auth_dontgrant(struct name_data *data, char *msg) { 3727 static void gaim_auth_dontgrant(struct name_data *data, char *msg) {
3741 GaimConnection *gc = data->gc; 3728 GaimConnection *gc = data->gc;
3742 3729
3743 if (g_list_find(gaim_connections_get_all(), gc)) { 3730 if (g_list_find(gaim_connections_get_all(), gc)) {
3744 OscarData *od = gc->proto_data; 3731 OscarData *od = gc->proto_data;
3745 #ifdef NOSSI
3746 aim_im_sendch4(od->sess, data->name, AIM_ICQMSG_AUTHDENIED, msg ? msg : _("No reason given."));
3747 #else
3748 aim_ssi_sendauthreply(od->sess, data->name, 0x00, msg ? msg : _("No reason given.")); 3732 aim_ssi_sendauthreply(od->sess, data->name, 0x00, msg ? msg : _("No reason given."));
3749 #endif
3750 } 3733 }
3751 } 3734 }
3752 3735
3753 static void gaim_auth_dontgrant_msgprompt(struct name_data *data) { 3736 static void gaim_auth_dontgrant_msgprompt(struct name_data *data) {
3754 gaim_request_input(data->gc, NULL, _("Authorization Denied Message:"), 3737 gaim_request_input(data->gc, NULL, _("Authorization Denied Message:"),
4905 static int conninitdone_bos(aim_session_t *sess, aim_frame_t *fr, ...) { 4888 static int conninitdone_bos(aim_session_t *sess, aim_frame_t *fr, ...) {
4906 GaimConnection *gc = sess->aux_data; 4889 GaimConnection *gc = sess->aux_data;
4907 4890
4908 aim_reqpersonalinfo(sess, fr->conn); 4891 aim_reqpersonalinfo(sess, fr->conn);
4909 4892
4910 #ifndef NOSSI
4911 gaim_debug_info("oscar", "ssi: requesting rights and list\n"); 4893 gaim_debug_info("oscar", "ssi: requesting rights and list\n");
4912 aim_ssi_reqrights(sess); 4894 aim_ssi_reqrights(sess);
4913 aim_ssi_reqdata(sess); 4895 aim_ssi_reqdata(sess);
4914 #endif
4915 4896
4916 aim_locate_reqrights(sess); 4897 aim_locate_reqrights(sess);
4917 aim_buddylist_reqrights(sess, fr->conn); 4898 aim_buddylist_reqrights(sess, fr->conn);
4918 aim_im_reqparams(sess); 4899 aim_im_reqparams(sess);
4919 aim_bos_reqrights(sess, fr->conn); /* XXX - Don't call this with ssi */ 4900 aim_bos_reqrights(sess, fr->conn); /* XXX - Don't call this with ssi */
4920
4921 #ifdef NOSSI
4922 gaim_debug_info("oscar", "bos: requesting rights\n");
4923 aim_bos_reqrights(sess, fr->conn);
4924 aim_bos_setgroupperm(sess, fr->conn, AIM_FLAG_ALLUSERS);
4925 aim_bos_setprivacyflags(sess, fr->conn, AIM_PRIVFLAGS_ALLOWIDLE | AIM_PRIVFLAGS_ALLOWMEMBERSINCE);
4926 #endif
4927 4901
4928 gaim_connection_update_progress(gc, _("Finalizing connection"), 5, OSCAR_CONNECT_STEPS); 4902 gaim_connection_update_progress(gc, _("Finalizing connection"), 5, OSCAR_CONNECT_STEPS);
4929 4903
4930 return 1; 4904 return 1;
4931 } 4905 }
5880 gaim_blist_remove_buddy(buddy); 5854 gaim_blist_remove_buddy(buddy);
5881 5855
5882 return; 5856 return;
5883 } 5857 }
5884 5858
5885 #ifdef NOSSI
5886 aim_buddylist_addbuddy(od->sess, od->conn, buddy->name);
5887 #else
5888 if ((od->sess->ssi.received_data) && !(aim_ssi_itemlist_finditem(od->sess->ssi.local, group->name, buddy->name, AIM_SSI_TYPE_BUDDY))) { 5859 if ((od->sess->ssi.received_data) && !(aim_ssi_itemlist_finditem(od->sess->ssi.local, group->name, buddy->name, AIM_SSI_TYPE_BUDDY))) {
5889 if (buddy && group) { 5860 if (buddy && group) {
5890 gaim_debug_info("oscar", 5861 gaim_debug_info("oscar",
5891 "ssi: adding buddy %s to group %s\n", buddy->name, group->name); 5862 "ssi: adding buddy %s to group %s\n", buddy->name, group->name);
5892 aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_buddy_get_alias_only(buddy), NULL, NULL, 0); 5863 aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_buddy_get_alias_only(buddy), NULL, NULL, 0);
5893 } 5864 }
5894 } 5865 }
5895 #endif
5896 5866
5897 /* XXX - Should this be done from AIM accounts, as well? */ 5867 /* XXX - Should this be done from AIM accounts, as well? */
5898 if (od->icq) 5868 if (od->icq)
5899 aim_icq_getalias(od->sess, buddy->name); 5869 aim_icq_getalias(od->sess, buddy->name);
5900 } 5870 }
5901 5871
5902 static void oscar_add_buddies(GaimConnection *gc, GList *buddies, GList *groups) {
5903 OscarData *od = (OscarData *)gc->proto_data;
5904 #ifdef NOSSI
5905 char buf[MSG_LEN];
5906 int n=0;
5907
5908 while (buddies) {
5909 GaimBuddy *buddy = buddies->data;
5910 if (n > MSG_LEN - 18) {
5911 aim_buddylist_set(od->sess, od->conn, buf);
5912 n = 0;
5913 }
5914 n += g_snprintf(buf + n, sizeof(buf) - n, "%s&", buddy->name);
5915 buddies = buddies->next;
5916 }
5917 aim_buddylist_set(od->sess, od->conn, buf);
5918 #else
5919
5920 if (od->sess->ssi.received_data) {
5921 GList *curb = buddies;
5922 GList *curg = groups;
5923 while ((curb != NULL) && (curg != NULL)) {
5924 GaimBuddy *buddy = curb->data;
5925 GaimGroup *group = curg->data;
5926 oscar_add_buddy(gc, buddy, group);
5927 curb = curb->next;
5928 curg = curg->next;
5929 }
5930 }
5931 #endif
5932 }
5933
5934 static void oscar_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { 5872 static void oscar_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) {
5935 OscarData *od = (OscarData *)gc->proto_data; 5873 OscarData *od = (OscarData *)gc->proto_data;
5936 5874
5937 #ifdef NOSSI
5938 aim_buddylist_removebuddy(od->sess, od->conn, buddy->name);
5939 #else
5940 if (od->sess->ssi.received_data) { 5875 if (od->sess->ssi.received_data) {
5941 gaim_debug_info("oscar", 5876 gaim_debug_info("oscar",
5942 "ssi: deleting buddy %s from group %s\n", buddy->name, group->name); 5877 "ssi: deleting buddy %s from group %s\n", buddy->name, group->name);
5943 aim_ssi_delbuddy(od->sess, buddy->name, group->name); 5878 aim_ssi_delbuddy(od->sess, buddy->name, group->name);
5944 } 5879 }
5945 #endif 5880 }
5946 } 5881
5947
5948 static void oscar_remove_buddies(GaimConnection *gc, GList *buddies, GList *groups) {
5949 OscarData *od = (OscarData *)gc->proto_data;
5950
5951 #ifdef NOSSI
5952 for (cur = buddies; cur != NULL; cur = cur->next) {
5953 GaimBuddy *buddy = cur->data;
5954 aim_buddylist_removebuddy(od->sess, od->conn, buddy->name);
5955 }
5956 #else
5957 if (od->sess->ssi.received_data) {
5958 GList *curb = buddies;
5959 GList *curg = groups;
5960 while ((curb != NULL) && (curg != NULL)) {
5961 GaimBuddy *buddy = curb->data;
5962 GaimGroup *group = curg->data;
5963 oscar_remove_buddy(gc, buddy, group);
5964 curb = curb->next;
5965 curg = curg->next;
5966 }
5967 }
5968 #endif
5969 }
5970
5971 #ifndef NOSSI
5972 static void oscar_move_buddy(GaimConnection *gc, const char *name, const char *old_group, const char *new_group) { 5882 static void oscar_move_buddy(GaimConnection *gc, const char *name, const char *old_group, const char *new_group) {
5973 OscarData *od = (OscarData *)gc->proto_data; 5883 OscarData *od = (OscarData *)gc->proto_data;
5974 if (od->sess->ssi.received_data && strcmp(old_group, new_group)) { 5884 if (od->sess->ssi.received_data && strcmp(old_group, new_group)) {
5975 gaim_debug_info("oscar", 5885 gaim_debug_info("oscar",
5976 "ssi: moving buddy %s from group %s to group %s\n", name, old_group, new_group); 5886 "ssi: moving buddy %s from group %s to group %s\n", name, old_group, new_group);
6001 for (cur = moved_buddies; cur != NULL; cur = cur->next) { 5911 for (cur = moved_buddies; cur != NULL; cur = cur->next) {
6002 GaimBlistNode *node = cur->data; 5912 GaimBlistNode *node = cur->data;
6003 groups = g_list_append(groups, node->parent); 5913 groups = g_list_append(groups, node->parent);
6004 } 5914 }
6005 5915
6006 oscar_remove_buddies(gc, moved_buddies, groups); 5916 serv_remove_buddies(gc, moved_buddies, groups);
6007 oscar_add_buddies(gc, moved_buddies, groups); 5917 serv_add_buddies(gc, moved_buddies);
6008 g_list_free(groups); 5918 g_list_free(groups);
6009 gaim_debug_info("oscar", 5919 gaim_debug_info("oscar",
6010 "ssi: moved all buddies from group %s to %s\n", old_name, group->name); 5920 "ssi: moved all buddies from group %s to %s\n", old_name, group->name);
6011 } else { 5921 } else {
6012 aim_ssi_rename_group(od->sess, old_name, group->name); 5922 aim_ssi_rename_group(od->sess, old_name, group->name);
6533 "ssi: %s added you to their buddy list\n", sn); 6443 "ssi: %s added you to their buddy list\n", sn);
6534 gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL); 6444 gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
6535 6445
6536 return 1; 6446 return 1;
6537 } 6447 }
6538 #endif
6539 6448
6540 static GList *oscar_chat_info(GaimConnection *gc) { 6449 static GList *oscar_chat_info(GaimConnection *gc) {
6541 GList *m = NULL; 6450 GList *m = NULL;
6542 struct proto_chat_entry *pce; 6451 struct proto_chat_entry *pce;
6543 6452
6897 } 6806 }
6898 6807
6899 static void oscar_set_permit_deny(GaimConnection *gc) { 6808 static void oscar_set_permit_deny(GaimConnection *gc) {
6900 GaimAccount *account = gaim_connection_get_account(gc); 6809 GaimAccount *account = gaim_connection_get_account(gc);
6901 OscarData *od = (OscarData *)gc->proto_data; 6810 OscarData *od = (OscarData *)gc->proto_data;
6902 #ifdef NOSSI 6811
6903 GSList *list;
6904 char buf[MAXMSGLEN];
6905 int at;
6906
6907 switch(account->perm_deny) {
6908 case GAIM_PRIVACY_ALLOW_ALL:
6909 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gaim_account_get_username(account));
6910 break;
6911 case GAIM_PRIVACY_DENY_ALL:
6912 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gaim_account_get_username(account));
6913 break;
6914 case GAIM_PRIVACY_ALLOW_USERS:
6915 list = account->permit;
6916 at = 0;
6917 while (list) {
6918 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
6919 list = list->next;
6920 }
6921 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf);
6922 break;
6923 case GAIM_PRIVACY_DENY_USERS:
6924 list = account->deny;
6925 at = 0;
6926 while (list) {
6927 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
6928 list = list->next;
6929 }
6930 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf);
6931 break;
6932 default:
6933 break;
6934 }
6935 #else
6936 if (od->sess->ssi.received_data) { 6812 if (od->sess->ssi.received_data) {
6937 switch (account->perm_deny) { 6813 switch (account->perm_deny) {
6938 case GAIM_PRIVACY_ALLOW_ALL: 6814 case GAIM_PRIVACY_ALLOW_ALL:
6939 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff); 6815 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
6940 break; 6816 break;
6953 default: 6829 default:
6954 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff); 6830 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
6955 break; 6831 break;
6956 } 6832 }
6957 } 6833 }
6958 #endif
6959 } 6834 }
6960 6835
6961 static void oscar_add_permit(GaimConnection *gc, const char *who) { 6836 static void oscar_add_permit(GaimConnection *gc, const char *who) {
6962 #ifdef NOSSI
6963 if (gc->account->perm_deny == 3)
6964 oscar_set_permit_deny(gc);
6965 #else
6966 OscarData *od = (OscarData *)gc->proto_data; 6837 OscarData *od = (OscarData *)gc->proto_data;
6967 gaim_debug_info("oscar", "ssi: About to add a permit\n"); 6838 gaim_debug_info("oscar", "ssi: About to add a permit\n");
6968 if (od->sess->ssi.received_data) 6839 if (od->sess->ssi.received_data)
6969 aim_ssi_addpermit(od->sess, who); 6840 aim_ssi_addpermit(od->sess, who);
6970 #endif
6971 } 6841 }
6972 6842
6973 static void oscar_add_deny(GaimConnection *gc, const char *who) { 6843 static void oscar_add_deny(GaimConnection *gc, const char *who) {
6974 #ifdef NOSSI
6975 if (gc->account->perm_deny == 4)
6976 oscar_set_permit_deny(gc);
6977 #else
6978 OscarData *od = (OscarData *)gc->proto_data; 6844 OscarData *od = (OscarData *)gc->proto_data;
6979 gaim_debug_info("oscar", "ssi: About to add a deny\n"); 6845 gaim_debug_info("oscar", "ssi: About to add a deny\n");
6980 if (od->sess->ssi.received_data) 6846 if (od->sess->ssi.received_data)
6981 aim_ssi_adddeny(od->sess, who); 6847 aim_ssi_adddeny(od->sess, who);
6982 #endif
6983 } 6848 }
6984 6849
6985 static void oscar_rem_permit(GaimConnection *gc, const char *who) { 6850 static void oscar_rem_permit(GaimConnection *gc, const char *who) {
6986 #ifdef NOSSI
6987 if (gc->account->perm_deny == 3)
6988 oscar_set_permit_deny(gc);
6989 #else
6990 OscarData *od = (OscarData *)gc->proto_data; 6851 OscarData *od = (OscarData *)gc->proto_data;
6991 gaim_debug_info("oscar", "ssi: About to delete a permit\n"); 6852 gaim_debug_info("oscar", "ssi: About to delete a permit\n");
6992 if (od->sess->ssi.received_data) 6853 if (od->sess->ssi.received_data)
6993 aim_ssi_delpermit(od->sess, who); 6854 aim_ssi_delpermit(od->sess, who);
6994 #endif
6995 } 6855 }
6996 6856
6997 static void oscar_rem_deny(GaimConnection *gc, const char *who) { 6857 static void oscar_rem_deny(GaimConnection *gc, const char *who) {
6998 #ifdef NOSSI
6999 if (gc->account->perm_deny == 4)
7000 oscar_set_permit_deny(gc);
7001 #else
7002 OscarData *od = (OscarData *)gc->proto_data; 6858 OscarData *od = (OscarData *)gc->proto_data;
7003 gaim_debug_info("oscar", "ssi: About to delete a deny\n"); 6859 gaim_debug_info("oscar", "ssi: About to delete a deny\n");
7004 if (od->sess->ssi.received_data) 6860 if (od->sess->ssi.received_data)
7005 aim_ssi_deldeny(od->sess, who); 6861 aim_ssi_deldeny(od->sess, who);
7006 #endif
7007 } 6862 }
7008 6863
7009 static GList * 6864 static GList *
7010 oscar_status_types(GaimAccount *account) 6865 oscar_status_types(GaimAccount *account)
7011 { 6866 {
7647 oscar_get_info, /* get_info */ 7502 oscar_get_info, /* get_info */
7648 oscar_set_status, /* set_status */ 7503 oscar_set_status, /* set_status */
7649 oscar_set_idle, /* set_idle */ 7504 oscar_set_idle, /* set_idle */
7650 oscar_change_passwd, /* change_passwd */ 7505 oscar_change_passwd, /* change_passwd */
7651 oscar_add_buddy, /* add_buddy */ 7506 oscar_add_buddy, /* add_buddy */
7652 oscar_add_buddies, /* add_buddies */ 7507 NULL, /* add_buddies */
7653 oscar_remove_buddy, /* remove_buddy */ 7508 oscar_remove_buddy, /* remove_buddy */
7654 oscar_remove_buddies, /* remove_buddies */ 7509 NULL, /* remove_buddies */
7655 oscar_add_permit, /* add_permit */ 7510 oscar_add_permit, /* add_permit */
7656 oscar_add_deny, /* add_deny */ 7511 oscar_add_deny, /* add_deny */
7657 oscar_rem_permit, /* rem_permit */ 7512 oscar_rem_permit, /* rem_permit */
7658 oscar_rem_deny, /* rem_deny */ 7513 oscar_rem_deny, /* rem_deny */
7659 oscar_set_permit_deny, /* set_permit_deny */ 7514 oscar_set_permit_deny, /* set_permit_deny */
7667 oscar_send_chat, /* chat_send */ 7522 oscar_send_chat, /* chat_send */
7668 oscar_keepalive, /* keepalive */ 7523 oscar_keepalive, /* keepalive */
7669 NULL, /* register_user */ 7524 NULL, /* register_user */
7670 NULL, /* get_cb_info */ 7525 NULL, /* get_cb_info */
7671 NULL, /* get_cb_away */ 7526 NULL, /* get_cb_away */
7672 #ifndef NOSSI
7673 oscar_alias_buddy, /* alias_buddy */ 7527 oscar_alias_buddy, /* alias_buddy */
7674 oscar_move_buddy, /* group_buddy */ 7528 oscar_move_buddy, /* group_buddy */
7675 oscar_rename_group, /* rename_group */ 7529 oscar_rename_group, /* rename_group */
7676 #else
7677 NULL, /* alias_buddy */
7678 NULL, /* group_buddy */
7679 NULL, /* rename_group */
7680 #endif
7681 NULL, /* buddy_free */ 7530 NULL, /* buddy_free */
7682 oscar_convo_closed, /* convo_closed */ 7531 oscar_convo_closed, /* convo_closed */
7683 NULL, /* normalize */ 7532 NULL, /* normalize */
7684 oscar_set_icon, /* set_buddy_icon */ 7533 oscar_set_icon, /* set_buddy_icon */
7685 NULL, /* remove_group */ 7534 NULL, /* remove_group */