mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
simplify code
This commit is contained in:
parent
ac3af3fb56
commit
1547248e94
@ -118,7 +118,7 @@ static void cmd_ignore(const char *data)
|
|||||||
char *patternarg, *chanarg, *mask, *levels, *timestr, *servertag;
|
char *patternarg, *chanarg, *mask, *levels, *timestr, *servertag;
|
||||||
char **channels;
|
char **channels;
|
||||||
void *free_arg;
|
void *free_arg;
|
||||||
int new_ignore, msecs, level;
|
int new_ignore, msecs, level, flags;
|
||||||
|
|
||||||
if (*data == '\0') {
|
if (*data == '\0') {
|
||||||
cmd_ignore_show();
|
cmd_ignore_show();
|
||||||
@ -156,9 +156,13 @@ static void cmd_ignore(const char *data)
|
|||||||
channels = (chanarg == NULL || *chanarg == '\0') ? NULL :
|
channels = (chanarg == NULL || *chanarg == '\0') ? NULL :
|
||||||
g_strsplit(chanarg, ",", -1);
|
g_strsplit(chanarg, ",", -1);
|
||||||
|
|
||||||
rec = ignore_find_full(servertag, mask, patternarg, channels,
|
flags = IGNORE_FIND_PATTERN;
|
||||||
IGNORE_FIND_PATTERN | ((level & MSGLEVEL_NO_ACT) ? IGNORE_FIND_NOACT : 0) |
|
if (level & MSGLEVEL_NO_ACT)
|
||||||
((level & MSGLEVEL_HIDDEN) ? IGNORE_FIND_HIDDEN : 0));
|
flags |= IGNORE_FIND_NOACT;
|
||||||
|
if (level & MSGLEVEL_HIDDEN)
|
||||||
|
flags |= IGNORE_FIND_HIDDEN;
|
||||||
|
|
||||||
|
rec = ignore_find_full(servertag, mask, patternarg, channels, flags);
|
||||||
new_ignore = rec == NULL;
|
new_ignore = rec == NULL;
|
||||||
|
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user