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

option to skip join/quit messages #37

Open
josch opened this issue Jan 22, 2025 · 2 comments · May be fixed by #38
Open

option to skip join/quit messages #37

josch opened this issue Jan 22, 2025 · 2 comments · May be fixed by #38

Comments

@josch
Copy link

josch commented Jan 22, 2025

Hi,

for privacy reasons we'd like to not log join/quit messages which include domain names or IP addresses.

Can irclog2html be configured to not convert those messages (I think they would be type OTHER if i understand the code correctly)?

If not, and if i were to supply a patch, where do you think should I best put the code?

Thanks!

cheers, josch

@mgedmin
Copy link
Owner

mgedmin commented Jan 23, 2025

An option for this makes sense. I would add a check in convert_irc_log(), to do something like

    if hide_joins_parts and what in (LogParser.JOIN, LogParser.PART):
        continue

before calling formatter.servermsg(). The worst part about this is increasing the number of arguments that need to be passed to convert_irc_log(). And also figuring out all the entry points (calling irclog2html.main is one, but logs2html also needs to support this, and also the WSGI server bits need to support this somehow).

The code wants some refactoring (but I have no energy to do this at this time.

josch added a commit to josch/irclog2html that referenced this issue Jan 26, 2025
…event types from getting emitted

This can for example be used to not log join/quit messages which include
domain names or IP addresses for privacy reasons with --hide-event=OTHER

Closes: mgedmin#37
@josch
Copy link
Author

josch commented Jan 26, 2025

And also figuring out all the entry points (calling irclog2html.main is one, but logs2html also needs to support this, and also the WSGI server bits need to support this somehow).

I implemented this as a keyword argument, so theoretically, other callers should not be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants