Changeset 0e8b3e8 for irc.c


Ignore:
Timestamp:
2010-06-07T15:21:21Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c5aefa4
Parents:
56699f0
Message:

Changing away_devoice will change current voice statuses in all channels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r56699f0 r0e8b3e8  
    100100        b->ui = &irc_ui_funcs;
    101101       
    102         s = set_add( &b->set, "away_devoice", "true", NULL/*set_eval_away_devoice*/, irc );
     102        s = set_add( &b->set, "away_devoice", "true", set_eval_away_devoice, irc );
    103103        s = set_add( &b->set, "charset", "utf-8", set_eval_charset, irc );
    104104        s = set_add( &b->set, "default_target", "root", NULL, irc );
     
    819819        return value;
    820820}
     821
     822char *set_eval_away_devoice( set_t *set, char *value )
     823{
     824        irc_t *irc = set->data;
     825       
     826        if( !is_bool( value ) )
     827                return SET_INVALID;
     828       
     829        /* The usual problem: The setting isn't actually changed at this
     830           point and we need it to be, so do it by hand. */
     831        g_free( set->value );
     832        set->value = g_strdup( value );
     833       
     834        bee_irc_channel_update( irc, NULL, NULL );
     835       
     836        return value;
     837}
Note: See TracChangeset for help on using the changeset viewer.