diff options
| author | Sven Moritz Hallberg <sm@khjk.org> | 2008-02-11 21:31:27 +0100 | 
|---|---|---|
| committer | Sven Moritz Hallberg <sm@khjk.org> | 2008-02-11 21:31:27 +0100 | 
| commit | e6cb1101cbbf6a4c2751f20c2072c9ca3127ad98 (patch) | |
| tree | d1d12a11f8ea306dd4300ca816aca900772eb9d6 /query.c | |
| parent | 3b8e810996df506a5acca9ac5a46a23a4229250e (diff) | |
allow NULL for yes/no handlers
Diffstat (limited to 'query.c')
| -rw-r--r-- | query.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| @@ -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; | 
