diff options
Diffstat (limited to 'protocols/purple/purple.c')
| -rw-r--r-- | protocols/purple/purple.c | 21 | 
1 files changed, 15 insertions, 6 deletions
| diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 98cd2241..2804fdf3 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -34,7 +34,7 @@ GSList *purple_connections;  /* This makes me VERY sad... :-( But some libpurple callbacks come in without     any context so this is the only way to get that. Don't want to support     libpurple in daemon mode anyway. */ -static irc_t *local_irc; +static bee_t *local_bee;  static char *set_eval_display_name( set_t *set, char *value ); @@ -156,8 +156,11 @@ static void purple_init( account_t *acc )  			break;  		default: +			/** No way to talk to the user right now, invent one when +			this becomes important.  			irc_usermsg( acc->irc, "Setting with unknown type: %s (%d) Expect stuff to break..\n",  			             name, purple_account_option_get_type( o ) ); +			*/  			name = NULL;  		} @@ -250,13 +253,14 @@ static void purple_login( account_t *acc )  	struct im_connection *ic = imcb_new( acc );  	PurpleAccount *pa; -	if( local_irc != NULL && local_irc != acc->irc ) +	if( local_bee != NULL && local_bee != acc->bee )  	{ -		irc_usermsg( acc->irc, "Daemon mode detected. Do *not* try to use libpurple in daemon mode! " -		                       "Please use inetd or ForkDaemon mode instead." ); +		imcb_error( ic,  "Daemon mode detected. Do *not* try to use libpurple in daemon mode! " +		                 "Please use inetd or ForkDaemon mode instead." ); +		imc_logout( ic, FALSE );  		return;  	} -	local_irc = acc->irc; +	local_bee = acc->bee;  	/* For now this is needed in the _connected() handlers if using  	   GLib event handling, to make sure we're not handling events @@ -682,6 +686,10 @@ static void prplcb_blist_update( PurpleBuddyList *list, PurpleBlistNode *node )  		imcb_buddy_status( ic, bud->name, flags, purple_status_get_name( as ),  		                   purple_status_get_attr_string( as, "message" ) ); +		 +		imcb_buddy_times( ic, bud->name, +		                  purple_presence_get_login_time( bud->presence ), +		                  purple_presence_get_idle_time( bud->presence ) );  	}  } @@ -865,8 +873,9 @@ static void *prplcb_request_action( const char *title, const char *primary, cons  	pqad->user_data = user_data; +	/* TODO: IRC stuff here :-( */  	q = g_strdup_printf( "Request: %s\n\n%s\n\n%s", title, primary, secondary ); -	pqad->bee_data = query_add( local_irc, purple_ic_by_pa( account ), q, +	pqad->bee_data = query_add( local_bee->ui_data, purple_ic_by_pa( account ), q,  		prplcb_request_action_yes, prplcb_request_action_no, pqad );  	g_free( q ); | 
