Mercurial > pidgin
diff src/server.c @ 13933:ad171112d52c
[gaim-migrate @ 16461]
Autoreply messages are no longer sent in response to autoreply messages
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sat, 08 Jul 2006 15:38:45 +0000 |
parents | 7d513e44201b |
children | 8bda65b88e49 |
line wrap: on
line diff
--- a/src/server.c Sat Jul 08 07:26:57 2006 +0000 +++ b/src/server.c Sat Jul 08 15:38:45 2006 +0000 @@ -557,13 +557,21 @@ lar = get_last_auto_response(gc, name); if ((now - lar->sent) >= SECS_BEFORE_RESENDING_AUTORESPONSE) { + /* + * We don't want to send an autoresponse in response to the other user's + * autoresponse. We do, however, not want to then send one in response to the + * _next_ message, so we still set lar->sent to now. + */ lar->sent = now; - - serv_send_im(gc, name, away_msg, GAIM_MESSAGE_AUTO_RESP); + + if (!(flags & GAIM_MESSAGE_AUTO_RESP)) + { + serv_send_im(gc, name, away_msg, GAIM_MESSAGE_AUTO_RESP); - gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, away_msg, - GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP, - mtime); + gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, away_msg, + GAIM_MESSAGE_SEND | GAIM_MESSAGE_AUTO_RESP, + mtime); + } } } }