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
This commit is contained in:
Timo Sirainen 2000-06-18 01:18:12 +00:00 committed by cras
commit a5d31a195d
34 changed files with 949 additions and 576 deletions

View file

@ -167,17 +167,19 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *
static void cmd_msg(const char *data, IRC_SERVER_REC *server)
{
char *params, *target, *msg;
char *target, *msg;
void *free_arg;
g_return_if_fail(data != NULL);
params = cmd_get_params(data, 2 | PARAM_FLAG_GETREST, &target, &msg);
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &target, &msg))
return;
if (*target != '\0' && *msg != '\0') {
if (!ischannel(*target) && *target != '=' && server != NULL)
add_private_msg(server, target);
}
g_free(params);
cmd_params_free(free_arg);
}
static void sig_nick_removed(CHANNEL_REC *channel, NICK_REC *nick)