diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-18 01:18:12 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-18 01:18:12 +0000 |
commit | a5d31a195d1e3b682cd57d88a5db7ef0ffa5d492 (patch) | |
tree | e5c335b77da2d17293e87debeb17ab4c966e34c4 /src/irc/core/channels.c | |
parent | ca4226cca692ee96109a46b3a1d381ac0d37cb6f (diff) | |
download | irssi-a5d31a195d1e3b682cd57d88a5db7ef0ffa5d492.zip |
Changed option handling in /commands. Irssi will now complain about
unknown options and missing option arguments.
Renamed /SERVER -add, -remove and -list to /SERVER ADD, REMOVE and LIST.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@365 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/channels.c')
-rw-r--r-- | src/irc/core/channels.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/core/channels.c b/src/irc/core/channels.c index 6943952e..1048b202 100644 --- a/src/irc/core/channels.c +++ b/src/irc/core/channels.c @@ -162,15 +162,17 @@ void channels_join(IRC_SERVER_REC *server, const char *data, int automatic) SETUP_CHANNEL_REC *schannel; CHANNEL_REC *chanrec; GString *outchans, *outkeys; - char *params, *channels, *keys, *key; + char *channels, *keys, *key; char **chanlist, **keylist, **tmp, **tmpkey, *channel; + void *free_arg; int use_keys; g_return_if_fail(data != NULL); if (server == NULL || !server->connected || !irc_server_check(server)) cmd_return_error(CMDERR_NOT_CONNECTED); - params = cmd_get_params(data, 2 | PARAM_FLAG_GETREST, &channels, &keys); + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &channels, &keys)) + return; if (*channels == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); chanlist = g_strsplit(channels, ",", -1); @@ -221,7 +223,7 @@ void channels_join(IRC_SERVER_REC *server, const char *data, int automatic) g_strfreev(chanlist); g_strfreev(keylist); - g_free(params); + cmd_params_free(free_arg); } void channels_init(void) |