aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-12-10 22:33:08 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-12-10 22:33:08 +0000
commit71dc8543dc4eeafabbe28bae52ec1d05ce9f5fea (patch)
tree858e247f04f9d8033ea96b073f598518be2f3ebb /root_commands.c
parent3f2bc2d721c1ac3d6c11a88a350041c2166f71e7 (diff)
Fixed "set xxx" syntax (it showed all settings instead of just xxx).
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/root_commands.c b/root_commands.c
index 642f5374..2a5938e7 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -402,9 +402,7 @@ static void cmd_account( irc_t *irc, char **cmd )
return;
}
- if( ( strcmp( cmd[3], "=" ) ) == 0 && cmd[4] )
- irc_usermsg( irc, "Warning: Correct syntax: \002account set <variable> <value>\002 (without =)" );
- else if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
+ if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
set_reset( &a->set, set_name );
else
set_setstr( &a->set, set_name, cmd[3] );
@@ -744,16 +742,11 @@ static void cmd_yesno( irc_t *irc, char **cmd )
static void cmd_set( irc_t *irc, char **cmd )
{
- char *set_name = NULL;
+ char *set_name = cmd[1];
if( cmd[1] && cmd[2] )
{
- if( ( strcmp( cmd[2], "=" ) ) == 0 && cmd[3] )
- {
- irc_usermsg( irc, "Warning: Correct syntax: \002set <variable> <value>\002 (without =)" );
- return;
- }
- else if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
+ if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
{
set_reset( &irc->set, cmd[2] );
set_name = cmd[2];
@@ -761,7 +754,6 @@ static void cmd_set( irc_t *irc, char **cmd )
else
{
set_setstr( &irc->set, cmd[1], cmd[2] );
- set_name = cmd[1];
}
}
if( set_name ) /* else 'forgotten' on purpose.. Must show new value after changing */