Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/msn.c @ 23504:69af5301e1a7
killing MsnContact which just wraps MsnSession
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 09 Mar 2008 23:55:27 +0000 |
parents | 00eaff9396ec |
children | a1652ea8f252 |
comparison
equal
deleted
inserted
replaced
23503:44159acb7bb7 | 23504:69af5301e1a7 |
---|---|
25 | 25 |
26 #include <glib.h> | 26 #include <glib.h> |
27 | 27 |
28 #include "msn.h" | 28 #include "msn.h" |
29 #include "accountopt.h" | 29 #include "accountopt.h" |
30 #include "contact.h" | |
30 #include "msg.h" | 31 #include "msg.h" |
31 #include "page.h" | 32 #include "page.h" |
32 #include "pluginpref.h" | 33 #include "pluginpref.h" |
33 #include "prefs.h" | 34 #include "prefs.h" |
34 #include "session.h" | 35 #include "session.h" |
1230 | 1231 |
1231 if (user != NULL && user->list_op & MSN_LIST_BL_OP) { | 1232 if (user != NULL && user->list_op & MSN_LIST_BL_OP) { |
1232 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL); | 1233 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL); |
1233 | 1234 |
1234 /* delete contact from Block list and add it to Allow in the callback */ | 1235 /* delete contact from Block list and add it to Allow in the callback */ |
1235 msn_del_contact_from_list(session->contact, NULL, who, MSN_LIST_BL); | 1236 msn_del_contact_from_list(session, NULL, who, MSN_LIST_BL); |
1236 } else { | 1237 } else { |
1237 /* just add the contact to Allow list */ | 1238 /* just add the contact to Allow list */ |
1238 msn_add_contact_to_list(session->contact, NULL, who, MSN_LIST_AL); | 1239 msn_add_contact_to_list(session, NULL, who, MSN_LIST_AL); |
1239 } | 1240 } |
1240 | 1241 |
1241 | 1242 |
1242 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_AL); | 1243 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_AL); |
1243 } | 1244 } |
1258 | 1259 |
1259 if (user != NULL && user->list_op & MSN_LIST_AL_OP) { | 1260 if (user != NULL && user->list_op & MSN_LIST_AL_OP) { |
1260 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_AL); | 1261 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_AL); |
1261 | 1262 |
1262 /* delete contact from Allow list and add it to Block in the callback */ | 1263 /* delete contact from Allow list and add it to Block in the callback */ |
1263 msn_del_contact_from_list(session->contact, NULL, who, MSN_LIST_AL); | 1264 msn_del_contact_from_list(session, NULL, who, MSN_LIST_AL); |
1264 } else { | 1265 } else { |
1265 /* just add the contact to Block list */ | 1266 /* just add the contact to Block list */ |
1266 msn_add_contact_to_list(session->contact, NULL, who, MSN_LIST_BL); | 1267 msn_add_contact_to_list(session, NULL, who, MSN_LIST_BL); |
1267 } | 1268 } |
1268 | 1269 |
1269 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_BL); | 1270 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_BL); |
1270 } | 1271 } |
1271 | 1272 |
1284 | 1285 |
1285 user = msn_userlist_find_user(userlist, who); | 1286 user = msn_userlist_find_user(userlist, who); |
1286 | 1287 |
1287 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_AL); | 1288 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_AL); |
1288 | 1289 |
1289 msn_del_contact_from_list(session->contact, NULL, who, MSN_LIST_AL); | 1290 msn_del_contact_from_list(session, NULL, who, MSN_LIST_AL); |
1290 | 1291 |
1291 if (user != NULL && user->list_op & MSN_LIST_RL_OP) | 1292 if (user != NULL && user->list_op & MSN_LIST_RL_OP) |
1292 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_BL); | 1293 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_BL); |
1293 } | 1294 } |
1294 | 1295 |
1307 | 1308 |
1308 user = msn_userlist_find_user(userlist, who); | 1309 user = msn_userlist_find_user(userlist, who); |
1309 | 1310 |
1310 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL); | 1311 msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL); |
1311 | 1312 |
1312 msn_del_contact_from_list(session->contact, NULL, who, MSN_LIST_BL); | 1313 msn_del_contact_from_list(session, NULL, who, MSN_LIST_BL); |
1313 | 1314 |
1314 if (user != NULL && user->list_op & MSN_LIST_RL_OP) | 1315 if (user != NULL && user->list_op & MSN_LIST_RL_OP) |
1315 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_AL); | 1316 msn_userlist_add_buddy_to_list(userlist, who, MSN_LIST_AL); |
1316 } | 1317 } |
1317 | 1318 |