Changeset fb020ac for irc.c


Ignore:
Timestamp:
2010-03-07T18:43:23Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
279607e
Parents:
e08e53c (diff), c32f492 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging in mainline, including improved away/status stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    re08e53c rfb020ac  
    7878}
    7979
     80static char *set_eval_away_status( set_t *set, char *value )
     81{
     82        irc_t *irc = set->data;
     83        account_t *a;
     84       
     85        g_free( set->value );
     86        set->value = g_strdup( value );
     87       
     88        for( a = irc->accounts; a; a = a->next )
     89        {
     90                struct im_connection *ic = a->ic;
     91               
     92                if( ic && ic->flags & OPT_LOGGED_IN )
     93                        imc_away_send_update( ic );
     94        }
     95       
     96        return value;
     97}
     98
    8099irc_t *irc_new( int fd )
    81100{
     
    143162        irc_connection_list = g_slist_append( irc_connection_list, irc );
    144163       
     164        s = set_add( &irc->set, "away", NULL,  set_eval_away_status, irc );
     165        s->flags |= SET_NULL_OK;
    145166        s = set_add( &irc->set, "away_devoice", "true",  set_eval_away_devoice, irc );
    146167        s = set_add( &irc->set, "auto_connect", "true", set_eval_bool, irc );
     
    163184        s = set_add( &irc->set, "save_on_quit", "true", set_eval_bool, irc );
    164185        s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc );
     186        s = set_add( &irc->set, "status", NULL,  set_eval_away_status, irc );
     187        s->flags |= SET_NULL_OK;
    165188        s = set_add( &irc->set, "strip_html", "true", NULL, irc );
    166189        s = set_add( &irc->set, "to_char", ": ", set_eval_to_char, irc );
Note: See TracChangeset for help on using the changeset viewer.