-
Notifications
You must be signed in to change notification settings - Fork 9
max message size and header guards #35
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
base: master
Are you sure you want to change the base?
Conversation
| kg_pipe Key generation for %s: error creating pipe: %s | ||
| kg_fork Key generation for %s: fork() error: %s | ||
| kg_mkdir created directory %s | ||
| kg_pipe Key generation for %s: error creating pipe: %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd whitespace changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it just wasn't lining up right on my editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect @TingPing would prefer white space changes to be in a separate pull request, and not mixed with functional changes.
| /* Most IRC servers limit messages to 512 bytes in length, | ||
| * including trailing whitespace and the CR-LF terminating characters | ||
| * i.e len( bytes(msg) | <0x20> x ... | <0x0D0A> ) <= 512 bytes */ | ||
| #define OTR_MAX_MSG_SIZE 510 //RFC 2812 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not certain this makes sense. The message size often needs to account for the user!user@hostname PRIVMSG dest ... bits at the start. I think hexchat internally accounts that for like 90ish characters by default (before it knows this information). You can kinda figure it out exactly if you know the information ahead of time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not totally sure myself. I relied on this and RFC2812 in coming up with that number. IRC seems to have a limit of 512, but hexchat could certainly further reduce this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RFC is referring to the entire line. But generally at the layer of users like this message just means the content.
So an IRC line is 512 bytes but with protocol overhead user messages can only realistically use 400-500 depending on the users full host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can confirm. I just tried sending a line of 561 chars (including spaces) on Libera.chat, and hexchat split it off at 446 chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you open Window > Raw Log you can see why it had to be split with the prefixes.
|
Try to keep logic changes and formatting changes in different commits/PRs. |
|
Will do. My apologies. I'm still very new to this and not very familiar with the correct etiquette for contributing. |
This commit modifies the
MAX_OTR_MSG_SIZEmacro to reflect the 512-byte limit imposed by the IRC standard RFC 2812, adds header guards, and cleans up/updates some file commentary.