private static void ReceiveRemoteRequest(byte[] bytes)
        {
            RemoteRequest request = null;

            try
            {
                request = NetworkUtil.DeserializeRequest(bytes);
            }
            catch (Exception e)
            {
                Log.Error(e.Message);
                return;
            }
            if (request.RequestType == RemoteRequestType.CLIENT_REGISTRATION)
            {
                SendWhitelistToClient(request.Sender);
            }
            else if (request.RequestType == RemoteRequestType.RECOMPILE)
            {
                var recompileRequest = request as RecompileRequest;
                if (recompileRequest == null)
                {
                    Log.Error("Request Deserialization: No serialized data (expected RecompileRequest)!");
                    return;
                }
                RecompilePB(recompileRequest.PbId, recompileRequest.ScriptId);
            }
            else
            {
                Log.Warn(string.Format("Invalid request type '{0}' to server!", request.RequestType));
            }
        }
        private static void ReceiveRemoteRequest(byte[] bytes)
        {
            ModLogger.Info("Received remote request...");
            RemoteRequest request = null;

            try
            {
                request = NetworkUtil.DeserializeRequest(bytes);
            }
            catch (Exception e)
            {
                ModLogger.Error(e.Message);
                return;
            }
            ModLogger.Info("Successfully deserialized RemoteRequest.");
            if (request.RequestType == RemoteRequestType.WHITELIST_ACTION)
            {
                var clientRequest = request as WhitelistActionRequest;
                if (clientRequest == null)
                {
                    ModLogger.Error("No serialized data (expected WhitelistActionRequest)!");
                    return;
                }

                ReceiveWhitelist(clientRequest.WhitelistAction, clientRequest.Whitelist);
            }
            else
            {
                ModLogger.Warning(string.Format("Invalid request type '{0}' to client!", request.RequestType));
            }
        }