Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added HIDDEN level to ignores #884

Merged
merged 5 commits into from Jun 15, 2018
Merged

Added HIDDEN level to ignores #884

merged 5 commits into from Jun 15, 2018

Conversation

@vague666
Copy link
Member

@vague666 vague666 commented Jun 6, 2018

No description provided.

@vague666
Copy link
Member Author

@vague666 vague666 commented Jun 6, 2018

The testing I did worked well but I might've missed something

@@ -29,6 +29,7 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host,
enum {
IGNORE_FIND_PATTERN = 0x01, /* Match the pattern */
IGNORE_FIND_NOACT = 0x02, /* Exclude the targets with NOACT level */
IGNORE_FIND_HIDDEN = 0x03, /* Exclude the targets with HIDDEN level */

This comment has been minimized.

@ailin-nemui

ailin-nemui Jun 6, 2018
Contributor

this should be 0x04 (bits go like 1 2 4 8 0x10 0x20 0x40...)

@@ -157,7 +157,8 @@ static void cmd_ignore(const char *data)
g_strsplit(chanarg, ",", -1);

rec = ignore_find_full(servertag, mask, patternarg, channels,
IGNORE_FIND_PATTERN | ((level & MSGLEVEL_NO_ACT) ? IGNORE_FIND_NOACT : 0));
IGNORE_FIND_PATTERN | ((level & MSGLEVEL_NO_ACT) ? IGNORE_FIND_NOACT : 0) |

This comment has been minimized.

@ailin-nemui

ailin-nemui Jun 6, 2018
Contributor

this is getting too ugly, we should add a temp variable flags= IGNORE_FIND_PATTERN and ...if (level &...) flags |= ...;

@vague666
Copy link
Member Author

@vague666 vague666 commented Jun 6, 2018

I would prefer making the #define ignore_match_level into a function too, but it didn't become too ugly when I added hidden to it

@ailin-nemui
Copy link
Contributor

@ailin-nemui ailin-nemui commented Jun 7, 2018

I think what would help there is a #define FLAG_MSGLEVELS ( MSGLEVEL_NO_ACT | MSGLEVEL_HIDDEN )

@ailin-nemui
Copy link
Contributor

@ailin-nemui ailin-nemui commented Jun 7, 2018

@dequis
Copy link
Member

@dequis dequis commented Jun 7, 2018

What does this do?

@ailin-nemui
Copy link
Contributor

@ailin-nemui ailin-nemui commented Jun 7, 2018

I think it allows you to /ignore ..... hidden and then it will hide the messages instead of ignoring them completely

@vague666
Copy link
Member Author

@vague666 vague666 commented Jun 7, 2018

@ailin-nemui ailin-nemui merged commit b382bd1 into irssi:master Jun 15, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ailin-nemui ailin-nemui added this to the 1.2.0 milestone Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants