1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

/UNIGNORE - skip spaces at end of line.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1703 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-08-04 01:36:39 +00:00 committed by cras
parent 80793ace1c
commit dcf1bdb82c

View File

@ -169,24 +169,29 @@ static void cmd_unignore(const char *data)
{
IGNORE_REC *rec;
GSList *tmp;
char *mask;
void *free_arg;
if (*data == '\0')
if (!cmd_get_params(data, &free_arg, 1, &mask))
return;
if (*mask == '\0')
cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
if (is_numeric(data, ' ')) {
if (is_numeric(mask, ' ')) {
/* with index number */
tmp = g_slist_nth(ignores, atoi(data)-1);
tmp = g_slist_nth(ignores, atoi(mask)-1);
rec = tmp == NULL ? NULL : tmp->data;
} else {
/* with mask */
const char *chans[2] = { "*", NULL };
if (active_win->active_server != NULL &&
active_win->active_server->ischannel(data)) {
chans[0] = data;
data = NULL;
active_win->active_server->ischannel(mask)) {
chans[0] = mask;
mask = NULL;
}
rec = ignore_find("*", data, (char **) chans);
rec = ignore_find("*", mask, (char **) chans);
}
if (rec != NULL) {
@ -194,8 +199,9 @@ static void cmd_unignore(const char *data)
ignore_update_rec(rec);
} else {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_IGNORE_NOT_FOUND, data);
TXT_IGNORE_NOT_FOUND, mask);
}
cmd_params_free(free_arg);
}
static void sig_ignore_created(IGNORE_REC *rec)