Changeset 1c8e5f7 for irc_im.c


Ignore:
Timestamp:
2010-06-11T15:12:27Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
12b29db
Parents:
70ac477
Message:

Added away_reply_timeout setting so BitlBee will suppress away messages sent
in response to PRIVMSG if one was sent recently - some IRC clients including
irssi don't do this very well (when talking to >1 people who are away for
example).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r70ac477 r1c8e5f7  
    114114        }
    115115       
     116        /* Reset this one since the info may have changed. */
     117        iu->away_reply_timeout = 0;
     118       
    116119        bee_irc_channel_update( irc, NULL, iu );
    117120       
     
    320323static gboolean bee_irc_user_privmsg( irc_user_t *iu, const char *msg )
    321324{
     325        const char *away;
     326       
    322327        if( iu->bu == NULL )
    323328                return FALSE;
    324         else if( set_getbool( &iu->irc->b->set, "paste_buffer" ) )
     329       
     330        if( ( away = irc_user_get_away( iu ) ) &&
     331            time( NULL ) >= iu->away_reply_timeout )
     332        {
     333                irc_send_num( iu->irc, 301, "%s :%s", iu->nick, away );
     334                iu->away_reply_timeout = time( NULL ) +
     335                        set_getint( &iu->irc->b->set, "away_reply_timeout" );
     336        }
     337       
     338        if( set_getbool( &iu->irc->b->set, "paste_buffer" ) )
    325339        {
    326340                int delay;
Note: See TracChangeset for help on using the changeset viewer.