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

Optimal line splitting #250

Open
JustAnotherArchivist opened this issue Mar 20, 2020 · 2 comments
Open

Optimal line splitting #250

JustAnotherArchivist opened this issue Mar 20, 2020 · 2 comments

Comments

@JustAnotherArchivist
Copy link

As I understand it, irc-framework currently splits messages based on a fixed maximum length of the actual message. The default value for that is only 350, resulting in too frequent splits: with an average channel name of 15 ASCII characters, a PRIVMSG is 375 bytes with the current default settings (7 B command + 1 B space + 15 B channel name + 1 B space + 1 B colon + 350 B message), even though it could safely contain 38.6 % more message text, namely 510 B - 7 B command - 1 B space - 15 B channel name - 1 B space - 1 B colon = 485 B.

I suggest it should split the messages optimally such that each IRC protocol message, i.e. including command and target, is as close to the permitted 510 bytes (not 500 as claimed by a code comment) as possible – without splitting words/graphemes/codepoints of course.

@digitalcircuit
Copy link

Though I'm unsure of how easily it can be ported to JavaScript given it makes use of Qt's text handling, it might be worthwhile looking at Quassel IRC's line splitting code, too, as does most if not all of the calculations suggested above.

Main locations of interest:

@adedomin
Copy link

adedomin commented Jul 13, 2020

This change has broken my use case as well. coming from 2.9.1, I tried upgrading to 4.9.0.

results are as followed:

2.9.1:
Screenshot from 2020-07-13 16-23-13

4.9.0:
Screenshot from 2020-07-13 16-23-55

If it were configurable, I wouldn't be all that upset with it. Would be open to do the PR.
edit: I guess it is configurable, but not documented.

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

No branches or pull requests

3 participants