Exemple #1
1
        public MOHWLayerClient(FrostbiteLayerConnection connection) : base(connection) {

            this.RequestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            #region FrostbiteLayerClient delegates
            // vars.bannerUrl -> FrostbiteLayerClient
            // vars.friendlyFire -> FrostbiteLayerClient
            // vars.gamePassword -> FrostbiteLayerClient
            // vars.idleTimeout -> FrostbiteLayerClient
            // vars.ranked -> FrostbiteLayerClient
            // vars.serverDescription
            // vars.serverName
            // vars.teamKill*
            #endregion

            #region MoHW R-3 disabled
            // MoHW R-3 this.m_requestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            // MoHW R-3 this.m_requestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            // this.m_requestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            // this.m_requestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            // MOHW general this.m_requestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            #endregion

            this.RequestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            // R-5 this.m_requestDelegates.Add("vars.allUnlocksUnlocked", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.buddyOutline", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.hudBuddyInfo", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudClassAbility", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudCrosshair", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudEnemyTag", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudExplosiveIcons", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudGameMode", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudHealthAmmo", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudMinimap", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudObiturary", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudPointsTracker", this.DispatchVarsRequest); // MoHW
            this.RequestDelegates.Add("vars.hudUnlocks", this.DispatchVarsRequest); // MoHW
            
            this.RequestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playlist", this.DispatchAlterMaplistRequest); // MoHW
            this.RequestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);
            
            this.RequestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);
            
            this.RequestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.RequestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.RequestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
        }
 protected virtual void DispatchSquadIsPrivateRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestPacketSquadIsPrivateReceived != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestPacketSquadIsPrivateReceived.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 protected virtual void DispatchAdminShutDownRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestPacketAdminShutdown != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestPacketAdminShutdown.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 protected virtual void DispatchUnsecureSafeListedRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestPacketUnsecureSafeListedRecieved != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestPacketUnsecureSafeListedRecieved.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 protected virtual void DispatchAlterReservedSlotsListRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestPacketAlterReservedSlotsListRecieved != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestPacketAlterReservedSlotsListRecieved.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 private void m_connection_ConnectionClosed(FrostbiteLayerConnection sender)
 {
     if (this.ConnectionClosed != null)
     {
         FrostbiteConnection.RaiseEvent(this.ConnectionClosed.GetInvocationList(), this);
     }
 }
Exemple #7
0
        public MoHLayerClient(FrostbiteLayerConnection connection)
            : base(connection)
        {
            this.RequestDelegates.Add("vars.clanTeams", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.noAmmoPickups", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.noCrosshairs", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.noSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.noUnlocks", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.realisticHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.skillLimit", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.preRoundLimit", this.DispatchVarsRequest);

            this.RequestDelegates.Add("admin.stopPreRound", this.DispatchUseMapFunctionRequest);

            this.RequestDelegates.Add("admin.roundStartTimerEnabled", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.tdmScoreCounterMaxScore", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundStartTimerPlayersLimit", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundStartTimerDelay", this.DispatchVarsRequest);

            this.RequestDelegates.Add("reservedSpectateSlots.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.addPlayer", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.removePlayer", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSpectateSlots.list", this.DispatchSecureSafeListedRequest);
        }
Exemple #8
0
        public MoHLayerClient(FrostbiteLayerConnection connection)
            : base(connection) {

            this.m_requestDelegates.Add("vars.clanTeams", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.noAmmoPickups", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.noCrosshairs", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.noSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.noUnlocks", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.realisticHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.skillLimit", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.preRoundLimit", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("admin.stopPreRound", this.DispatchUseMapFunctionRequest);

            this.m_requestDelegates.Add("admin.roundStartTimerEnabled", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.tdmScoreCounterMaxScore", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundStartTimerPlayersLimit", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundStartTimerDelay", this.DispatchVarsRequest);
            
            this.m_requestDelegates.Add("reservedSpectateSlots.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.load", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.save", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.addPlayer", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.removePlayer", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.clear", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSpectateSlots.list", this.DispatchSecureSafeListedRequest);
        }
 protected virtual void DispatchHelpRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestHelp != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestHelp.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 public void Shutdown()
 {
     if (this.m_connection != null)
     {
         this.m_connection.Shutdown();
         this.m_connection = null;
     }
 }
Exemple #11
0
        public BF3LayerClient(FrostbiteLayerConnection connection) : base(connection)
        {
            this.m_requestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            // vars.idleTimeout is already included in FrostbiteLayerClient
            //this.m_requestDelegates.Add("vars.idleTimeout", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);
            this.m_requestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.m_requestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.m_requestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.m_requestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.m_requestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);
        }
Exemple #12
0
        public BF3LayerClient(FrostbiteLayerConnection connection) : base(connection) {

            this.m_requestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            // vars.idleTimeout is already included in FrostbiteLayerClient
            //this.m_requestDelegates.Add("vars.idleTimeout", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);
            this.m_requestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.m_requestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.m_requestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.m_requestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.m_requestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);
        }
 private void m_connection_PacketReceived(FrostbiteLayerConnection sender, Packet packet)
 {
     if (packet.OriginatedFromServer == false && packet.IsResponse == false)
     {
         this.DispatchRequestPacket(sender, packet);
     }
     //else if (packet.OriginatedFromServer == true && packet.IsResponse == true) {
     //  Response to an event we sent.  We just accept these without processing them.  Should always be "OK".
     //}
 }
Exemple #14
0
        public PRoConLayerClient(FrostbiteLayerConnection newConnection, PRoConApplication praApplication, PRoConClient prcClient)
        {
            this.IsLoggedIn = false;
            this.GzipCompression = false;

            this.ProconEventsUid = String.Empty;

            if (prcClient.Game != null) {

                if (prcClient.Game is BFBC2Client) {
                    this.Game = new BFBC2LayerClient(newConnection);
                }
                else if (prcClient.Game is MoHClient) {
                    this.Game = new MoHLayerClient(newConnection);
                }

                this.m_requestDelegates = new Dictionary<string, RequestPacketHandler>() {
                    { "procon.login.username", this.DispatchProconLoginUsernameRequest  },
                    { "procon.registerUid", this.DispatchProconRegisterUidRequest  },
                    { "procon.version", this.DispatchProconVersionRequest  },
                    { "procon.vars", this.DispatchProconVarsRequest  },
                    { "procon.privileges", this.DispatchProconPrivilegesRequest  },
                    { "procon.compression", this.DispatchProconCompressionRequest  },

                    { "procon.account.listAccounts", this.DispatchProconAccountListAccountsRequest  },
                    { "procon.account.listLoggedIn", this.DispatchProconAccountListLoggedInRequest  },
                    { "procon.account.create", this.DispatchProconAccountCreateRequest  },
                    { "procon.account.delete", this.DispatchProconAccountDeleteRequest  },
                    { "procon.account.setPassword", this.DispatchProconAccountSetPasswordRequest  },

                    { "procon.battlemap.deleteZone", this.DispatchProconBattlemapDeleteZoneRequest  },
                    { "procon.battlemap.createZone", this.DispatchProconBattlemapCreateZoneRequest  },
                    { "procon.battlemap.modifyZoneTags", this.DispatchProconBattlemapModifyZoneTagsRequest  },
                    { "procon.battlemap.modifyZonePoints", this.DispatchProconBattlemapModifyZonePointsRequest  },
                    { "procon.battlemap.listZones", this.DispatchProconBattlemapListZonesRequest  },

                    { "procon.layer.setPrivileges", this.DispatchProconLayerSetPrivilegesRequest  },

                    { "procon.plugin.listLoaded", this.DispatchProconPluginListLoadedRequest  },
                    { "procon.plugin.listEnabled", this.DispatchProconPluginListEnabledRequest  },
                    { "procon.plugin.enable", this.DispatchProconPluginEnableRequest  },
                    { "procon.plugin.setVariable", this.DispatchProconPluginSetVariableRequest  },

                    { "procon.exec", this.DispatchProconExecRequest },
                    { "procon.packages.install", this.DispatchProconPackagesInstallRequest },

                    { "procon.admin.say", this.DispatchProconAdminSayRequest },
                    { "procon.admin.yell", this.DispatchProconAdminYellRequest },
                };

                if ((this.m_praApplication = praApplication) != null && (this.m_prcClient = prcClient) != null) {
                    this.RegisterEvents();
                }
            }
        }
        protected virtual void DispatchBanListAddRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
        {
            if (cpRecievedPacket.Words.Count >= 4)
            {
                CBanInfo newBan = new CBanInfo(cpRecievedPacket.Words[1], cpRecievedPacket.Words[2], new TimeoutSubset(cpRecievedPacket.Words.GetRange(3, TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3]))), cpRecievedPacket.Words.Count >= (4 + TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3])) ? cpRecievedPacket.Words[(3 + TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3]))] : "");

                if (this.RequestBanListAddRecieved != null)
                {
                    FrostbiteConnection.RaiseEvent(this.RequestBanListAddRecieved.GetInvocationList(), this, cpRecievedPacket, newBan);
                }
            }
        }
 protected virtual void DispatchLoginPlainTextRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (cpRecievedPacket.Words.Count >= 2)
     {
         if (this.RequestLoginPlainText != null)
         {
             FrostbiteConnection.RaiseEvent(this.RequestLoginPlainText.GetInvocationList(), this, cpRecievedPacket, cpRecievedPacket.Words[1]);
         }
     }
     else
     {
         this.SendResponse(cpRecievedPacket, "InvalidArguments");
     }
 }
        protected virtual void DispatchEventsEnabledRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
        {
            if (this.RequestEventsEnabled != null)
            {
                bool blEnabled = true;

                if (cpRecievedPacket.Words.Count == 2 && bool.TryParse(cpRecievedPacket.Words[1], out blEnabled) == true)
                {
                    FrostbiteConnection.RaiseEvent(this.RequestEventsEnabled.GetInvocationList(), this, cpRecievedPacket, blEnabled);
                }
                else
                {
                    this.SendResponse(cpRecievedPacket, "InvalidArguments");
                }
            }
        }
 public virtual void DispatchRequestPacket(FrostbiteLayerConnection sender, Packet cpRequestPacket)
 {
     if (cpRequestPacket.Words.Count >= 1)
     {
         if (this.RequestDelegates.ContainsKey(cpRequestPacket.Words[0]) == true)
         {
             this.RequestDelegates[cpRequestPacket.Words[0]](sender, cpRequestPacket);
         }
         else
         {
             if (this.RequestPacketUnknownRecieved != null)
             {
                 FrostbiteConnection.RaiseEvent(this.RequestPacketUnknownRecieved.GetInvocationList(), this, cpRequestPacket);
             }
         }
     }
 }
 protected virtual void DispatchVarsRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (cpRecievedPacket.Words.Count == 1)
     {
         if (this.RequestPacketSecureSafeListedRecieved != null)
         {
             FrostbiteConnection.RaiseEvent(this.RequestPacketSecureSafeListedRecieved.GetInvocationList(), this, cpRecievedPacket);
         }
     }
     else
     {
         if (this.RequestPacketVarsRecieved != null)
         {
             FrostbiteConnection.RaiseEvent(this.RequestPacketVarsRecieved.GetInvocationList(), this, cpRecievedPacket);
         }
     }
 }
Exemple #20
0
        public BFBC2LayerClient(FrostbiteLayerConnection connection)
            : base(connection)
        {
            this.m_requestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.teamBalance", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("reservedSlots.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.load", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.save", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.addPlayer", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.removePlayer", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.clear", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlots.list", this.DispatchSecureSafeListedRequest);
        }
Exemple #21
0
        public BFBC2LayerClient(FrostbiteLayerConnection connection)
            : base(connection) {

            this.RequestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.teamBalance", this.DispatchVarsRequest);

            this.RequestDelegates.Add("reservedSlots.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.addPlayer", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.removePlayer", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlots.list", this.DispatchSecureSafeListedRequest);
        }
 protected virtual void DispatchUnsecureSafeListedRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     if (this.RequestPacketUnsecureSafeListedRecieved != null) {
         FrostbiteConnection.RaiseEvent(this.RequestPacketUnsecureSafeListedRecieved.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 private void m_connection_ConnectionClosed(FrostbiteLayerConnection sender) {
     if (this.ConnectionClosed != null) {
         FrostbiteConnection.RaiseEvent(this.ConnectionClosed.GetInvocationList(), this);
     }
 }
 public virtual void DispatchRequestPacket(FrostbiteLayerConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 1) {
         if (this.RequestDelegates.ContainsKey(cpRequestPacket.Words[0]) == true) {
             this.RequestDelegates[cpRequestPacket.Words[0]](sender, cpRequestPacket);
         }
         else {
             if (this.RequestPacketUnknownRecieved != null) {
                 FrostbiteConnection.RaiseEvent(this.RequestPacketUnknownRecieved.GetInvocationList(), this, cpRequestPacket);
             }
         }
     }
 }
 protected virtual void DispatchHelpRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     if (this.RequestHelp != null) {
         FrostbiteConnection.RaiseEvent(this.RequestHelp.GetInvocationList(), this, cpRecievedPacket);
     }
 }
 protected virtual void DispatchLoginHashedRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     if (cpRecievedPacket.Words.Count == 1) {
         if (this.RequestLoginHashed != null) {
             FrostbiteConnection.RaiseEvent(this.RequestLoginHashed.GetInvocationList(), this, cpRecievedPacket);
         }
     }
     else if (cpRecievedPacket.Words.Count >= 2) {
         if (this.RequestLoginHashedPassword != null) {
             FrostbiteConnection.RaiseEvent(this.RequestLoginHashedPassword.GetInvocationList(), this, cpRecievedPacket, cpRecievedPacket.Words[1]);
         }
     }
     else {
         this.SendResponse(cpRecievedPacket, "InvalidArguments");
     }
 }
Exemple #27
0
        public BF4LayerClient(FrostbiteLayerConnection connection) : base(connection) {

            this.RequestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            // vars.idleTimeout is already included in FrostbiteLayerClient
            //this.m_requestDelegates.Add("vars.idleTimeout", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.gunMasterWeaponsPreset", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.ctfRoundTimeModifier", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);

            this.RequestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            this.RequestDelegates.Add("spectatorList.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.list", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("gameAdmin.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.list", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.RequestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.RequestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);

            this.RequestDelegates.Add("player.idleDuration", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("player.isAlive", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("player.ping", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.leader", this.DispatchSquadLeaderRequest);
            this.RequestDelegates.Add("squad.listActive", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.listPlayers", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.private", this.DispatchSquadIsPrivateRequest);

            this.RequestDelegates.Add("punkBuster.isActive", this.DispatchVarsRequest);
            this.RequestDelegates.Add("punkBuster.activate", this.DispatchVarsRequest);
            this.RequestDelegates.Add("punkBuster.deactivate", this.DispatchVarsRequest);

            this.RequestDelegates.Add("fairFight.isActive", this.DispatchVarsRequest);
            this.RequestDelegates.Add("fairFight.activate", this.DispatchVarsRequest);
            this.RequestDelegates.Add("fairfight.deactivate", this.DispatchVarsRequest);
            
            this.RequestDelegates.Add("vars.maxSpectators", this.DispatchVarsRequest);
            
            this.RequestDelegates.Add("vars.hitIndicatorsEnabled", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.commander", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.serverType", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.forceReloadWholeMags", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.roundTimeLimit", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.mpExperience", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team1FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team2FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team3FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team4FactionOverride", this.DispatchVarsRequest);
        }
 protected virtual void DispatchVarsAdminPasswordRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     this.SendResponse(cpRecievedPacket, "UnknownCommand");
 }
        protected virtual void DispatchVarsRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {

            if (cpRecievedPacket.Words.Count == 1) {
                if (this.RequestPacketSecureSafeListedRecieved != null) {
                    FrostbiteConnection.RaiseEvent(this.RequestPacketSecureSafeListedRecieved.GetInvocationList(), this, cpRecievedPacket);
                }
            }
            else {
                if (this.RequestPacketVarsRecieved != null) {
                    FrostbiteConnection.RaiseEvent(this.RequestPacketVarsRecieved.GetInvocationList(), this, cpRecievedPacket);
                }
            }
        }
 protected virtual void DispatchSquadIsPrivateRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket)
 {
     if (this.RequestPacketSquadIsPrivateReceived != null)
     {
         FrostbiteConnection.RaiseEvent(this.RequestPacketSquadIsPrivateReceived.GetInvocationList(), this, cpRecievedPacket);
     }
 }
Exemple #31
0
        public BF4LayerClient(FrostbiteLayerConnection connection) : base(connection)
        {
            this.RequestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            // vars.idleTimeout is already included in FrostbiteLayerClient
            //this.m_requestDelegates.Add("vars.idleTimeout", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.preset", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.gunMasterWeaponsPreset", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.crossHair", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);

            this.RequestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            this.RequestDelegates.Add("spectatorList.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("spectatorList.list", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("gameAdmin.load", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.save", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.add", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.remove", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.clear", this.DispatchAlterReservedSlotsListRequest);
            this.RequestDelegates.Add("gameAdmin.list", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.RequestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.RequestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.RequestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.RequestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);

            this.RequestDelegates.Add("player.idleDuration", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("player.isAlive", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("player.ping", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.leader", this.DispatchSquadLeaderRequest);
            this.RequestDelegates.Add("squad.listActive", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.listPlayers", this.DispatchSecureSafeListedRequest);
            this.RequestDelegates.Add("squad.private", this.DispatchSquadIsPrivateRequest);

            this.RequestDelegates.Add("punkBuster.isActive", this.DispatchVarsRequest);
            this.RequestDelegates.Add("punkBuster.activate", this.DispatchVarsRequest);
            this.RequestDelegates.Add("punkBuster.deactivate", this.DispatchVarsRequest);

            this.RequestDelegates.Add("fairFight.isActive", this.DispatchVarsRequest);
            this.RequestDelegates.Add("fairFight.activate", this.DispatchVarsRequest);
            this.RequestDelegates.Add("fairfight.deactivate", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.maxSpectators", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.hitIndicatorsEnabled", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.commander", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.serverType", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.forceReloadWholeMags", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.alwaysAllowSpectators", this.DispatchVarsRequest);

            this.RequestDelegates.Add("vars.roundTimeLimit", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.mpExperience", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team1FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team2FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team3FactionOverride", this.DispatchVarsRequest);
            this.RequestDelegates.Add("vars.team4FactionOverride", this.DispatchVarsRequest);
        }
        protected virtual void DispatchEventsEnabledRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
            if (this.RequestEventsEnabled != null) {
                bool blEnabled = true;

                if (cpRecievedPacket.Words.Count == 2 && bool.TryParse(cpRecievedPacket.Words[1], out blEnabled) == true) {
                    FrostbiteConnection.RaiseEvent(this.RequestEventsEnabled.GetInvocationList(), this, cpRecievedPacket, blEnabled);
                }
                else {
                    this.SendResponse(cpRecievedPacket, "InvalidArguments");
                }
            }
        }
Exemple #33
0
        public MOHWLayerClient(FrostbiteLayerConnection connection) : base(connection)
        {
            this.m_requestDelegates.Add("admin.eventsEnabled", this.DispatchEventsEnabledRequest);

            #region FrostbiteLayerClient delegates
            // vars.bannerUrl -> FrostbiteLayerClient
            // vars.friendlyFire -> FrostbiteLayerClient
            // vars.gamePassword -> FrostbiteLayerClient
            // vars.idleTimeout -> FrostbiteLayerClient
            // vars.ranked -> FrostbiteLayerClient
            // vars.serverDescription
            // vars.serverName
            // vars.teamKill*
            #endregion

            #region MoHW R-3 disabled
            // MoHW R-3 this.m_requestDelegates.Add("reservedSlotsList.aggressiveJoin", this.DispatchVarsRequest);

            // MoHW R-3 this.m_requestDelegates.Add("vars.3dSpotting", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.hud", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.miniMap", this.DispatchVarsRequest);
            // this.m_requestDelegates.Add("vars.miniMapSpotting", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.nameTag", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.onlySquadLeaderSpawn", this.DispatchVarsRequest);
            // this.m_requestDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsRequest);
            // MOHW general this.m_requestDelegates.Add("vars.premiumStatus", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.roundLockdownCountdown", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.roundWarmupTimeout", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.unlockMode", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.vehicleSpawnAllowed", this.DispatchVarsRequest);
            // MoHW R-3 this.m_requestDelegates.Add("vars.vehicleSpawnDelay", this.DispatchVarsRequest);
            #endregion

            this.m_requestDelegates.Add("vars.3pCam", this.DispatchVarsRequest);
            // R-5 this.m_requestDelegates.Add("vars.allUnlocksUnlocked", this.DispatchVarsRequest); // MoHW
            this.m_requestDelegates.Add("vars.autoBalance", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.buddyOutline", this.DispatchVarsRequest); // MoHW
            this.m_requestDelegates.Add("vars.bulletDamage", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.gameModeCounter", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("vars.hudBuddyInfo", this.DispatchVarsRequest);      // MoHW
            this.m_requestDelegates.Add("vars.hudClassAbility", this.DispatchVarsRequest);   // MoHW
            this.m_requestDelegates.Add("vars.hudCrosshair", this.DispatchVarsRequest);      // MoHW
            this.m_requestDelegates.Add("vars.hudEnemyTag", this.DispatchVarsRequest);       // MoHW
            this.m_requestDelegates.Add("vars.hudExplosiveIcons", this.DispatchVarsRequest); // MoHW
            this.m_requestDelegates.Add("vars.hudGameMode", this.DispatchVarsRequest);       // MoHW
            this.m_requestDelegates.Add("vars.hudHealthAmmo", this.DispatchVarsRequest);     // MoHW
            this.m_requestDelegates.Add("vars.hudMinimap", this.DispatchVarsRequest);        // MoHW
            this.m_requestDelegates.Add("vars.hudObiturary", this.DispatchVarsRequest);      // MoHW
            this.m_requestDelegates.Add("vars.hudPointsTracker", this.DispatchVarsRequest);  // MoHW
            this.m_requestDelegates.Add("vars.hudUnlocks", this.DispatchVarsRequest);        // MoHW

            this.m_requestDelegates.Add("vars.idleBanRounds", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.killCam", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.maxPlayers", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playlist", this.DispatchAlterMaplistRequest); // MoHW
            this.m_requestDelegates.Add("vars.playerManDownTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.playerRespawnTime", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.regenerateHealth", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundRestartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.roundStartPlayerCount", this.DispatchVarsRequest);
            this.m_requestDelegates.Add("vars.soldierHealth", this.DispatchVarsRequest);

            this.m_requestDelegates.Add("reservedSlotsList.configFile", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.load", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.save", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.add", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.remove", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.clear", this.DispatchAlterReservedSlotsListRequest);
            this.m_requestDelegates.Add("reservedSlotsList.list", this.DispatchSecureSafeListedRequest);

            this.m_requestDelegates.Add("currentLevel", this.DispatchSecureSafeListedRequest);

            this.m_requestDelegates.Add("mapList.add", this.DispatchAlterMaplistRequest);

            this.m_requestDelegates.Add("mapList.runNextRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.restartRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.endRound", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.setNextMapIndex", this.DispatchUseMapFunctionRequest);
            this.m_requestDelegates.Add("mapList.getMapIndices", this.DispatchSecureSafeListedRequest);
            this.m_requestDelegates.Add("mapList.getRounds", this.DispatchUseMapFunctionRequest);

            this.m_requestDelegates.Add("vars.serverMessage", this.DispatchVarsRequest);
        }
 protected virtual void DispatchAdminShutDownRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     if (this.RequestPacketAdminShutdown != null) {
         FrostbiteConnection.RaiseEvent(this.RequestPacketAdminShutdown.GetInvocationList(), this, cpRecievedPacket);
     }
 }
        public void Shutdown() {

            if (this.m_connection != null) {
                this.m_connection.Shutdown();
                this.m_connection = null;
            }
        }
        private void m_connection_PacketReceived(FrostbiteLayerConnection sender, Packet packet) {

            if (packet.OriginatedFromServer == false && packet.IsResponse == false) {

                this.DispatchRequestPacket(sender, packet);
            }
            //else if (packet.OriginatedFromServer == true && packet.IsResponse == true) {
            //  Response to an event we sent.  We just accept these without processing them.  Should always be "OK".  
            //}
        }
        protected virtual void DispatchBanListAddRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {

            if (cpRecievedPacket.Words.Count >= 4) {

                CBanInfo newBan = new CBanInfo(cpRecievedPacket.Words[1], cpRecievedPacket.Words[2], new TimeoutSubset(cpRecievedPacket.Words.GetRange(3, TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3]))), cpRecievedPacket.Words.Count >= (4 + TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3])) ? cpRecievedPacket.Words[(3 + TimeoutSubset.RequiredLength(cpRecievedPacket.Words[3]))] : "");

                if (this.RequestBanListAddRecieved != null) {
                    FrostbiteConnection.RaiseEvent(this.RequestBanListAddRecieved.GetInvocationList(), this, cpRecievedPacket, newBan);
                }
            }
        }
        public FrostbiteLayerClient(FrostbiteLayerConnection connection) {
            this.Connection = connection;

            this.RequestDelegates = new Dictionary<string, RequestPacketHandler>() {
                { "login.plainText", this.DispatchLoginPlainTextRequest },
                { "login.hashed", this.DispatchLoginHashedRequest },
                { "logout", this.DispatchLogoutRequest },
                { "quit", this.DispatchQuitRequest },
                { "version", this.DispatchUnsecureSafeListedRequest },
                { "eventsEnabled", this.DispatchEventsEnabledRequest },
                { "help", this.DispatchHelpRequest },

                { "admin.runScript", this.DispatchSecureSafeListedRequest },
                { "punkBuster.pb_sv_command", this.DispatchPunkbusterRequest },
                { "serverInfo", this.DispatchUnsecureSafeListedRequest },
                { "admin.say", this.DispatchSecureSafeListedRequest },
                { "admin.yell", this.DispatchSecureSafeListedRequest },
                
                { "admin.runNextLevel", this.DispatchUseMapFunctionRequest },
                { "admin.currentLevel", this.DispatchSecureSafeListedRequest },
                { "admin.restartMap", this.DispatchUseMapFunctionRequest },
                { "admin.supportedMaps", this.DispatchSecureSafeListedRequest },
                { "admin.setPlaylist", this.DispatchAlterMaplistRequest },
                { "admin.getPlaylist", this.DispatchSecureSafeListedRequest },
                { "admin.getPlaylists", this.DispatchSecureSafeListedRequest },
                { "admin.listPlayers", this.DispatchSecureSafeListedRequest },
                { "listPlayers", this.DispatchSecureSafeListedRequest },
                { "admin.endRound", this.DispatchUseMapFunctionRequest },

                { "admin.runNextRound", this.DispatchUseMapFunctionRequest },
                { "admin.restartRound", this.DispatchUseMapFunctionRequest },

                { "banList.add", this.DispatchBanListAddRequest },
                { "banList.remove", this.DispatchAlterBanListRequest },
                { "banList.clear", this.DispatchAlterBanListRequest },
                { "banList.save", this.DispatchAlterBanListRequest },
                { "banList.load", this.DispatchAlterBanListRequest },
                { "banList.list", this.DispatchSecureSafeListedRequest },
                
                { "textChatModerationList.addPlayer", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.removePlayer", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.clear", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.save", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.load", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.list", this.DispatchSecureSafeListedRequest },

                #region Maplist

                { "mapList.configFile", this.DispatchAlterMaplistRequest },
                { "mapList.load", this.DispatchAlterMaplistRequest },
                { "mapList.save", this.DispatchAlterMaplistRequest },
                { "mapList.list", this.DispatchSecureSafeListedRequest },
                { "mapList.clear", this.DispatchAlterMaplistRequest },
                { "mapList.append", this.DispatchAlterMaplistRequest },
                { "mapList.nextLevelIndex", this.DispatchUseMapFunctionRequest },
                { "mapList.remove", this.DispatchAlterMaplistRequest },
                { "mapList.insert", this.DispatchAlterMaplistRequest },

                #endregion

                #region Configuration

                { "vars.adminPassword", this.DispatchVarsAdminPasswordRequest },
                { "vars.gamePassword", this.DispatchVarsRequest },
                { "vars.punkBuster", this.DispatchVarsRequest },
                { "vars.ranked", this.DispatchVarsRequest },
                { "vars.rankLimit", this.DispatchVarsRequest },
                { "vars.profanityFilter", this.DispatchVarsRequest },
                { "vars.idleTimeout", this.DispatchVarsRequest },
                { "vars.playerLimit", this.DispatchVarsRequest },
                { "vars.currentPlayerLimit", this.DispatchVarsRequest },
                { "vars.maxPlayerLimit", this.DispatchVarsRequest },

                #endregion

                #region Details

                { "vars.serverName", this.DispatchVarsRequest },
                { "vars.bannerUrl", this.DispatchVarsRequest },
                { "vars.serverDescription", this.DispatchVarsRequest },

                #endregion

                #region Gameplay

                { "vars.hardCore", this.DispatchVarsRequest },
                { "vars.friendlyFire", this.DispatchVarsRequest },

                #endregion

                #region Team Killing

                { "vars.teamKillCountForKick", this.DispatchVarsRequest },
                { "vars.teamKillValueForKick", this.DispatchVarsRequest },
                { "vars.teamKillValueIncrease", this.DispatchVarsRequest },
                { "vars.teamKillValueDecreasePerSecond", this.DispatchVarsRequest },

                #endregion

                #region Text Chat Moderation

                { "vars.textChatModerationMode", this.DispatchVarsRequest },
                { "vars.textChatSpamTriggerCount", this.DispatchVarsRequest },
                { "vars.textChatSpamDetectionTime", this.DispatchVarsRequest },
                { "vars.textChatSpamCoolDownTime", this.DispatchVarsRequest },

                #endregion

                #region Level Variables

                { "levelVars.set", this.DispatchVarsRequest },
                { "levelVars.get", this.DispatchVarsRequest },
                { "levelVars.evaluate", this.DispatchVarsRequest },
                { "levelVars.clear", this.DispatchVarsRequest },
                { "levelVars.list", this.DispatchSecureSafeListedRequest },

                #endregion

                { "admin.kickPlayer", this.DispatchAdminKickPlayerRequest },
                { "admin.killPlayer", this.DispatchAdminKillPlayerRequest },
                { "admin.movePlayer", this.DispatchAdminMovePlayerRequest },

                { "admin.shutDown", this.DispatchAdminShutDownRequest },
            };

            this.Connection.PacketReceived += new FrostbiteLayerConnection.PacketDispatchHandler(m_connection_PacketReceived);
            this.Connection.ConnectionClosed += new FrostbiteLayerConnection.EmptyParameterHandler(m_connection_ConnectionClosed);
        }
 protected virtual void DispatchAlterReservedSlotsListRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     if (this.RequestPacketAlterReservedSlotsListRecieved != null) {
         FrostbiteConnection.RaiseEvent(this.RequestPacketAlterReservedSlotsListRecieved.GetInvocationList(), this, cpRecievedPacket);
     }
 }
        public FrostbiteLayerClient(FrostbiteLayerConnection connection)
        {
            this.Connection = connection;

            this.RequestDelegates = new Dictionary <string, RequestPacketHandler>()
            {
                { "login.plainText", this.DispatchLoginPlainTextRequest },
                { "login.hashed", this.DispatchLoginHashedRequest },
                { "logout", this.DispatchLogoutRequest },
                { "quit", this.DispatchQuitRequest },
                { "version", this.DispatchUnsecureSafeListedRequest },
                { "eventsEnabled", this.DispatchEventsEnabledRequest },
                { "help", this.DispatchHelpRequest },

                { "admin.runScript", this.DispatchSecureSafeListedRequest },
                { "punkBuster.pb_sv_command", this.DispatchPunkbusterRequest },
                { "serverInfo", this.DispatchUnsecureSafeListedRequest },
                { "admin.say", this.DispatchSecureSafeListedRequest },
                { "admin.yell", this.DispatchSecureSafeListedRequest },

                { "admin.runNextLevel", this.DispatchUseMapFunctionRequest },
                { "admin.currentLevel", this.DispatchSecureSafeListedRequest },
                { "admin.restartMap", this.DispatchUseMapFunctionRequest },
                { "admin.supportedMaps", this.DispatchSecureSafeListedRequest },
                { "admin.setPlaylist", this.DispatchAlterMaplistRequest },
                { "admin.getPlaylist", this.DispatchSecureSafeListedRequest },
                { "admin.getPlaylists", this.DispatchSecureSafeListedRequest },
                { "admin.listPlayers", this.DispatchSecureSafeListedRequest },
                { "listPlayers", this.DispatchSecureSafeListedRequest },
                { "admin.endRound", this.DispatchUseMapFunctionRequest },

                { "admin.runNextRound", this.DispatchUseMapFunctionRequest },
                { "admin.restartRound", this.DispatchUseMapFunctionRequest },

                { "banList.add", this.DispatchBanListAddRequest },
                { "banList.remove", this.DispatchAlterBanListRequest },
                { "banList.clear", this.DispatchAlterBanListRequest },
                { "banList.save", this.DispatchAlterBanListRequest },
                { "banList.load", this.DispatchAlterBanListRequest },
                { "banList.list", this.DispatchSecureSafeListedRequest },

                { "textChatModerationList.addPlayer", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.removePlayer", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.clear", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.save", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.load", this.DispatchAlterTextMonderationListRequest },
                { "textChatModerationList.list", this.DispatchSecureSafeListedRequest },

                #region Maplist

                { "mapList.configFile", this.DispatchAlterMaplistRequest },
                { "mapList.load", this.DispatchAlterMaplistRequest },
                { "mapList.save", this.DispatchAlterMaplistRequest },
                { "mapList.list", this.DispatchSecureSafeListedRequest },
                { "mapList.clear", this.DispatchAlterMaplistRequest },
                { "mapList.append", this.DispatchAlterMaplistRequest },
                { "mapList.nextLevelIndex", this.DispatchUseMapFunctionRequest },
                { "mapList.remove", this.DispatchAlterMaplistRequest },
                { "mapList.insert", this.DispatchAlterMaplistRequest },

                #endregion

                #region Configuration

                { "vars.adminPassword", this.DispatchVarsAdminPasswordRequest },
                { "vars.gamePassword", this.DispatchVarsRequest },
                { "vars.punkBuster", this.DispatchVarsRequest },
                { "vars.ranked", this.DispatchVarsRequest },
                { "vars.rankLimit", this.DispatchVarsRequest },
                { "vars.profanityFilter", this.DispatchVarsRequest },
                { "vars.idleTimeout", this.DispatchVarsRequest },
                { "vars.playerLimit", this.DispatchVarsRequest },
                { "vars.currentPlayerLimit", this.DispatchVarsRequest },
                { "vars.maxPlayerLimit", this.DispatchVarsRequest },

                #endregion

                #region Details

                { "vars.serverName", this.DispatchVarsRequest },
                { "vars.bannerUrl", this.DispatchVarsRequest },
                { "vars.serverDescription", this.DispatchVarsRequest },

                #endregion

                #region Gameplay

                { "vars.hardCore", this.DispatchVarsRequest },
                { "vars.friendlyFire", this.DispatchVarsRequest },

                #endregion

                #region Team Killing

                { "vars.teamKillCountForKick", this.DispatchVarsRequest },
                { "vars.teamKillKickForBan", this.DispatchVarsRequest },
                { "vars.teamKillValueForKick", this.DispatchVarsRequest },
                { "vars.teamKillValueIncrease", this.DispatchVarsRequest },
                { "vars.teamKillValueDecreasePerSecond", this.DispatchVarsRequest },

                #endregion

                #region Text Chat Moderation

                { "vars.textChatModerationMode", this.DispatchVarsRequest },
                { "vars.textChatSpamTriggerCount", this.DispatchVarsRequest },
                { "vars.textChatSpamDetectionTime", this.DispatchVarsRequest },
                { "vars.textChatSpamCoolDownTime", this.DispatchVarsRequest },

                #endregion

                #region Level Variables

                { "levelVars.set", this.DispatchVarsRequest },
                { "levelVars.get", this.DispatchVarsRequest },
                { "levelVars.evaluate", this.DispatchVarsRequest },
                { "levelVars.clear", this.DispatchVarsRequest },
                { "levelVars.list", this.DispatchSecureSafeListedRequest },

                #endregion

                { "admin.kickPlayer", this.DispatchAdminKickPlayerRequest },
                { "admin.killPlayer", this.DispatchAdminKillPlayerRequest },
                { "admin.movePlayer", this.DispatchAdminMovePlayerRequest },

                { "admin.shutDown", this.DispatchAdminShutDownRequest },
            };

            this.Connection.PacketReceived   += new FrostbiteLayerConnection.PacketDispatchHandler(m_connection_PacketReceived);
            this.Connection.ConnectionClosed += new FrostbiteLayerConnection.EmptyParameterHandler(m_connection_ConnectionClosed);
        }
 protected virtual void DispatchVarsAdminPasswordRequest(FrostbiteLayerConnection sender, Packet cpRecievedPacket) {
     this.SendResponse(cpRecievedPacket, "UnknownCommand");
 }