mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
add /IGNORE ... NOHILIGHT to ignore some hilights
This commit is contained in:
parent
628ca79e6a
commit
46493c051b
6 changed files with 39 additions and 16 deletions
|
|
@ -169,6 +169,8 @@ static void cmd_ignore(const char *data)
|
|||
flags |= IGNORE_FIND_NOACT;
|
||||
if (level & MSGLEVEL_HIDDEN)
|
||||
flags |= IGNORE_FIND_HIDDEN;
|
||||
if (level & MSGLEVEL_NOHILIGHT)
|
||||
flags |= IGNORE_FIND_NOHILIGHT;
|
||||
|
||||
rec = ignore_find_full(servertag, mask, patternarg, channels, flags);
|
||||
new_ignore = rec == NULL;
|
||||
|
|
@ -198,6 +200,12 @@ static void cmd_ignore(const char *data)
|
|||
rec->level |= MSGLEVEL_ALL;
|
||||
}
|
||||
|
||||
if (rec->level == MSGLEVEL_NOHILIGHT) {
|
||||
/* If only NOHILIGHT was specified add all levels; it makes no
|
||||
* sense on its own. */
|
||||
rec->level |= MSGLEVEL_ALL;
|
||||
}
|
||||
|
||||
if (new_ignore && rec->level == 0) {
|
||||
/* tried to unignore levels from nonexisting ignore */
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,11 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||
level |= MSGLEVEL_HILIGHT;
|
||||
|
||||
ignore_check_plus(server, nick, address, target, msg, &level, FALSE);
|
||||
if (level & MSGLEVEL_NOHILIGHT) {
|
||||
for_me = FALSE;
|
||||
g_free_and_null(color);
|
||||
level &= ~MSGLEVEL_HILIGHT;
|
||||
}
|
||||
|
||||
if (settings_get_bool("emphasis"))
|
||||
msg = freemsg = expand_emphasis((WI_ITEM_REC *) chanrec, msg);
|
||||
|
|
|
|||
|
|
@ -114,6 +114,12 @@ static void sig_message_irc_op_public(SERVER_REC *server, const char *msg,
|
|||
return;
|
||||
}
|
||||
|
||||
if (level & MSGLEVEL_NOHILIGHT) {
|
||||
for_me = FALSE;
|
||||
g_free_and_null(color);
|
||||
level &= ~MSGLEVEL_HILIGHT;
|
||||
}
|
||||
|
||||
if (settings_get_bool("emphasis"))
|
||||
msg = freemsg = expand_emphasis((WI_ITEM_REC *) chanrec, msg);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue