aboutsummaryrefslogtreecommitdiffstats
path: root/query.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-05-25 01:04:18 +0200
committerJelmer Vernooij <jelmer@samba.org>2006-05-25 01:04:18 +0200
commit601e81362bbf4e4d1e686334b35d3bdcd87314d2 (patch)
tree53ed2250bfc35b9e8da568b6f624a530d323ef32 /query.c
parent46ad029950221205d1eb6201ec2f01c7231876c2 (diff)
parentfc630f9fb47690c30feaf4738727a213d633afc9 (diff)
[merge] Wilmer
Diffstat (limited to 'query.c')
-rw-r--r--query.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/query.c b/query.c
index 670dde36..39821f3a 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,16 +137,15 @@ 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 );
serv_got_crap( q->gc, "Accepted: %s", q->question );
+ q->yes( NULL, q->data );
}
else
{
- q->no( NULL, q->data );
serv_got_crap( q->gc, "Rejected: %s", q->question );
+ q->no( NULL, q->data );
}
q->data = NULL;