From e6cb1101cbbf6a4c2751f20c2072c9ca3127ad98 Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Mon, 11 Feb 2008 21:31:27 +0100 Subject: allow NULL for yes/no handlers --- query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'query.c') diff --git a/query.c b/query.c index 3ae1ce31..99a579bc 100644 --- a/query.c +++ b/query.c @@ -143,7 +143,8 @@ 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 ); + if(q->yes) + q->yes( NULL, q->data ); } else { @@ -151,7 +152,8 @@ 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 ); + if(q->no) + q->no( NULL, q->data ); } q->data = NULL; -- cgit v1.2.3