aboutsummaryrefslogtreecommitdiffstats
path: root/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'query.c')
-rw-r--r--query.c10
1 files changed, 8 insertions, 2 deletions
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;