diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-03-21 09:12:22 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-03-21 09:12:22 +0100 |
commit | aefa533eb48587d9f509a8dcab358061b72c7b3b (patch) | |
tree | 269b4625750f1ae7b366085e8487906fd2096d8a /query.c | |
parent | 1ad104ab06fe3f7db1b55cc178e92e43cbda9d95 (diff) |
Added a special +b usermode for easier parseability of some things.
(For now blist and qlist, but more should come)
Diffstat (limited to 'query.c')
-rw-r--r-- | query.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 ); |