Cuberite Forum
Can I refuse clients of old versions to log in the server? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Can I refuse clients of old versions to log in the server? (/thread-1492.html)



Can I refuse clients of old versions to log in the server? - pdl - 06-20-2014

I don't want clients of old versions to log in the server. In other word, I only want clients of specific version to log in it.

Can I modify config file to do it? Or I have to rewrite code or write a plugin?

PS: My English is not so good, so please forgive me for the bad grammar. Thank you.Smile


RE: Can I refuse clients of old versions to log in the server? - NiLSPACE - 06-20-2014

I already made a plugin for that, but I didn't create a thread for it so that's why you couldn't find one. Here it is: https://forum.cuberite.org/attachment.php?aid=434


RE: Can I refuse clients of old versions to log in the server? - pdl - 06-20-2014

(06-20-2014, 02:06 AM)STR_Warrior Wrote: I already made a plugin for that, but I didn't create a thread for it so that's why you couldn't find one. Here it is: https://forum.cuberite.org/attachment.php?aid=434

I used to believe that I can get procotol version from HOOK_HANDSHAKE, so I could not make a plugin to do it. Thank you for tell me how to do it.


RE: Can I refuse clients of old versions to log in the server? - NiLSPACE - 06-20-2014

We have a hook called OnLogin that gives the information about the protocol. I do have to mention that you can return true with the OnLogin hook to block the player from logging in, but I didn't do that in my plugin because I wanted a customizable kick message.