diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/msn/msn.c | 4 | ||||
| -rw-r--r-- | protocols/msn/msn.h | 1 | ||||
| -rw-r--r-- | protocols/msn/ns.c | 17 | 
3 files changed, 19 insertions, 3 deletions
| diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index 161f7590..45185393 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -331,6 +331,10 @@ static char *set_eval_display_name( set_t *set, char *value )  		imcb_log( ic, "Warning: Persistent name changes for this account have to be done "  		              "in the profile. BitlBee doesn't currently support this." ); +	if( md->flags & MSN_EMAIL_UNVERIFIED ) +		imcb_log( ic, "Warning: Your e-mail address is unverified. MSN doesn't allow " +		              "changing your display name until your e-mail address if verified." ); +	  	msn_soap_addressbook_set_display_name( ic, value );  	return msn_ns_set_display_name( ic, value ) ? value : NULL;  } diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index 829bbd4c..39a44c30 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -81,6 +81,7 @@ typedef enum  	MSN_GOT_PROFILE_DN = 2,  	MSN_DONE_ADL = 4,  	MSN_REAUTHING = 8, +	MSN_EMAIL_UNVERIFIED = 16,  } msn_flags_t;  struct msn_handler_data diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index dd9bff18..604e2f4e 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -277,6 +277,12 @@ static int msn_ns_command( struct msn_handler_data *handler, char **cmd, int num  		}  		else if( strcmp( cmd[2], "OK" ) == 0 )  		{ +			/* If the number after the handle is 0, the e-mail +			   address is unverified, which means we can't change +			   the display name. */ +			if( cmd[4][0] == '0' ) +				md->flags |= MSN_EMAIL_UNVERIFIED; +			  			imcb_log( ic, "Authenticated, getting buddy list" );  			msn_soap_memlist_request( ic );  		} @@ -869,7 +875,12 @@ int msn_ns_finish_login( struct im_connection *ic )  		md->flags |= MSN_DONE_ADL;  	if( ( md->flags & MSN_DONE_ADL ) && ( md->flags & MSN_GOT_PROFILE ) ) -		return msn_ns_set_display_name( ic, set_getstr( &ic->acc->set, "display_name" ) ); -	else -		return 1; +	{ +		if( md->flags & MSN_EMAIL_UNVERIFIED ) +			imcb_connected( ic ); +		else +			return msn_ns_set_display_name( ic, set_getstr( &ic->acc->set, "display_name" ) ); +	} +	 +	return 1;  } | 
