comparison libpurple/protocols/msn/msn.c @ 20459:46437bdf316b

In the initial ADL listing, send the commands in the correct sequence as required by the server: BLP, ADL and PRP. When the server acknowledges this initial ADL, send CHG with status information
author Carlos Silva <typ0@pidgin.im>
date Thu, 05 Jul 2007 06:35:37 +0000
parents db286cc82bd1
children 3537f82db107 530a92d50c5e
comparison
equal deleted inserted replaced
20458:faad7d69de10 20459:46437bdf316b
403 MsnUser *user; 403 MsnUser *user;
404 if (buddy == NULL) 404 if (buddy == NULL)
405 return FALSE; 405 return FALSE;
406 user = buddy->proto_data; 406 user = buddy->proto_data;
407 return user && user->mobile; 407 return user && user->mobile;
408 }
409
410 void
411 msn_send_privacy(PurpleConnection *gc)
412 {
413 PurpleAccount *account;
414 MsnSession *session;
415 MsnCmdProc *cmdproc;
416
417 account = purple_connection_get_account(gc);
418 session = gc->proto_data;
419 cmdproc = session->notification->cmdproc;
420
421 if (account->perm_deny == PURPLE_PRIVACY_ALLOW_ALL ||
422 account->perm_deny == PURPLE_PRIVACY_DENY_USERS)
423 {
424 msn_cmdproc_send(cmdproc, "BLP", "%s", "AL");
425 }
426 else
427 {
428 msn_cmdproc_send(cmdproc, "BLP", "%s", "BL");
429 }
408 } 430 }
409 431
410 static void 432 static void
411 initiate_chat_cb(PurpleBlistNode *node, gpointer data) 433 initiate_chat_cb(PurpleBlistNode *node, gpointer data)
412 { 434 {
1226 } 1248 }
1227 1249
1228 static void 1250 static void
1229 msn_set_permit_deny(PurpleConnection *gc) 1251 msn_set_permit_deny(PurpleConnection *gc)
1230 { 1252 {
1231 PurpleAccount *account; 1253 msn_send_privacy(gc);
1232 MsnSession *session;
1233 MsnCmdProc *cmdproc;
1234
1235 account = purple_connection_get_account(gc);
1236 session = gc->proto_data;
1237 cmdproc = session->notification->cmdproc;
1238
1239 if (account->perm_deny == PURPLE_PRIVACY_ALLOW_ALL ||
1240 account->perm_deny == PURPLE_PRIVACY_DENY_USERS)
1241 {
1242 msn_cmdproc_send(cmdproc, "BLP", "%s", "AL");
1243 }
1244 else
1245 {
1246 msn_cmdproc_send(cmdproc, "BLP", "%s", "BL");
1247 }
1248 } 1254 }
1249 1255
1250 static void 1256 static void
1251 msn_chat_invite(PurpleConnection *gc, int id, const char *msg, 1257 msn_chat_invite(PurpleConnection *gc, int id, const char *msg,
1252 const char *who) 1258 const char *who)