From d4810dff26f128061d122cf120e1e0174d9df1f2 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 2 Sep 2008 08:48:56 +0100 Subject: Fixed check for set -del arguments. --- root_commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'root_commands.c') 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 ) ); -- cgit v1.2.3