aboutsummaryrefslogtreecommitdiffstats
path: root/query.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-11 21:31:27 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-11 21:31:27 +0100
commite6cb1101cbbf6a4c2751f20c2072c9ca3127ad98 (patch)
treed1d12a11f8ea306dd4300ca816aca900772eb9d6 /query.c
parent3b8e810996df506a5acca9ac5a46a23a4229250e (diff)
allow NULL for yes/no handlers
Diffstat (limited to 'query.c')
-rw-r--r--query.c6
1 files changed, 4 insertions, 2 deletions
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;