Changeset 0d9d53e for irc.c


Ignore:
Timestamp:
2010-06-07T00:58:07Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4aa0f6b
Parents:
36562b0
Message:

Fixed "set password" and "set auto_reconnect_delay".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r36562b0 r0d9d53e  
    3131static gboolean irc_userping( gpointer _irc, gint fd, b_input_condition cond );
    3232static char *set_eval_charset( set_t *set, char *value );
     33static char *set_eval_password( set_t *set, char *value );
    3334
    3435irc_t *irc_new( int fd )
     
    110111        s = set_add( &b->set, "paste_buffer_delay", "200", set_eval_int, irc );
    111112        s->old_key = g_strdup( "buddy_sendbuffer_delay" );
     113        s = set_add( &b->set, "password", NULL, set_eval_password, irc );
     114        s->flags |= SET_NULL_OK;
    112115        s = set_add( &b->set, "private", "true", set_eval_bool, irc );
    113116        s = set_add( &b->set, "query_order", "lifo", NULL, irc );
     
    272275        } else {
    273276                irc->password = NULL;
     277        }
     278}
     279
     280static char *set_eval_password( set_t *set, char *value )
     281{
     282        irc_t *irc = set->data;
     283       
     284        if( irc->status & USTATUS_IDENTIFIED && value )
     285        {
     286                irc_setpass( irc, value );
     287                return NULL;
     288        }
     289        else
     290        {
     291                return SET_INVALID;
    274292        }
    275293}
Note: See TracChangeset for help on using the changeset viewer.