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 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 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 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

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

@ailin-nemui
Copy link
Contributor

@irssi/developers

@ailin-nemui ailin-nemui added the auto-merge This PR is scheduled for merge if no further comments are opened label Jun 7, 2018
@dequis
Copy link
Member

dequis commented Jun 7, 2018

What does this do?

@ailin-nemui
Copy link
Contributor

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 commented Jun 7, 2018 via email

@ailin-nemui ailin-nemui merged commit b382bd1 into irssi:master Jun 15, 2018
@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
Labels
auto-merge This PR is scheduled for merge if no further comments are opened
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants