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

@ -187,7 +187,8 @@ NICK_REC *netsplit_find_channel(IRC_SERVER_REC *server, const char *nick, const
int quitmsg_is_split(const char *msg)
{
char *params, *host1, *host2, *p;
char *host1, *host2, *p;
void *free_arg;
int ok;
g_return_val_if_fail(msg != NULL, FALSE);
@ -202,8 +203,10 @@ int quitmsg_is_split(const char *msg)
return FALSE;
/* get the two hosts */
if (!cmd_get_params(msg, &free_arg, 2 | PARAM_FLAG_NOQUOTES, &host1, &host2))
return FALSE;
ok = FALSE;
params = cmd_get_params(msg, 2 | PARAM_FLAG_NOQUOTES, &host1, &host2);
if (g_strcasecmp(host1, host2) != 0) { /* hosts can't be same.. */
/* check that domain length is 2 or 3 */
p = strrchr(host1, '.');
@ -215,7 +218,7 @@ int quitmsg_is_split(const char *msg)
}
}
}
g_free(params);
cmd_params_free(free_arg);
return ok;
}