From aefa533eb48587d9f509a8dcab358061b72c7b3b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 21 Mar 2006 09:12:22 +0100 Subject: Added a special +b usermode for easier parseability of some things. (For now blist and qlist, but more should come) --- query.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'query.c') diff --git a/query.c b/query.c index 670dde36..eb2f45df 100644 --- a/query.c +++ b/query.c @@ -39,6 +39,17 @@ query_t *query_add( irc_t *irc, struct gaim_connection *gc, char *question, void q->no = no; q->data = data; + if( strchr( irc->umode, 'b' ) != NULL ) + { + char *s; + + /* At least for the machine-parseable version, get rid of + newlines to make "parsing" easier. */ + for( s = q->question; *s; s ++ ) + if( *s == '\r' || *s == '\n' ) + *s = ' '; + } + if( irc->queries ) { query_t *l = irc->queries; @@ -126,7 +137,6 @@ void query_answer( irc_t *irc, query_t *q, int ans ) q = query_default( irc ); disp = 1; } - //Using irc_usermsg instead of serv_got_crap because \x02A is a char too, so a SPACE is needed. if( ans ) { q->yes( NULL, q->data ); -- cgit v1.2.3