comparison libpurple/protocols/msn/userlist.c @ 23566:a0e957b7b923

Take care of more cleanup in the MSN code. No more C++ style comments. msn_convert_iso8601 was replaced with purple_str_to_time everywhere, so remove it. REM and SYN were removed in MSNP13. REA was removed in MSNP11. PRP and BLP were added already, so remove the TODO. Contact information is now taken from the contact server, so remove all that commented code from the ADL command.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 12 Jul 2008 06:44:19 +0000
parents 7bceac816e19
children 16734635febf 3f4b6162995f
comparison
equal deleted inserted replaced
23565:9acfa387c0a2 23566:a0e957b7b923
136 return TRUE; 136 return TRUE;
137 else 137 else
138 return FALSE; 138 return FALSE;
139 } 139 }
140 140
141 #if 0
142 static const char*
143 get_friendly_name(MsnUser *user)
144 {
145 const char *friendly_name;
146
147 g_return_val_if_fail(user != NULL, NULL);
148
149 friendly_name = msn_user_get_friendly_name(user);
150
151 if (friendly_name != NULL)
152 friendly_name = purple_url_encode(friendly_name);
153 else
154 friendly_name = msn_user_get_passport(user);
155
156 /* this might be a bit of a hack, but it should prevent notification server
157 * disconnections for people who have buddies with insane friendly names
158 * who added you to their buddy list from being disconnected. Stu. */
159 /* Shx: What? Isn't the store_name obtained from the server, and hence it's
160 * below the BUDDY_ALIAS_MAXLEN ? */
161 /* Stu: yeah, that's why it's a bit of a hack, as you pointed out, we're
162 * probably decoding the incoming store_name wrong, or something. bleh. */
163
164 if (strlen(friendly_name) > BUDDY_ALIAS_MAXLEN)
165 friendly_name = msn_user_get_passport(user);
166
167 return friendly_name;
168 }
169 #endif
170
171 /************************************************************************** 141 /**************************************************************************
172 * Server functions 142 * Server functions
173 **************************************************************************/ 143 **************************************************************************/
174 144
175 MsnListId 145 MsnListId
254 /* 224 /*
255 * TODO: The friendly name was NULL for me when I 225 * TODO: The friendly name was NULL for me when I
256 * looked at this. Maybe we should use the store 226 * looked at this. Maybe we should use the store
257 * name instead? --KingAnt 227 * name instead? --KingAnt
258 */ 228 */
259 // got_new_entry(gc, passport, friendly); 229 /* got_new_entry(gc, passport, friendly); */
260 } 230 }
261 } 231 }
262 232
263 user->list_op |= (1 << list_id); 233 user->list_op |= (1 << list_id);
264 /* purple_user_add_list_id (user, list_id); */ 234 /* purple_user_add_list_id (user, list_id); */
384 * should use the friendly name, instead? --KingAnt 354 * should use the friendly name, instead? --KingAnt
385 */ 355 */
386 356
387 if (!(list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) 357 if (!(list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP)))
388 { 358 {
389 // got_new_entry(gc, passport, store); 359 /* got_new_entry(gc, passport, store); */
390 } 360 }
391 } 361 }
392 362
393 if (list_op & MSN_LIST_PL_OP) 363 if (list_op & MSN_LIST_PL_OP)
394 { 364 {
776 { 746 {
777 list = lists[list_id]; 747 list = lists[list_id];
778 purple_debug_info("msn", "User '%s' is already in list: %s\n", who, list); 748 purple_debug_info("msn", "User '%s' is already in list: %s\n", who, list);
779 return; 749 return;
780 } 750 }
781
782 //friendly_name = (user != NULL) ? get_friendly_name(user) : who;
783
784 //purple_debug_info("msn", "store_name = %s\n", store_name);
785 751
786 /* XXX: see XXX above, this should really be done when we get the response from 752 /* XXX: see XXX above, this should really be done when we get the response from
787 the server */ 753 the server */
788 754
789 msn_user_set_op(user, list_op); 755 msn_user_set_op(user, list_op);