Guest User

Untitled

a guest
Feb 28th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 02:26 < dx> hi
  2. 02:26 < dx> this section is confusing http://wiki.vg/Protocol#Chat_Message_.280x03.29
  3. 02:27 < dx> might have outdated information
  4. 02:27 < dx> "A message longer than 100 characters will cause the server to kick the client" <--- seems to be false right now
  5. 02:28 < dx> hm, actually, that might apply to chat messages sent by clients only
  6. 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 "<> "
  7. 02:35 < TkTech> dx: Would be great if you could clarify it on the wiki
  8. 02:36 < dx> TkTech: i can add the last part, but i'm still confused about the "kick"
  9. 02:37 < dx> and i don't have any tools to send custom packets from the client right now
  10. 03:02 < umby24> dx: what packet do you need sent?
  11. 03:03 < umby24> I can wire up a bot to send it.
  12. 03:03 < dx> umby24: chat packet with more than 100 characters of message data, thanks :3
  13. 03:04 < umby24> including username or no?
  14. 03:05 < umby24> ah
  15. 03:05 < umby24> 100 characters of message data: ok
  16. @@03:05 < umby24> 101: kick
  17. @@03:06 < umby24> Kicked by server! Reason: Chat message too long
  18. 03:06 < umby24> Vanilla 1.4.7 server
  19. @@03:07 <+Amaranth> dx, umby24: However the server can send up to 32767 characters in a single chat packet to the client
  20. 03:07 <+Amaranth> Although this is more data than the default client can show even in scrollback it does accept it and draw it
  21. 03:07 < dx> Amaranth: whoa! thanks for the info!
  22. 03:07 < umby24> xD
  23. 03:07 < umby24> awesome.
  24. 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
  25. 03:08 <+Amaranth> The client processes the newline twice so you get double spaced lines
  26. @@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
  27. 03:09 < dx> also, thanks umby24, updating the wiki now
  28. 03:09 < umby24> np
  29. 03:09 < dx> wait
  30. 03:09 < umby24> ?
  31. @@03:09 < dx> what the hell is the 119 char limit then?
  32. 03:09 < dx> just something the vanilla server enforces?
  33. 03:09 < dx> not a protocol thing?
  34. @@03:10 < SinZ> server enforces
  35. @@03:10 <+Amaranth> Right, 32767 is the protocol max for any string
  36. @@03:10 <+Amaranth> But for incoming chat the server enforces a shorter limit (for obvious reasons)
  37. 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
  38. 03:10 < SinZ> but, for protocol purposes, what the client says, goes.
  39. 03:10 < SinZ> server*
  40. 03:11 < dx> Amaranth: is that "received string length longer" from the vanilla server too, and something bukkit disables?
  41. 03:11 <+Amaranth> That data is invalid as of 1.2.5
  42. @@03:11 <+Amaranth> Without a protocol version change the max length of outgoing chat packets was changed
  43. 03:11 < dx> hah
  44. 03:11 < dx> so clean, mojang
  45. 03:11 < SinZ> the vannila client won't send something that big anyway
  46. 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