Changeset f3579fd for irc.c


Ignore:
Timestamp:
2008-08-24T20:52:31Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f536a99
Parents:
7125cb3
Message:

Clearer feedback after set/account set commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r7125cb3 rf3579fd  
    3434GSList *irc_connection_list = NULL;
    3535
    36 static char *passchange( set_t *set, char *value )
     36static char *set_eval_password( set_t *set, char *value )
    3737{
    3838        irc_t *irc = set->data;
    3939       
    40         irc_setpass( irc, value );
    41         irc_usermsg( irc, "Password successfully changed" );
    42         return NULL;
     40        if( irc->status & USTATUS_IDENTIFIED )
     41        {
     42                irc_setpass( irc, value );
     43                return NULL;
     44        }
     45        else
     46        {
     47                return SET_INVALID;
     48        }
    4349}
    4450
     
    150156        s = set_add( &irc->set, "lcnicks", "true", set_eval_bool, irc );
    151157        s = set_add( &irc->set, "ops", "both", set_eval_ops, irc );
    152         s = set_add( &irc->set, "password", NULL, passchange, irc );
     158        s = set_add( &irc->set, "password", NULL, set_eval_password, irc );
    153159        s->flags |= SET_NULL_OK;
    154160        s = set_add( &irc->set, "private", "true", set_eval_bool, irc );
Note: See TracChangeset for help on using the changeset viewer.