comparison libpurple/protocols/oscar/family_auth.c @ 27505:5048054d319a

Use the ui_info hash table instead of prefs when passing the clientstring and distid from the UIs to the oscar prpl. I realized that using a pref wasn't great because it's persistent, and if you switch from a UI that sets one of those strings to a UI that doesn't hen we'll keep using the old value.
author Mark Doliner <mark@kingant.net>
date Wed, 08 Jul 2009 20:11:07 +0000
parents 4a62072ea833
children 74e487f82f39
comparison
equal deleted inserted replaced
27504:4f24d5da4cb3 27505:5048054d319a
139 139
140 frame = flap_frame_new(od, 0x01, 1152); 140 frame = flap_frame_new(od, 0x01, 1152);
141 141
142 aim_encode_password(password, password_encoded); 142 aim_encode_password(password, password_encoded);
143 143
144 clientstring = purple_prefs_get_string("/plugins/prpl/oscar/clientstring"); 144 clientstring = oscar_get_ui_info_string(
145 if (clientstring == NULL) 145 od->icq ? "prpl-icq-clientstring" : "prpl-aim-clientstring",
146 clientstring = ci->clientstring; 146 ci->clientstring);
147 distrib = purple_prefs_get_int("/plugins/prpl/oscar/distid"); 147 distrib = oscar_get_ui_info_int(
148 if ((gint32)distrib == -1) 148 od->icq ? "prpl-icq-distid" : "prpl-aim-distid",
149 distrib = ci->distrib; 149 ci->distrib);
150 150
151 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */ 151 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */
152 aim_tlvlist_add_str(&tlvlist, 0x0001, sn); 152 aim_tlvlist_add_str(&tlvlist, 0x0001, sn);
153 aim_tlvlist_add_raw(&tlvlist, 0x0002, passwdlen, password_encoded); 153 aim_tlvlist_add_raw(&tlvlist, 0x0002, passwdlen, password_encoded);
154 154
245 else if (truncate_pass && password_len > 8) 245 else if (truncate_pass && password_len > 8)
246 password_len = 8; 246 password_len = 8;
247 247
248 aim_encode_password_md5(password, password_len, key, digest); 248 aim_encode_password_md5(password, password_len, key, digest);
249 249
250 clientstring = purple_prefs_get_string("/plugins/prpl/oscar/clientstring"); 250 clientstring = oscar_get_ui_info_string(
251 if (clientstring == NULL) 251 od->icq ? "prpl-icq-clientstring" : "prpl-aim-clientstring",
252 clientstring = ci->clientstring; 252 ci->clientstring);
253 distrib = purple_prefs_get_int("/plugins/prpl/oscar/distid"); 253 distrib = oscar_get_ui_info_int(
254 if ((gint32)distrib == -1) 254 od->icq ? "prpl-icq-distid" : "prpl-aim-distid",
255 distrib = ci->distrib; 255 ci->distrib);
256 256
257 aim_tlvlist_add_raw(&tlvlist, 0x0025, 16, digest); 257 aim_tlvlist_add_raw(&tlvlist, 0x0025, 16, digest);
258 258
259 #ifndef USE_OLD_MD5 259 #ifndef USE_OLD_MD5
260 aim_tlvlist_add_noval(&tlvlist, 0x004c); 260 aim_tlvlist_add_noval(&tlvlist, 0x004c);