[HOW?] increase maximum MSG length

These are old archives. They are kept for historic purposes only.
Post Reply
n00dle
Posts: 1
Joined: Sat Oct 30, 2010 4:53 pm

[HOW?] increase maximum MSG length

Post by n00dle »

Hi,

I hope its okay to open a new thread even though those are describing exact the same problem:
http://forums.unrealircd.com/viewtopic. ... gth#p29795
http://forums.unrealircd.com/viewtopic. ... gth#p25940

stealth gave a nice description on how the maximum length of a message is dependant of all that protocol stuff that is not really 'shown' in the IRC client (in my case mIRC, irssi)
Stealth wrote: 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
But you (stealth) also said there is no chance to change that MaxMsgLen? By that, did you mean there is no chance to increase it through config or there is no chance at all (for whatsoever reason)?

I assume somewhere in the UnrealIRCd sourcecode has to be some buffer[512] that contains all that protocol stuff and the message itself, once a message is sent. There has to be some way to
manipulate the source-code to increase the maximum message length, or is my way of thinking totally going in the wrong direction?

Anyone who maybe can give more detailed information on how that 'message maxmimum length' is calculated/implemented in the UnrealIRCd sourcecode, or maybe where to find that part of code?
I'd really love to increase my daemon's maximum message length by at least another 512 chars.

Regards and thanks in advance :)
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: [HOW?] increase maximum MSG length

Post by Stealth »

Simple answer: no.

Long answer:
This cannot be changed at all. IRC itself limits messages to 512 bytes, and how this is consumed is outlined in your original post. Because the IRC protocol specifies a limit, it is entirely possible that clients may set their receiving buffers at 512 (or just a little over, mIRC is largely guilty of setting buffers too small). Considering buffer size limitations in clients, you then open up a whole world of potential exploits and buffer overruns. You can't just assume every client connected to your server is capable of handling abnormal message sizes.

If you still wish to go about changing the buffer size of Unreal, you are going to need to do so entirely on your own. Since you need to ask where such information is located in the source code, it tells me and everyone here that you clearly do not now enough C to safely modify Unreal yourself. Along with potentially harming connected clients, increasing the buffer size in Unreal also increases your chance to create exploits within Unreal itself. You will not get help with or find information about modifying Unreal's source on these forums or IRC support.
Post Reply