Changeset 254a4da for protocols/msn


Ignore:
Timestamp:
2015-04-10T17:10:40Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
11e42dc
Parents:
693aca0
git-author:
dequis <dx@…> (08-03-15 04:28:49)
git-committer:
dequis <dx@…> (10-04-15 17:10:40)
Message:

msn: start update to msnp21

  • bump protocol version
  • update CVR parameters
  • don't send BLP, send ADL right after getting contact list
  • NFY payload size parsing
  • MSNP21 style ADL
Location:
protocols/msn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.h

    r693aca0 r254a4da  
    6060#define MSNP11_PROD_KEY "C1BX{V4W}Q3*10SM"
    6161#define MSNP11_PROD_ID  "PROD0120PW!CCV9@"
    62 #define MSNP_VER        "MSNP18"
     62#define MSNP_VER        "MSNP21"
    6363#define MSNP_BUILD      "14.0.8117.416"
    6464
  • protocols/msn/ns.c

    r693aca0 r254a4da  
    185185                }
    186186
    187                 return(msn_ns_write(ic, handler->fd, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s\r\n",
     187                return(msn_ns_write(ic, handler->fd, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s VmVyc2lvbjogMQ0KWGZyQ291bnQ6IDINClhmclNlbnRVVENUaW1lOiA2MzU2MTQ3OTU5NzgzOTAwMDANCklzR2VvWGZyOiB0cnVlDQo=\r\n",
    188188                                    ++md->trId, ic->acc->user));
    189189        } else if (strcmp(cmd[0], "CVR") == 0) {
     
    297297                        return(0);
    298298                }
    299         } else if (strcmp(cmd[0], "BLP") == 0) {
    300                 msn_ns_send_adl_start(ic);
    301                 return msn_ns_finish_login(ic);
    302299        } else if (strcmp(cmd[0], "ADL") == 0) {
    303300                if (num_parts >= 3 && strcmp(cmd[2], "OK") == 0) {
     
    497494                        handler->msglen = atoi(cmd[1]);
    498495                }
     496        } else if (strcmp(cmd[0], "NFY") == 0) {
     497                if (num_parts >= 3) {
     498                        handler->msglen = atoi(cmd[2]);
     499                }
    499500        } else if (strcmp(cmd[0], "UBM") == 0) {
    500501                if (num_parts >= 7) {
     
    768769void msn_auth_got_contact_list(struct im_connection *ic)
    769770{
    770         struct msn_data *md;
    771 
    772771        /* Dead connection? */
    773772        if (g_slist_find(msn_connections, ic) == NULL) {
     
    775774        }
    776775
    777         md = ic->proto_data;
    778         msn_ns_write(ic, -1, "BLP %d %s\r\n", ++md->trId, "BL");
     776        msn_ns_send_adl_start(ic);
     777        msn_ns_finish_login(ic);
    779778}
    780779
    781780static gboolean msn_ns_send_adl_1(gpointer key, gpointer value, gpointer data)
    782781{
    783         struct xt_node *adl = data, *d, *c;
     782        struct xt_node *adl = data, *d, *c, *s;
    784783        struct bee_user *bu = value;
    785784        struct msn_buddy_data *bd = bu->data;
     
    810809        c = xt_new_node("c", NULL, NULL);
    811810        xt_add_attr(c, "n", handle);
    812         xt_add_attr(c, "l", l);
    813811        xt_add_attr(c, "t", "1");   /* FIXME: Network type, i.e. 32 for Y!MSG */
     812        s = xt_new_node("s", NULL, NULL);
     813        xt_add_attr(s, "n", "IM");
     814        xt_add_attr(s, "l", l);
     815        xt_insert_child(c, s);
    814816        xt_insert_child(d, c);
    815817
Note: See TracChangeset for help on using the changeset viewer.