Changeset 5613af7


Ignore:
Timestamp:
2010-08-21T17:59:03Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
180ab31
Parents:
4d4a7ed
Message:

Clearer error message when trying to read/write setting that don't exist
(or are not where the user's looking).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r4d4a7ed r5613af7  
    267267        if( ( val = set_getstr( head, key ) ) )
    268268                irc_usermsg( irc, "%s = `%s'", key, val );
     269        else if( !set_find( head, key ) )
     270        {
     271                irc_usermsg( irc, "Setting `%s' does not exist.", key );
     272                if( *head == irc->b->set )
     273                        irc_usermsg( irc, "It might be an account or channel setting. "
     274                                     "See \x02help account set\x02 and \x02help channel set\x02." );
     275        }
    269276        else
    270277                irc_usermsg( irc, "%s is empty", key );
     
    304311                        st = set_setstr( head, set_name, value );
    305312               
    306                 if( set_getstr( head, set_name ) == NULL )
     313                if( set_getstr( head, set_name ) == NULL &&
     314                    set_find( head, set_name ) )
    307315                {
    308316                        /* This happens when changing the passwd, for example.
Note: See TracChangeset for help on using the changeset viewer.