Limited IRC channel topic content

These are old archives. They are kept for historic purposes only.
Post Reply
_togo_

Limited IRC channel topic content

Post by _togo_ »

Just curious. Why is it that all topics in every channel have a limited topic amount...i.e....can put so many characters in the topic?
Thanks in advance.
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

They are limited because everything on IRC has a limit. They are limited to 307 characters IIRC. In the protocol, you can only send 512 bytes to the client in 1 line, so that means there is the topic, the setter's nick, and in some cases the setter's address. I also think there is room left for other server-to-server things, such as the timestamp.
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Consider the regular server->client topic message (assuming maximum length on everything).

: (1) + NICKLEN (30) + ! (1) + USERLEN (10) + @ (1) + HOSTLEN (63) + <space>TOPIC<space> (7) + CHANNELLEN (32) + <space>: (2) + TOPICLEN (307)

This adds up to 454. This is the longest of the three cases in which the topic appears. Since IRC messages are limited to 510 characters (512 when you include the terminating CRLF). In theory the topic could be expanded by 56 characters. However, if 307 isn't enough for you then you need to think about what you're trying to put in there. :P
DJ747
Posts: 16
Joined: Wed May 25, 2005 2:06 am

Post by DJ747 »

some channel services (like anope) allow you to have an entry message, so if you like a bigger topic just use that, or bring in a bot that sends a notice to someone when they join.
Post Reply