diff options
Diffstat (limited to 'protocols/yahoo')
| -rw-r--r-- | protocols/yahoo/Makefile | 5 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo.c | 28 | 
2 files changed, 16 insertions, 17 deletions
| diff --git a/protocols/yahoo/Makefile b/protocols/yahoo/Makefile index b4fe56e2..20ecce71 100644 --- a/protocols/yahoo/Makefile +++ b/protocols/yahoo/Makefile @@ -7,6 +7,9 @@  ### DEFINITIONS  -include ../../Makefile.settings +ifdef SRCDIR +SRCDIR := $(SRCDIR)protocols/yahoo/ +endif  # [SH] Program variables  objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o @@ -32,7 +35,7 @@ distclean: clean  $(objects): ../../Makefile.settings Makefile -$(objects): %.o: %.c +$(objects): %.o: $(SRCDIR)%.c  	@echo '*' Compiling $<  	@$(CC) -c $(CFLAGS) $< -o $@ diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index e4d541d5..bf577496 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -157,7 +157,7 @@ static void byahoo_logout( struct im_connection *ic )  	GSList *l;  	while( ic->groupchats ) -		imcb_chat_free( ic->groupchats ); +		imcb_chat_free( ic->groupchats->data );  	for( l = yd->buddygroups; l; l = l->next )  	{ @@ -612,10 +612,8 @@ void ext_yahoo_status_changed( int id, const char *who, int stat, const char *ms  	imcb_buddy_status( ic, who, flags, state_string, msg ); -	/* Not implemented yet...  	if( stat == YAHOO_STATUS_IDLE ) -		imcb_buddy_times( ic, who, 0, away ); -	*/ +		imcb_buddy_times( ic, who, 0, idle );  }  void ext_yahoo_got_im( int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8 ) @@ -685,7 +683,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 )  	{ @@ -696,7 +694,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  	{ @@ -795,10 +793,14 @@ static void byahoo_accept_conf( void *data )  {  	struct byahoo_conf_invitation *inv = data;  	struct groupchat *b; +	GSList *l; -	for( b = inv->ic->groupchats; b; b = b->next ) +	for( l = inv->ic->groupchats; l; l = l->next ) +	{ +		b = l->data;  		if( b == inv->c )  			break; +	}  	if( b != NULL )  	{ @@ -864,9 +866,7 @@ void ext_yahoo_conf_userdecline( int id, const char *ignored, const char *who, c  void ext_yahoo_conf_userjoin( int id, const char *ignored, const char *who, const char *room )  {  	struct im_connection *ic = byahoo_get_ic_by_id( id ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_add_buddy( c, (char*) who ); @@ -876,9 +876,7 @@ void ext_yahoo_conf_userleave( int id, const char *ignored, const char *who, con  {  	struct im_connection *ic = byahoo_get_ic_by_id( id ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_remove_buddy( c, (char*) who, "" ); @@ -888,9 +886,7 @@ void ext_yahoo_conf_message( int id, const char *ignored, const char *who, const  {  	struct im_connection *ic = byahoo_get_ic_by_id( id );  	char *m = byahoo_strip( msg ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_msg( c, (char*) who, (char*) m, 0, 0 ); | 
