diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-06 00:21:02 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-06 00:21:02 +0100 | 
| commit | b308cf9bafbdf76da73a57607b65c4763aa3057b (patch) | |
| tree | c686906b479a0edd52b18a213e1d420f7343855d /protocols/yahoo/yahoo.c | |
| parent | 3ab1d317831a6c1830bb648a1a8d63a41c92f651 (diff) | |
| parent | e774815bc621af90bb64ca314b84367659c5a005 (diff) | |
Merging libpurple branch into killerbee. It's fairly usable already, and
Debian packaging is now properly separated. This also picks up a load of
stuff from mainline it seems.
Diffstat (limited to 'protocols/yahoo/yahoo.c')
| -rw-r--r-- | protocols/yahoo/yahoo.c | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index b61f6ff9..c3ec7bff 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -137,10 +137,15 @@ static void byahoo_login( account_t *acc )  {  	struct im_connection *ic = imcb_new( acc );  	struct byahoo_data *yd = ic->proto_data = g_new0( struct byahoo_data, 1 ); +	char *s;  	yd->logged_in = FALSE;  	yd->current_status = YAHOO_STATUS_AVAILABLE; +	if( ( s = strchr( acc->user, '@' ) ) && g_strcasecmp( s, "@yahoo.com" ) == 0 ) +		imcb_error( ic, "Your Yahoo! username should just be a username. " +		                "Do not include any @domain part." ); +	  	imcb_log( ic, "Connecting" );  	yd->y2_id = yahoo_init( acc->user, acc->pass );  	yahoo_login( yd->y2_id, yd->current_status ); @@ -680,7 +685,7 @@ int ext_yahoo_add_handler( int id, int fd, yahoo_input_condition cond, void *dat  		d->data = data;  		inp->d = d; -		d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d ); +		d->tag = inp->h = b_input_add( fd, B_EV_IO_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d );  	}  	else if( cond == YAHOO_INPUT_WRITE )  	{ @@ -691,7 +696,7 @@ int ext_yahoo_add_handler( int id, int fd, yahoo_input_condition cond, void *dat  		d->data = data;  		inp->d = d; -		d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d ); +		d->tag = inp->h = b_input_add( fd, B_EV_IO_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d );  	}  	else  	{ @@ -827,6 +832,10 @@ void ext_yahoo_got_conf_invite( int id, const char *ignored,  	char txt[1024];  	YList *m; +	if( g_strcasecmp( who, ic->acc->user ) == 0 ) +		/* WTF, Yahoo! seems to echo these now? */ +		return; +	  	inv = g_malloc( sizeof( struct byahoo_conf_invitation ) );  	memset( inv, 0, sizeof( struct byahoo_conf_invitation ) );  	inv->name = g_strdup( room ); | 
