-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fails to recognize (properly ignore?) colors #129
Comments
Should be doable. The logging function is pretty dumb at the moment and does not handle escape sequences gracefully. Give me some time though (probably until after the new year) and I will prepare a new release (also with some overdue refactoring). |
@097115 had some bandwidth to work on this issue. Let me know if the |
Sorry but it seems like no :) I did
And the logging now has [almost] the same line twice :) Like this:
:) |
@097115 My apologies… I forgot to remove the original printed string with the fix. But you can see that the second “duplicate” string removes the non-ASCII characters from being printed (e.g. Regarding the |
Yeah, the log is now cleaner, indeed :) However, this binary stuff was never the actual problem :) As I mentioned earlier, the problem was color codes (numbers) that follow the control sequences. E.g., in the string So, now the control characters, like Thus, you probably shouldn't just outright ignore those sequences but in order not to keep / not to show this number garbage you likely should also analyze them to some degree -- and to ignore not only the binary stuff but also the following codes, too :). |
@097115 The latest commit removes the garbage characters in addition to the non-ASCII characters. I need to spend more time considering other impacted use cases for multi-byte characters, but this should work for the time being. |
Not to sound like a prick but no, it still has problems:
Unfortunately, I'm not using |
Oof. I see it in my own logs now re-reviewing them. Looks like I forgot to push my last commit before the holidays. |
I made a patch that ignores color codes.
@mcpcpc I saw in the code that '\004' is also special cased, along with '\003'. I say 'spec', because this looks to me like less of an actual spec, and more like 'some clients implemented this, and it spread'. This is what I read when implementing this: Is there something I'm missing here? |
I was asked to also strip spaces that sometimes appear after color codes via email.
I also found out what the deal was with '\004': This looks like some ircv3 stuff, which kirc doesn't implement. This begs the question, how much is too much. @mcpcpc I would like your input on this? |
And it turns out that the above is too much. Now the question remains: Should I just strip the codes? If I see no spec for '\267', I'd go with the first. |
I also added a switch for this. |
Given I can't dig up anything on 267 either, I am leaning toward stripping them. |
When colors are added to messages,
kirc
ignores the control sequences (which is probably a good thing) but still displays the actual codes.A simple example would be
newsly
bot from the##news
channel at libera.chat. With the log entry like this (^B
and^C
being the actual binary entries, the raw log is available here):kirc
displays it like this -- note6
after the opening square bracket:Would it possible to catch those somehow? And probably hide / ignore altogether?
The text was updated successfully, but these errors were encountered: