comparison src/protocols/oscar/oscar.c @ 6871:714fc8f45cf2

[gaim-migrate @ 7417] I think the only thing I really changed was added a thing to the mouse over for aim people using the official encryption. The rest is just code cleanup. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 17 Sep 2003 03:22:44 +0000
parents 59f6d0b1bdbe
children 155645d0f0aa
comparison
equal deleted inserted replaced
6870:c069548b501e 6871:714fc8f45cf2
59 59
60 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" 60 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3"
61 61
62 static GaimPlugin *my_protocol = NULL; 62 static GaimPlugin *my_protocol = NULL;
63 63
64 static int caps_aim = AIM_CAPS_CHAT | AIM_CAPS_BUDDYICON | AIM_CAPS_IMIMAGE | AIM_CAPS_SENDFILE | AIM_CAPS_INTEROPERATE; 64 static int caps_aim = AIM_CAPS_CHAT | AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_INTEROPERATE;
65 static int caps_icq = AIM_CAPS_BUDDYICON | AIM_CAPS_IMIMAGE | AIM_CAPS_SENDFILE | AIM_CAPS_ICQUTF8 | AIM_CAPS_INTEROPERATE; 65 static int caps_icq = AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_ICQUTF8 | AIM_CAPS_INTEROPERATE;
66 66
67 static fu8_t features_aim[] = {0x01, 0x01, 0x01, 0x02}; 67 static fu8_t features_aim[] = {0x01, 0x01, 0x01, 0x02};
68 static fu8_t features_icq[] = {0x01, 0x06}; 68 static fu8_t features_icq[] = {0x01, 0x06};
69 69
70 struct oscar_data { 70 struct oscar_data {
2393 } else if (args->reqclass & AIM_CAPS_VOICE) { 2393 } else if (args->reqclass & AIM_CAPS_VOICE) {
2394 } else if (args->reqclass & AIM_CAPS_BUDDYICON) { 2394 } else if (args->reqclass & AIM_CAPS_BUDDYICON) {
2395 gaim_buddy_icons_set_for_user(gaim_connection_get_account(gc), 2395 gaim_buddy_icons_set_for_user(gaim_connection_get_account(gc),
2396 userinfo->sn, args->info.icon.icon, 2396 userinfo->sn, args->info.icon.icon,
2397 args->info.icon.length); 2397 args->info.icon.length);
2398 } else if (args->reqclass & AIM_CAPS_IMIMAGE) { 2398 } else if (args->reqclass & AIM_CAPS_DIRECTIM) {
2399 struct ask_direct *d = g_new0(struct ask_direct, 1); 2399 struct ask_direct *d = g_new0(struct ask_direct, 1);
2400 char buf[256]; 2400 char buf[256];
2401 2401
2402 if (!args->verifiedip) { 2402 if (!args->verifiedip) {
2403 gaim_debug(GAIM_DEBUG_INFO, "oscar", 2403 gaim_debug(GAIM_DEBUG_INFO, "oscar",
3085 if (!caps) { 3085 if (!caps) {
3086 return NULL; 3086 return NULL;
3087 } else while (bit <= AIM_CAPS_LAST) { 3087 } else while (bit <= AIM_CAPS_LAST) {
3088 if (bit & caps) { 3088 if (bit & caps) {
3089 switch (bit) { 3089 switch (bit) {
3090 case 0x1: 3090 case AIM_CAPS_BUDDYICON:
3091 tmp = _("Buddy Icon"); 3091 tmp = _("Buddy Icon");
3092 break; 3092 break;
3093 case 0x2: 3093 case AIM_CAPS_VOICE:
3094 tmp = _("Voice"); 3094 tmp = _("Voice");
3095 break; 3095 break;
3096 case 0x4: 3096 case AIM_CAPS_DIRECTIM:
3097 tmp = _("Direct IM"); 3097 tmp = _("Direct IM");
3098 break; 3098 break;
3099 case 0x8: 3099 case AIM_CAPS_CHAT:
3100 tmp = _("Chat"); 3100 tmp = _("Chat");
3101 break; 3101 break;
3102 case 0x10: 3102 case AIM_CAPS_GETFILE:
3103 tmp = _("Get File"); 3103 tmp = _("Get File");
3104 break; 3104 break;
3105 case 0x20: 3105 case AIM_CAPS_SENDFILE:
3106 tmp = _("Send File"); 3106 tmp = _("Send File");
3107 break; 3107 break;
3108 case 0x40: 3108 case AIM_CAPS_GAMES:
3109 case 0x200: 3109 case AIM_CAPS_GAMES2:
3110 tmp = _("Games"); 3110 tmp = _("Games");
3111 break; 3111 break;
3112 case 0x80: 3112 case AIM_CAPS_SAVESTOCKS:
3113 tmp = _("Add-Ins"); 3113 tmp = _("Add-Ins");
3114 break; 3114 break;
3115 case 0x100: 3115 case AIM_CAPS_SENDBUDDYLIST:
3116 tmp = _("Send Buddy List"); 3116 tmp = _("Send Buddy List");
3117 break; 3117 break;
3118 case 0x400: 3118 case AIM_CAPS_ICQ:
3119 tmp = _("EveryBuddy Bug"); 3119 tmp = _("EveryBuddy Bug");
3120 break; 3120 break;
3121 case 0x800: 3121 case AIM_CAPS_APINFO:
3122 tmp = _("AP User"); 3122 tmp = _("AP User");
3123 break; 3123 break;
3124 case 0x1000: 3124 case AIM_CAPS_ICQRTF:
3125 tmp = _("ICQ RTF"); 3125 tmp = _("ICQ RTF");
3126 break; 3126 break;
3127 case 0x2000: 3127 case AIM_CAPS_EMPTY:
3128 tmp = _("Nihilist"); 3128 tmp = _("Nihilist");
3129 break; 3129 break;
3130 case 0x4000: 3130 case AIM_CAPS_ICQSERVERRELAY:
3131 tmp = _("ICQ Server Relay"); 3131 tmp = _("ICQ Server Relay");
3132 break; 3132 break;
3133 case 0x8000: 3133 case AIM_CAPS_ICQUTF8OLD:
3134 tmp = _("ICQ Unknown"); 3134 tmp = _("Old ICQ UTF8");
3135 break; 3135 break;
3136 case 0x10000: 3136 case AIM_CAPS_TRILLIANCRYPT:
3137 tmp = _("Trillian Encryption"); 3137 tmp = _("Trillian Encryption");
3138 break; 3138 break;
3139 case 0x20000: 3139 case AIM_CAPS_ICQUTF8:
3140 tmp = _("ICQ UTF8"); 3140 tmp = _("ICQ UTF8");
3141 break; 3141 break;
3142 case AIM_CAPS_HIPTOP: 3142 case AIM_CAPS_HIPTOP:
3143 tmp = _("Hiptop"); 3143 tmp = _("Hiptop");
3144 break;
3145 case AIM_CAPS_SECUREIM:
3146 tmp = _("Secure IM");
3144 break; 3147 break;
3145 default: 3148 default:
3146 tmp = NULL; 3149 tmp = NULL;
3147 break; 3150 break;
3148 } 3151 }
5925 5928
5926 if (b) 5929 if (b)
5927 bi = g_hash_table_lookup(od->buddyinfo, normalize(b->name)); 5930 bi = g_hash_table_lookup(od->buddyinfo, normalize(b->name));
5928 5931
5929 if (b && bi && aim_sncmp(gaim_account_get_username(gaim_connection_get_account(gc)), who) && GAIM_BUDDY_IS_ONLINE(b)) { 5932 if (b && bi && aim_sncmp(gaim_account_get_username(gaim_connection_get_account(gc)), who) && GAIM_BUDDY_IS_ONLINE(b)) {
5930 if (bi->caps & AIM_CAPS_IMIMAGE) { 5933 if (bi->caps & AIM_CAPS_DIRECTIM) {
5931 pbm = g_new0(struct proto_buddy_menu, 1); 5934 pbm = g_new0(struct proto_buddy_menu, 1);
5932 pbm->label = _("Direct IM"); 5935 pbm->label = _("Direct IM");
5933 pbm->callback = oscar_ask_direct_im; 5936 pbm->callback = oscar_ask_direct_im;
5934 pbm->gc = gc; 5937 pbm->gc = gc;
5935 m = g_list_append(m, pbm); 5938 m = g_list_append(m, pbm);