aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protocols/msn/msn.h15
-rw-r--r--protocols/msn/ns.c25
-rw-r--r--protocols/nogaim.c16
3 files changed, 30 insertions, 26 deletions
diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h
index 6e447d7f..d788260c 100644
--- a/protocols/msn/msn.h
+++ b/protocols/msn/msn.h
@@ -38,15 +38,18 @@
#define debug( text... )
#endif
-#define QRY_NAME "msmsgs@msnmsgr.com"
-#define QRY_CODE "Q1P7W2E4J9R8U3S5"
-
-/* This should be MSN Messenger 7.0.0813 */
-//#define MSNP11_PROD_KEY "CFHUR$52U_{VIX5T"
-//#define MSNP11_PROD_ID "PROD0101{0RM?UBW"
+/* This should be MSN Messenger 7.0.0813
+#define MSNP11_PROD_KEY "CFHUR$52U_{VIX5T"
+#define MSNP11_PROD_ID "PROD0101{0RM?UBW"
+*/
+/* Some other version.
#define MSNP11_PROD_KEY "O4BG@C7BWLYQX?5G"
#define MSNP11_PROD_ID "PROD01065C%ZFN6F"
+*/
+
+#define MSNP11_PROD_KEY "RG@XY*28Q5QHS%Q5"
+#define MSNP11_PROD_ID "PROD0113H11T8$X_"
#define MSN_SB_NEW -24062002
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index ffb21c47..3e02e328 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -292,25 +292,20 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
}
else if( strcmp( cmd[0], "CHL" ) == 0 )
{
- md5_state_t state;
- md5_byte_t digest[16];
- int i;
+ char *resp;
- if( num_parts != 3 )
+ if( num_parts < 3 )
{
imcb_error( ic, "Syntax error" );
imc_logout( ic, TRUE );
return( 0 );
}
- md5_init( &state );
- md5_append( &state, (const md5_byte_t *) cmd[2], strlen( cmd[2] ) );
- md5_append( &state, (const md5_byte_t *) QRY_CODE, strlen( QRY_CODE ) );
- md5_finish( &state, digest );
-
- g_snprintf( buf, sizeof( buf ), "QRY %d %s %d\r\n", ++md->trId, QRY_NAME, 32 );
- for( i = 0; i < 16; i ++ )
- g_snprintf( buf + strlen( buf ), 3, "%02x", digest[i] );
+ resp = msn_p11_challenge( cmd[2] );
+ g_snprintf( buf, sizeof( buf ), "QRY %d %s %zd\r\n%s",
+ ++md->trId, MSNP11_PROD_ID,
+ strlen( resp ), resp );
+ g_free( resp );
return( msn_write( ic, buf, strlen( buf ) ) );
}
@@ -581,6 +576,12 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
censore. Meh. */
md->handler->msglen = atoi( cmd[2] );
}
+ else if( strcmp( cmd[0], "UBX" ) == 0 )
+ {
+ /* Status message. Parser coming soon. */
+ if( num_parts >= 4 )
+ md->handler->msglen = atoi( cmd[3] );
+ }
else if( isdigit( cmd[0][0] ) )
{
int num = atoi( cmd[0] );
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 7943e026..10ffd843 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -325,14 +325,6 @@ void imc_logout( struct im_connection *ic, int allow_reconnect )
imcb_log( ic, "Signing off.." );
- b_event_remove( ic->keepalive );
- ic->keepalive = 0;
- ic->acc->prpl->logout( ic );
- b_event_remove( ic->inpa );
-
- g_free( ic->away );
- ic->away = NULL;
-
for( l = bee->users; l; )
{
bee_user_t *bu = l->data;
@@ -344,6 +336,14 @@ void imc_logout( struct im_connection *ic, int allow_reconnect )
l = next;
}
+ b_event_remove( ic->keepalive );
+ ic->keepalive = 0;
+ ic->acc->prpl->logout( ic );
+ b_event_remove( ic->inpa );
+
+ g_free( ic->away );
+ ic->away = NULL;
+
query_del_by_conn( (irc_t*) ic->bee->ui_data, ic );
for( a = bee->accounts; a; a = a->next )