mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05: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:
parent
80793ace1c
commit
dcf1bdb82c
@ -169,24 +169,29 @@ static void cmd_unignore(const char *data)
|
|||||||
{
|
{
|
||||||
IGNORE_REC *rec;
|
IGNORE_REC *rec;
|
||||||
GSList *tmp;
|
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);
|
cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||||
|
|
||||||
if (is_numeric(data, ' ')) {
|
if (is_numeric(mask, ' ')) {
|
||||||
/* with index number */
|
/* 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;
|
rec = tmp == NULL ? NULL : tmp->data;
|
||||||
} else {
|
} else {
|
||||||
/* with mask */
|
/* with mask */
|
||||||
const char *chans[2] = { "*", NULL };
|
const char *chans[2] = { "*", NULL };
|
||||||
|
|
||||||
if (active_win->active_server != NULL &&
|
if (active_win->active_server != NULL &&
|
||||||
active_win->active_server->ischannel(data)) {
|
active_win->active_server->ischannel(mask)) {
|
||||||
chans[0] = data;
|
chans[0] = mask;
|
||||||
data = NULL;
|
mask = NULL;
|
||||||
}
|
}
|
||||||
rec = ignore_find("*", data, (char **) chans);
|
rec = ignore_find("*", mask, (char **) chans);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rec != NULL) {
|
if (rec != NULL) {
|
||||||
@ -194,8 +199,9 @@ static void cmd_unignore(const char *data)
|
|||||||
ignore_update_rec(rec);
|
ignore_update_rec(rec);
|
||||||
} else {
|
} else {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
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)
|
static void sig_ignore_created(IGNORE_REC *rec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user