From 7f421d6b922837857d6aca342da314225023eb46 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 3 Mar 2008 23:18:36 +0000 Subject: BitlBee <= 1.0 didn't have "account set" and allowed one to delete an account and re-create it with new login settings if necessary, without losing custom nicknames. Now, nicknames are connected to an account instead of just the protocol, and they're flushed together with the account. So I added a warning to make sure nobody accidentally loses any settings while just changing the password. This will probably go after a few releases, since it's slightly annoying. --- query.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 99be2bee..6f9eb77f 100644 --- a/query.c +++ b/query.c @@ -139,12 +139,18 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - imcb_log( q->ic, "Accepted: %s", q->question ); + if( q->ic ) + imcb_log( q->ic, "Accepted: %s", q->question ); + else + irc_usermsg( irc, "Accepted: %s", q->question ); q->yes( NULL, q->data ); } else { - imcb_log( q->ic, "Rejected: %s", q->question ); + if( q->ic ) + imcb_log( q->ic, "Rejected: %s", q->question ); + else + irc_usermsg( irc, "Rejected: %s", q->question ); q->no( NULL, q->data ); } q->data = NULL; -- cgit v1.2.3 From 9143aeb969697e05953b0f60a2fff2581fa0f18c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 5 Apr 2008 13:26:04 +0100 Subject: query.h now defines a callback function type, not using void* for it anymore. Got rid of the bogus window handler pointer as the first argument to the callback. --- query.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 6f9eb77f..e8f69572 100644 --- a/query.c +++ b/query.c @@ -29,7 +29,8 @@ static void query_display( irc_t *irc, query_t *q ); static query_t *query_default( irc_t *irc ); -query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ) +query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, + query_callback yes, query_callback no, void *data ) { query_t *q = g_new0( query_t, 1 ); @@ -143,7 +144,7 @@ void query_answer( irc_t *irc, query_t *q, int ans ) imcb_log( q->ic, "Accepted: %s", q->question ); else irc_usermsg( irc, "Accepted: %s", q->question ); - q->yes( NULL, q->data ); + q->yes( q->data ); } else { @@ -151,7 +152,7 @@ void query_answer( irc_t *irc, query_t *q, int ans ) imcb_log( q->ic, "Rejected: %s", q->question ); else irc_usermsg( irc, "Rejected: %s", q->question ); - q->no( NULL, q->data ); + q->no( q->data ); } q->data = NULL; -- cgit v1.2.3