diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-02 08:48:56 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-02 08:48:56 +0100 |
commit | d4810dff26f128061d122cf120e1e0174d9df1f2 (patch) | |
tree | 1882b045646d57ca1e705925b7f5d3267866bd26 /root_commands.c | |
parent | f86a3d558e1e69a3728c8f8fd014cbcd6271f98e (diff) |
Fixed check for set -del arguments.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/root_commands.c b/root_commands.c index f65bdc65..67847650 100644 --- a/root_commands.c +++ b/root_commands.c @@ -264,7 +264,10 @@ static int cmd_set_real( irc_t *irc, char **cmd, cmd_set_findhead findhead ) set_t **head; if( cmd[1] && g_strncasecmp( cmd[1], "-del", 4 ) == 0 ) + { + MIN_ARGS( 2, 0 ); set_full = cmd[2]; + } else set_full = cmd[1]; @@ -278,8 +281,6 @@ static int cmd_set_real( irc_t *irc, char **cmd, cmd_set_findhead findhead ) { char *id; - MIN_ARGS( 3, 0 ); - if( ( tmp = strchr( set_full, '/' ) ) ) { id = g_strndup( set_full, ( tmp - set_full ) ); |