Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
More or less what i described here: http://forum.wurmonline.com/index.php?/topic/133085-released-server-mod-loader-priest-crops-seasons-server-packs-bag-of-holding/&page=17#comment-1444175
I went with a packet based system, taking over packet id -100. Currently wurm uses all positive values, and the lowest used negative value is -52, so this seems like a safe bet from future expansion.
Channels are registered by mods on both client and server, using string identifiers. Numeric ids are assigned at runtime for more efficient communication. Messages between mods are sent as ByteBuffer's that can contain anything, a helper reader/writer class is provided for those that want an easier interface.
The handshake works like this:
A modded client logging into an unmodded server will see nothing, while an unmodded client logging into a modded server will see the human readable message with a link to the modloader thread, but otherwise will get no spam and can play normally.
I've changed the serverpacks mod to use the new system, and also @TysonCodes tooltip mod (the changes are here - will submit a PR to him once this is accepted).
Client side part here - ago1024/WurmClientModLauncher#6