papermc/scripts
Minecrell 16869992a8 Call PaperServerListPingEvent for legacy pings (#1057)
* Make the legacy ping handler more reliable

The Minecraft server often fails to respond to old ("legacy") pings
from old Minecraft versions using the protocol used before the switch
to Netty in Minecraft 1.7.

Due to packet fragmentation[1], we might not have all needed bytes
available when the LegacyPingHandler is called. In this case, it will
run into an error, remove the handler and continue using the modern
protocol.

This is unlikely to happen for the first two revisions of the legacy
ping protocol (used in Minecraft 1.5.x and older) since the request
consists of only one or two bytes, but happens frequently for the
last/third revision introduced in Minecraft 1.6.

It has much larger, variable packet sizes due to the inclusion of
the virtual host (the hostname/port used to connect to the server).

The solution[2] is simple: If we find more than two matching bytes,
we buffer the remaining bytes until we have enough to fully read and
respond to the request.

[1]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-11
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13

* Add legacy ping support to PaperServerListPingEvent

Add a new method to StatusClient check if the client is a legacy
client that does not support all of the features provided in the
event.
2018-03-30 13:00:01 -04:00
..
apatch.sh [CI-SKIP] Fix apatch zsh support 2017-12-20 13:21:08 +00:00
applyPatches.sh Z plays with scripts and GPG part 2 2016-04-14 19:15:40 -05:00
build.sh Workaround for OSX not having the realpath command. 2016-04-03 03:53:58 -05:00
decompile.sh Move mc decompile source to its own folder 2017-08-12 18:56:59 -05:00
functions.sh Add testserver command - quickly start a test server 2016-04-09 21:33:32 -04:00
importmcdev.sh Call PaperServerListPingEvent for legacy pings (#1057) 2018-03-30 13:00:01 -04:00
init.sh Move mc decompile source to its own folder 2017-08-12 18:56:59 -05:00
makemcdevsrc.sh Move mc decompile source to its own folder 2017-08-12 18:56:59 -05:00
paperclip.sh Use absolute paths for pointing Paperclip to files 2017-09-23 13:30:55 -05:00
rebuildPatches.sh Use a more reliable fixed width sequence for rebuild patches 2016-05-12 21:37:14 -04:00
remap.sh Use a more general method of aliasing md5sum 2018-02-23 18:58:45 -06:00
testServer.sh Move mc decompile source to its own folder 2017-08-12 18:56:59 -05:00
upstreamMerge.sh Update Paper to MC 1.12-pre5 2017-05-20 23:49:56 -05:00