irclog2html icon indicating copy to clipboard operation
irclog2html copied to clipboard

option to skip join/quit messages

Open josch opened this issue 11 months ago • 2 comments

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

josch avatar Jan 22 '25 20:01 josch

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.

mgedmin avatar Jan 23 '25 11:01 mgedmin

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.

josch avatar Jan 26 '25 16:01 josch