I have a little trick to avoid (or at least make it harder) people using custom-made clients. Here it is:
First of all, centralize your netmessages.h, make all sources use the same file. Then, open it and put the following lines:
Code: Select all
#include "version.h"
#define DEF_VERSIONPLUSMODIFIER (DEF_LOWER_VERSION % 5)//that can be whatever number you wish, 1 byte-sized numbers will work fine
#define DEF_PLUSMSGMODIFIER_1 0x01 + DEF_VERSIONPLUSMODIFIER
#define DEF_PLUSMSGMODIFIER_2 0x03 + DEF_VERSIONPLUSMODIFIER
#define DEF_PLUSMSGMODIFIER_3 0x09 + DEF_VERSIONPLUSMODIFIER
#define DEF_PLUSMSGMODIFIER_4 0x07 + DEF_VERSIONPLUSMODIFIER
#define DEF_PLUSMSGMODIFIER_5 0x05 + DEF_VERSIONPLUSMODIFIER
Code: Select all
#define DEF_NOTIFY_FORCEDISCONN 0x0B75 +DEF_PLUSMSGMODIFIER_1
#define DEF_NOTIFY_FIGHTZONERESERVE 0x0B76 +DEF_PLUSMSGMODIFIER_2
Explanation: the messages used to comunicate through hgserver/client will have their values based on the version... making diff values every version, so people will have trouble making customized clients to conect to your server.
This is just a little gift to help people to fight against hackers. It won't stop them, but why not make their job harder?
