mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
correctly separate ignore flags (no_act, hidden) from level
This commit is contained in:
parent
7f14d4d744
commit
b9a274a81d
7 changed files with 92 additions and 57 deletions
|
|
@ -201,10 +201,10 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||
if (for_me)
|
||||
level |= MSGLEVEL_HILIGHT;
|
||||
|
||||
if (ignore_check(server, nick, address, target, msg, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, target, msg, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, target, msg, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, target, msg, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
if (settings_get_bool("emphasis"))
|
||||
|
|
@ -263,10 +263,10 @@ static void sig_message_private(SERVER_REC *server, const char *msg,
|
|||
if (settings_get_bool("emphasis"))
|
||||
msg = freemsg = expand_emphasis((WI_ITEM_REC *) query, msg);
|
||||
|
||||
if (ignore_check(server, nick, address, NULL, msg, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, NULL, msg, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, NULL, msg, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, NULL, msg, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
if (own) {
|
||||
|
|
@ -361,10 +361,10 @@ static void sig_message_join(SERVER_REC *server, const char *channel,
|
|||
{
|
||||
int level = MSGLEVEL_JOINS;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, NULL, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, channel, NULL, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, NULL, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, channel, NULL, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
printformat(server, channel, level,
|
||||
|
|
@ -377,10 +377,10 @@ static void sig_message_part(SERVER_REC *server, const char *channel,
|
|||
{
|
||||
int level = MSGLEVEL_PARTS;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, NULL, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, channel, NULL, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, NULL, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, channel, NULL, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
printformat(server, channel, level,
|
||||
|
|
@ -399,10 +399,10 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
|||
if (ignore_check(server, nick, address, NULL, reason, MSGLEVEL_QUITS))
|
||||
return;
|
||||
|
||||
if (ignore_check(server, nick, address, NULL, reason, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, NULL, reason, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, NULL, reason, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, NULL, reason, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
print_channel = NULL;
|
||||
|
|
@ -424,10 +424,10 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (ignore_check(server, nick, address, rec->visible_name, reason, MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, rec->visible_name, reason, MSGLEVEL_QUITS, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, rec->visible_name, reason, MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, rec->visible_name, reason, MSGLEVEL_QUITS, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
if (print_channel == NULL ||
|
||||
|
|
@ -476,10 +476,10 @@ static void sig_message_kick(SERVER_REC *server, const char *channel,
|
|||
{
|
||||
int level = MSGLEVEL_KICKS;
|
||||
|
||||
if (ignore_check(server, kicker, address, channel, reason, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, kicker, address, channel, reason, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, kicker, address, channel, reason, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, kicker, address, channel, reason, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
printformat(server, channel, level,
|
||||
|
|
@ -500,10 +500,10 @@ static void print_nick_change_channel(SERVER_REC *server, const char *channel,
|
|||
level = MSGLEVEL_NICKS;
|
||||
if (ownnick) level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (!(level & MSGLEVEL_NO_ACT) && ignore_check(server, oldnick, address, channel, newnick, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, oldnick, address, channel, newnick, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (!(level & MSGLEVEL_HIDDEN) && ignore_check(server, oldnick, address, channel, newnick, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, oldnick, address, channel, newnick, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
printformat(server, channel, level,
|
||||
|
|
@ -582,10 +582,10 @@ static void sig_message_topic(SERVER_REC *server, const char *channel,
|
|||
{
|
||||
int level = MSGLEVEL_TOPICS;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, topic, level | MSGLEVEL_NO_ACT))
|
||||
if (ignore_check_flags(server, nick, address, channel, topic, level, MSGLEVEL_NO_ACT))
|
||||
level |= MSGLEVEL_NO_ACT;
|
||||
|
||||
if (ignore_check(server, nick, address, channel, topic, level | MSGLEVEL_HIDDEN))
|
||||
if (ignore_check_flags(server, nick, address, channel, topic, level, MSGLEVEL_HIDDEN))
|
||||
level |= MSGLEVEL_HIDDEN;
|
||||
|
||||
printformat(server, channel, level,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue