mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
The Options (Alt+O) > IRC > Messages > [x] Split long channel/query messages option is arguably too conservative, splitting lines at 300 bytes (or only 100~150 UTF-8 characters) considering the larger and wider displays of today.

I would suggest increasing this value to 400, with an edit box for a custom value. I personally want a value of 460 for myself, so I have turned off this option. It especially interferes with creative forms of expression, like highly colorized ASCII / mIRC Art. (Old school text art is all the rage again.)

I believe the theoretical maximum PRIVMSG command is 162 bytes, out of 512 bytes, which leaves at minimum 350 bytes for messages... even if you have a 25 character nickname, a 10 character ident, a 63 character hostname, and are joined to a 50 character channel name.

:123456789_123456789_12345!123456789_@123456789_123456789_123456789_123456789_123456789_123456789_123 PRIVMSG #123456789_123456789_123456789_123456789_123456789 :<350 character message here>

It should also be possible for mIRC to automatically adjust this value by predicting the line length by adding all of these values together as mentioned above.

var %msgwraplen = $calc(512 - $len(: $+ $ial($me) PRIVMSG $chan :))


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
I just tested this, checked the /debug output, and the outgoing lines were split at just over 400 characters, and the incoming lines were just over 440 characters.

Typed into editbox on channel:

Quote:
The astronaut John Young, who walked on the moon and commanded the first space shuttle flight, has died. He was 87. Running repairs on the moon - archive, 1972 In a statement, the former president George HW Bush said Young was a fearless patriot whose courage and commitment to duty helped our nation push back the horizon of discovery at a critical time. Nasa said Young died at home in Houston on Friday night following complications from pneumonia.

Shown in outgoing debug window:

Quote:
-> underworld2.no.quakenet.org PRIVMSG #thisisatestoftheemergencybroadcastsystem :The astronaut John Young, who walked on the moon and commanded the first space shuttle flight, has died. He was 87. Running repairs on the moon - archive, 1972 In a statement, the former president George HW Bush said Young was a fearless patriot whose courage and commitment to duty helped our nation push back the horizon of discovery at a critical time. Nasa
-> underworld2.no.quakenet.org PRIVMSG #thisisatestoftheemergencybroadcastsystem :said Young died at home in Houston on Friday night following complications from pneumonia.

Shown in incoming debug window:

Quote:
<- :nick291!~user@85.255.233.153 PRIVMSG #thisisatestoftheemergencybroadcastsystem :The astronaut John Young, who walked on the moon and commanded the first space shuttle flight, has died. He was 87. Running repairs on the moon - archive, 1972 In a statement, the former president George HW Bush said Young was a fearless patriot whose courage and commitment to duty helped our nation push back the horizon of discovery at a critical time. Nasa
<- :nick291!~user@85.255.233.153 PRIVMSG #thisisatestoftheemergencybroadcastsystem :said Young died at home in Houston on Friday night following complications from pneumonia.

The length of the first incoming message above is just over 440 characters, leaving just 70 characters for anything else the server needs to add to the message. Throw in 20 characters (which is probably conservative) for IRCv3 prefixes, and longer nick!user@hostnames, and we're looking at maybe 40 characters spare on a good day.

Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Ok, thank you for the demo. I must have misspoke about 300 characters, seeing as the lines that two users were complaining about would have had foreign characters in it. Any chance we could see inside how mIRC's splitting logic works? Curious about how long before you decide to wrap, and without splitting a word or splitting up the bytes of a UTF-8 character?

Somebody told me (more than once) that when a server starts throwing in IRCv3 prefixes, that the client and server must both accept 1024 bytes per command instead of 512. I have not played with any of that, and I don't know what practical meaning it has for PRIVMSG or if it allows one to squeeze more text in.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
Quote:
Any chance we could see inside how mIRC's splitting logic works? Curious about how long before you decide to wrap, and without splitting a word or splitting up the bytes of a UTF-8 character?

See my reply to your other post :-]

Quote:
Somebody told me (more than once) that when a server starts throwing in IRCv3 prefixes, that the client and server must both accept 1024 bytes per command instead of 512

I have never heard of that but, at the very least, it will need to be something that the client can enable in CAP, otherwise 1024 would break existing clients. mIRC supports a CAP packet-size token (which is not part of IRCv3 but was requested some years ago by someone) and enables it by default to 1024 if the token is available:

Quote:
02/04/2010 - mIRC v7.0
25.Added CAP LS protocol support. mIRC now sends "CAP LS" as the first
line when connecting to a server before sending NICK/USER to logon.
Currently enables "multi-prefix" and "packet-size=1024" if they are
available.

However, it has never been extensively tested, as far as I know.

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
@ Khaled : I believe Raccoon is refering to something I told him but he has misunderstood what I was stating.

@ Raccoon : IRCv3 allows for an additional 512b per message but those 512b are reserved *only* for the message tags. IRC message data, excluding the tags, is still capped at 512 bytes:

Originally Posted By: From the IRCv3.2 Spec
Size limit for the message tags MUST be 512 bytes, including @ and the trailing space characters, leaving 510 bytes for tags themselves. So the total size of a message becomes limited by 1024 bytes: 512 bytes for message tags, and 512 bytes for the rest as specified by RFC 1459.

- Link

Last edited by FroggieDaFrog; 07/01/18 05:25 PM.

I am SReject
My Stuff
Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
That's an interesting point. This means that a client needs to count IRCv3 @prefixes that it sends separately from the message, so, for example, if mIRC adds IRCv3 prefixes to a line, such as @label=XXXXXX, it needs to count the prefix length separately to the message length.

This also opens up other issues with line splitting. If a line that uses a @prefix is split, the @prefix would likely need to be preserved across each line. In fact, based on the @prefix type, the @prefix itself might need to be modified per split line or even removed.

mIRC does not currently send IRCv3 prefixes but I was planning on using them in the future, so the above will need to be considered.


Link Copied to Clipboard