Changes in query.c [5f4eede:9143aeb]
Legend:
- Unmodified
- Added
- Removed
-
query.c
r5f4eede r9143aeb 30 30 static query_t *query_default( irc_t *irc ); 31 31 32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ) 32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, 33 query_callback yes, query_callback no, void *data ) 33 34 { 34 35 query_t *q = g_new0( query_t, 1 ); … … 102 103 int count = 0; 103 104 104 if(!ic)105 return;106 107 105 q = irc->queries; 108 106 def = query_default( irc ); … … 143 141 if( ans ) 144 142 { 145 if( q->ic)143 if( q->ic ) 146 144 imcb_log( q->ic, "Accepted: %s", q->question ); 147 145 else 148 146 irc_usermsg( irc, "Accepted: %s", q->question ); 149 if(q->yes) 150 q->yes( q->ic ? (gpointer)q->ic : (gpointer)irc, q->data ); 147 q->yes( q->data ); 151 148 } 152 149 else 153 150 { 154 if( q->ic)151 if( q->ic ) 155 152 imcb_log( q->ic, "Rejected: %s", q->question ); 156 153 else 157 154 irc_usermsg( irc, "Rejected: %s", q->question ); 158 if(q->no) 159 q->no( q->ic ? (gpointer)q->ic : (gpointer)irc, q->data ); 155 q->no( q->data ); 160 156 } 161 157 q->data = NULL;
Note: See TracChangeset
for help on using the changeset viewer.