From bc676acb5f316f0688ab9f99dd2b73315a6ad50c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 16 Sep 2012 01:09:58 +0100 Subject: MSNP18 code. It logs in now but otherwise doesn't work all too well. --- protocols/msn/msn.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'protocols/msn/msn.h') diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index bf7cdfa8..f3e5b9b9 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -52,10 +52,15 @@ #define MSNP11_PROD_ID "PROD01065C%ZFN6F" */ +/* <= BitlBee 3.0.5 #define MSNP11_PROD_KEY "ILTXC!4IXB5FB*PX" #define MSNP11_PROD_ID "PROD0119GSJUC$18" -#define MSNP_VER "MSNP15" -#define MSNP_BUILD "8.5.1288" +*/ + +#define MSNP11_PROD_KEY "C1BX{V4W}Q3*10SM" +#define MSNP11_PROD_ID "PROD0120PW!CCV9@" +#define MSNP_VER "MSNP18" +#define MSNP_BUILD "14.0.8117.416" #define MSN_SB_NEW -24062002 @@ -221,12 +226,14 @@ extern GSList *msn_connections; extern GSList *msn_switchboards; /* ns.c */ -int msn_ns_write( struct im_connection *ic, int fd, const char *fmt, ... ); +int msn_ns_write( struct im_connection *ic, int fd, const char *fmt, ... ) G_GNUC_PRINTF( 3, 4 ); gboolean msn_ns_connect( struct im_connection *ic, struct msn_handler_data *handler, const char *host, int port ); void msn_ns_close( struct msn_handler_data *handler ); void msn_auth_got_passport_token( struct im_connection *ic, const char *token, const char *error ); void msn_auth_got_contact_list( struct im_connection *ic ); int msn_ns_finish_login( struct im_connection *ic ); +int msn_ns_sendmessage( struct im_connection *ic, struct bee_user *bu, const char *text ); +void msn_ns_oim_send_queue( struct im_connection *ic, GSList **msgq ); /* msn_util.c */ int msn_logged_in( struct im_connection *ic ); @@ -249,7 +256,7 @@ const struct msn_away_state *msn_away_state_by_name( char *name ); const struct msn_status_code *msn_status_by_number( int number ); /* sb.c */ -int msn_sb_write( struct msn_switchboard *sb, const char *fmt, ... ); +int msn_sb_write( struct msn_switchboard *sb, const char *fmt, ... ) G_GNUC_PRINTF( 2, 3 );; struct msn_switchboard *msn_sb_create( struct im_connection *ic, char *host, int port, char *key, int session ); struct msn_switchboard *msn_sb_by_handle( struct im_connection *ic, char *handle ); struct msn_switchboard *msn_sb_by_chat( struct groupchat *c ); -- cgit v1.2.3 From f9258aead615ef9b87baa1754777fd5faf867fe1 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 16 Sep 2012 12:52:35 +0100 Subject: Generate a machine UUID instead of using a hardcoded one. --- protocols/msn/msn.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/msn/msn.h') diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index f3e5b9b9..4d2d0fdd 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -122,6 +122,7 @@ struct msn_data int trId; char *tokens[4]; char *lock_key, *pp_policy; + char *uuid; GSList *msgq, *grpq, *soapq; GSList *switchboards; -- cgit v1.2.3 From 080c43a862bca535e51682423afc9d0f75ea1d02 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 16 Sep 2012 14:52:19 +0100 Subject: Some more tweaks: Should show up online now, and be able to send and receive messages. Seeing online state is still a problem due to the protocol#: gunk. --- protocols/msn/msn.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/msn/msn.h') diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index 4d2d0fdd..ed6db6f0 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -64,6 +64,9 @@ #define MSN_SB_NEW -24062002 +#define MSN_CAP1 0xC000 +#define MSN_CAP2 0x0000 + #define MSN_MESSAGE_HEADERS "MIME-Version: 1.0\r\n" \ "Content-Type: text/plain; charset=UTF-8\r\n" \ "User-Agent: BitlBee " BITLBEE_VERSION "\r\n" \ -- cgit v1.2.3 From 79bb7e412d28e8afe734762e8bd3e4c488a53562 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 16 Sep 2012 18:40:44 +0100 Subject: Online status should be read properly now. --- protocols/msn/msn.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/msn/msn.h') diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index ed6db6f0..7c23f282 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -1,7 +1,7 @@ /********************************************************************\ * BitlBee -- An IRC to other IM-networks gateway * * * - * Copyright 2002-2010 Wilmer van der Gaast and others * + * Copyright 2002-2012 Wilmer van der Gaast and others * \********************************************************************/ /* MSN module */ @@ -252,6 +252,7 @@ gint msn_domaintree_cmp( gconstpointer a_, gconstpointer b_ ); struct msn_group *msn_group_by_name( struct im_connection *ic, const char *name ); struct msn_group *msn_group_by_id( struct im_connection *ic, const char *id ); int msn_ns_set_display_name( struct im_connection *ic, const char *value ); +const char *msn_normalize_handle( const char *handle ); /* tables.c */ const struct msn_away_state *msn_away_state_by_number( int number ); @@ -262,7 +263,7 @@ const struct msn_status_code *msn_status_by_number( int number ); /* sb.c */ int msn_sb_write( struct msn_switchboard *sb, const char *fmt, ... ) G_GNUC_PRINTF( 2, 3 );; struct msn_switchboard *msn_sb_create( struct im_connection *ic, char *host, int port, char *key, int session ); -struct msn_switchboard *msn_sb_by_handle( struct im_connection *ic, char *handle ); +struct msn_switchboard *msn_sb_by_handle( struct im_connection *ic, const char *handle ); struct msn_switchboard *msn_sb_by_chat( struct groupchat *c ); struct msn_switchboard *msn_sb_spare( struct im_connection *ic ); int msn_sb_sendmessage( struct msn_switchboard *sb, char *text ); -- cgit v1.2.3 From 208db4babb7a9be245cedd3a0a4758891fece03d Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 29 Sep 2012 20:38:18 +0100 Subject: Support for sending messages to federated contacts. They don't seem to arrive but Pidgin seems to have the same problem. --- protocols/msn/msn.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/msn/msn.h') diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index 7c23f282..1dcb0071 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -197,6 +197,7 @@ typedef enum MSN_BUDDY_RL = 8, MSN_BUDDY_PL = 16, MSN_BUDDY_ADL_SYNCED = 256, + MSN_BUDDY_FED = 512, } msn_buddy_flags_t; struct msn_buddy_data -- cgit v1.2.3