Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 02:26 < dx> hi
- 02:26 < dx> this section is confusing http://wiki.vg/Protocol#Chat_Message_.280x03.29
- 02:27 < dx> might have outdated information
- 02:27 < dx> "A message longer than 100 characters will cause the server to kick the client" <--- seems to be false right now
- 02:28 < dx> hm, actually, that might apply to chat messages sent by clients only
- 02:33 < dx> oh, the 119 limit (that seems to be enforced by the vanilla server code at 118) is 100 chars of message + 16 chars of max username length + 3 chars of "<> "
- 02:35 < TkTech> dx: Would be great if you could clarify it on the wiki
- 02:36 < dx> TkTech: i can add the last part, but i'm still confused about the "kick"
- 02:37 < dx> and i don't have any tools to send custom packets from the client right now
- 03:02 < umby24> dx: what packet do you need sent?
- 03:03 < umby24> I can wire up a bot to send it.
- 03:03 < dx> umby24: chat packet with more than 100 characters of message data, thanks :3
- 03:04 < umby24> including username or no?
- 03:05 < umby24> ah
- 03:05 < umby24> 100 characters of message data: ok
- @@03:05 < umby24> 101: kick
- @@03:06 < umby24> Kicked by server! Reason: Chat message too long
- 03:06 < umby24> Vanilla 1.4.7 server
- @@03:07 <+Amaranth> dx, umby24: However the server can send up to 32767 characters in a single chat packet to the client
- 03:07 <+Amaranth> Although this is more data than the default client can show even in scrollback it does accept it and draw it
- 03:07 < dx> Amaranth: whoa! thanks for the info!
- 03:07 < umby24> xD
- 03:07 < umby24> awesome.
- 03:08 <+Amaranth> Also, the vanilla client fails at handling newlines in chat packets so you should shard your messages into separate packets at the newline server side
- 03:08 <+Amaranth> The client processes the newline twice so you get double spaced lines
- @@03:08 < dx> Amaranth: it's exactly what i needed to know - this vanilla server modded with forge is limiting it to 118 and now i see it can just be overriden
- 03:09 < dx> also, thanks umby24, updating the wiki now
- 03:09 < umby24> np
- 03:09 < dx> wait
- 03:09 < umby24> ?
- @@03:09 < dx> what the hell is the 119 char limit then?
- 03:09 < dx> just something the vanilla server enforces?
- 03:09 < dx> not a protocol thing?
- @@03:10 < SinZ> server enforces
- @@03:10 <+Amaranth> Right, 32767 is the protocol max for any string
- @@03:10 <+Amaranth> But for incoming chat the server enforces a shorter limit (for obvious reasons)
- 03:10 < dx> >A message longer than 119 characters will cause the server and client to print the message "Received string length longer than maximum allowed (X > 119)", with no side effects
- 03:10 < SinZ> but, for protocol purposes, what the client says, goes.
- 03:10 < SinZ> server*
- 03:11 < dx> Amaranth: is that "received string length longer" from the vanilla server too, and something bukkit disables?
- 03:11 <+Amaranth> That data is invalid as of 1.2.5
- @@03:11 <+Amaranth> Without a protocol version change the max length of outgoing chat packets was changed
- 03:11 < dx> hah
- 03:11 < dx> so clean, mojang
- 03:11 < SinZ> the vannila client won't send something that big anyway
- 03:12 <+Amaranth> So even though a 1.2.4 client could connect to a 1.2.5 server the 1.2.5 server could accidentally make the 1.2.4 client die by sending a message that is too long
Advertisement
Add Comment
Please, Sign In to add comment