Max charactors type at one time in channel window?

These are old archives. They are kept for historic purposes only.
Post Reply
dizzysky
Posts: 1
Joined: Fri Feb 06, 2009 10:21 pm

Max charactors type at one time in channel window?

Post by dizzysky »

I've been looking for documentation on how much text can be entered at one time before getting cut off in channel. This is not for spamming but to send as much text from a document at one time other users in private channel. Is there a way to allow more text at one time?

Thanks
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: Max charactors type at one time in channel window?

Post by Stealth »

The IRC protocol state that packets must be no more than 512 bytes (characters) in length, including the new line and line feed characters at the end. When sending a message to a channel, you must consider the packet must include: the source nick, user, and host, command to be performed, the channel name, and the text to be delivered. These are calculated from the maximum length each of these strings can be.

Nicks are limited to 30 characters, usernames are limited to 10 characters, hosts are limited to 63 characters. channels are limited to no more than 32 characters. You must then add the appropriate characters for format and spacing. There's a : at the beginning of the packet, a ! between nick and user, and a @ between user and host, and another : where the text to be delivered begins. The command is PRIVMSG, which is another 7 characters. There are 3 spaces, and the newline characters at the end. Add these numbers together, and you get 151. This leaves 361 characters available for the text portion, which would be the most you can send to a channel, any more may break strictly coded clients.

In other words:

Code: Select all

: + NICK + ! + USER + @ + HOST + <space> + PRIVMSG + <space> + CHAN + <space> + : + \r\n
1 +  30  + 1 +  10  + 1 +  63  +    1    +    7    +    1    +  32  +    1    + 1 +   2
The required formatting in it's maximum usage is 151. 512 - 151 = 361
Post Reply