Changeset 71dc854


Ignore:
Timestamp:
2007-12-10T22:33:08Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0f47613
Parents:
3f2bc2d
Message:

Fixed "set xxx" syntax (it showed all settings instead of just xxx).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r3f2bc2d r71dc854  
    403403                        }
    404404                       
    405                         if( ( strcmp( cmd[3], "=" ) ) == 0 && cmd[4] )
    406                                 irc_usermsg( irc, "Warning: Correct syntax: \002account set <variable> <value>\002 (without =)" );
    407                         else if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
     405                        if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
    408406                                set_reset( &a->set, set_name );
    409407                        else
     
    745743static void cmd_set( irc_t *irc, char **cmd )
    746744{
    747         char *set_name = NULL;
     745        char *set_name = cmd[1];
    748746       
    749747        if( cmd[1] && cmd[2] )
    750748        {
    751                 if( ( strcmp( cmd[2], "=" ) ) == 0 && cmd[3] )
    752                 {
    753                         irc_usermsg( irc, "Warning: Correct syntax: \002set <variable> <value>\002 (without =)" );
    754                         return;
    755                 }
    756                 else if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
     749                if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
    757750                {
    758751                        set_reset( &irc->set, cmd[2] );
     
    762755                {
    763756                        set_setstr( &irc->set, cmd[1], cmd[2] );
    764                         set_name = cmd[1];
    765757                }
    766758        }
Note: See TracChangeset for help on using the changeset viewer.