diff options
author | David Leadbeater <dgl@dgl.cx> | 2014-06-30 00:10:24 +0100 |
---|---|---|
committer | David Leadbeater <dgl@dgl.cx> | 2014-06-30 00:32:17 +0100 |
commit | e8b0eb4986ee24b83ef185354a931b120b29ad96 (patch) | |
tree | b3ee2d3cf0558c6caf3ffb608ce128ee4c548ad1 /src | |
parent | 6bbb114046f54a85bed6674011411d4d869ef2fb (diff) | |
download | irssi-e8b0eb4986ee24b83ef185354a931b120b29ad96.zip |
Add NO_ACT checks for actions and notices
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/irc/fe-irc-messages.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-irc-messages.c b/src/fe-common/irc/fe-irc-messages.c index fb8d1e94..a8d52745 100644 --- a/src/fe-common/irc/fe-irc-messages.c +++ b/src/fe-common/irc/fe-irc-messages.c @@ -170,6 +170,10 @@ static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg, if (ignore_check(SERVER(server), nick, address, target, msg, level)) return; + if (ignore_check(SERVER(server), nick, address, target, msg, + level | MSGLEVEL_NO_ACT)) + level |= MSGLEVEL_NO_ACT; + if (ischannel(*target)) item = irc_channel_find(server, target); else @@ -214,6 +218,7 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg, const char *target) { const char *oldtarget; + int level = MSGLEVEL_NOTICES; oldtarget = target; target = skip_target(IRC_SERVER(server), target); @@ -230,18 +235,23 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg, if (ignore_check(server, nick, address, ischannel(*target) ? target : NULL, - msg, MSGLEVEL_NOTICES)) + msg, level)) return; + if (ignore_check(server, nick, address, + ischannel(*target) ? target : NULL, + msg, level | MSGLEVEL_NO_ACT)) + level |= MSGLEVEL_NO_ACT; + if (ischannel(*target)) { /* notice in some channel */ - printformat(server, target, MSGLEVEL_NOTICES, + printformat(server, target, level, IRCTXT_NOTICE_PUBLIC, nick, oldtarget, msg); } else { /* private notice */ privmsg_get_query(SERVER(server), nick, FALSE, MSGLEVEL_NOTICES); - printformat(server, nick, MSGLEVEL_NOTICES, + printformat(server, nick, level, IRCTXT_NOTICE_PRIVATE, nick, address, msg); } } |