Example #1
0
        public void OnBanRemoved(CBanInfo cbiUnban) {

        }
Example #2
0
 public override void OnBanAdded(CBanInfo ban)
 {
     if (!this.isEnabled || !this.useBanEnforcer) return;
     //this.DebugWrite("OnBanAdded fired", 6);
     //this.ExecuteCommand("procon.protected.send", "banList.list");
 }
Example #3
0
        public void OnPunkbusterBanInfo(CBanInfo cbiPunkbusterBan) {

        }
Example #4
0
        public void OnBanAdded(CBanInfo cbiBan) {

        }
 public void Game_BanListAdd(FrostbiteClient sender, CBanInfo ban) {
     this.InvokeIfRequired(() => this.BansSource.Append(ban));
 }
        private ListViewItem CreateBanEntry(CBanInfo cbiPlayerBan) {

            ListViewItem lviNewBanEntry = null;

            if (String.Compare("name", cbiPlayerBan.IdType, true) == 0 || String.Compare("persona", cbiPlayerBan.IdType, true) == 0) {
                lviNewBanEntry = this.CreateBlankBanEntry(String.Format("{0}\r\n\r\n", cbiPlayerBan.SoldierName));
                lviNewBanEntry.Text = cbiPlayerBan.Offset.HasValue == true ? (cbiPlayerBan.Offset.Value + 1).ToString(CultureInfo.InvariantCulture) : "-";

                lviNewBanEntry.SubItems["name"].Text = cbiPlayerBan.SoldierName;

                lviNewBanEntry.SubItems["type"].Tag = cbiPlayerBan.IdType;
                lviNewBanEntry.SubItems["type"].Text = this.GetFriendlyTypeName(cbiPlayerBan.IdType);

                //lviNewBanEntry.SubItems["banlength"].Tag = cbiPlayerBan.BanLength;
                lviNewBanEntry.SubItems["timeremaining"].Tag = cbiPlayerBan.BanLength;

                lviNewBanEntry.SubItems["reason"].Text = cbiPlayerBan.Reason;
            }
            else if (String.Compare("ip", cbiPlayerBan.IdType, true) == 0) {

                lviNewBanEntry = this.CreateBlankBanEntry(String.Format("\r\n{0}\r\n", cbiPlayerBan.IpAddress));
                lviNewBanEntry.Text = cbiPlayerBan.Offset.HasValue == true ? (cbiPlayerBan.Offset.Value + 1).ToString(CultureInfo.InvariantCulture) : "-";

                lviNewBanEntry.SubItems["name"].Text = cbiPlayerBan.SoldierName;
                lviNewBanEntry.SubItems["ip"].Text = cbiPlayerBan.IpAddress;

                lviNewBanEntry.SubItems["type"].Tag = cbiPlayerBan.IdType;
                lviNewBanEntry.SubItems["type"].Text = this.GetFriendlyTypeName(cbiPlayerBan.IdType);

                //lviNewBanEntry.SubItems["banlength"].Tag = cbiPlayerBan.BanLength;
                lviNewBanEntry.SubItems["timeremaining"].Tag = cbiPlayerBan.BanLength;

                lviNewBanEntry.SubItems["reason"].Text = cbiPlayerBan.Reason;

            }
            else if (String.Compare("guid", cbiPlayerBan.IdType, true) == 0) {

                lviNewBanEntry = this.CreateBlankBanEntry(String.Format("\r\n\r\n{0}", cbiPlayerBan.Guid));
                lviNewBanEntry.Text = cbiPlayerBan.Offset.HasValue == true ? (cbiPlayerBan.Offset.Value + 1).ToString(CultureInfo.InvariantCulture) : "-";

                lviNewBanEntry.SubItems["name"].Text = cbiPlayerBan.SoldierName;
                lviNewBanEntry.SubItems["guid"].Text = cbiPlayerBan.Guid;
                lviNewBanEntry.SubItems["ip"].Text = cbiPlayerBan.IpAddress;

                lviNewBanEntry.SubItems["type"].Tag = cbiPlayerBan.IdType;
                lviNewBanEntry.SubItems["type"].Text = this.GetFriendlyTypeName(cbiPlayerBan.IdType);

                //lviNewBanEntry.SubItems["banlength"].Tag = cbiPlayerBan.BanLength;
                lviNewBanEntry.SubItems["timeremaining"].Tag = cbiPlayerBan.BanLength;

                lviNewBanEntry.SubItems["reason"].Text = cbiPlayerBan.Reason;
            }

            else if (String.Compare("pbguid", cbiPlayerBan.IdType, true) == 0) {

                lviNewBanEntry = this.CreateBlankBanEntry(String.Format("\r\n\r\n{0}", cbiPlayerBan.Guid));
                lviNewBanEntry.SubItems["name"].Text = cbiPlayerBan.SoldierName;
                lviNewBanEntry.SubItems["guid"].Text = cbiPlayerBan.Guid;
                lviNewBanEntry.SubItems["ip"].Text = cbiPlayerBan.IpAddress;

                lviNewBanEntry.SubItems["type"].Tag = cbiPlayerBan.IdType;
                lviNewBanEntry.SubItems["type"].Text = this.GetFriendlyTypeName(cbiPlayerBan.IdType);

                //lviNewBanEntry.SubItems["banlength"].Tag = cbiPlayerBan.BanLength;
                lviNewBanEntry.SubItems["timeremaining"].Tag = cbiPlayerBan.BanLength;

                lviNewBanEntry.SubItems["reason"].Text = cbiPlayerBan.Reason.TrimEnd('"'); ;
            }

            return lviNewBanEntry;
        }
 public void OnPbGuidBan(PRoConClient sender, CBanInfo ban) {
     this.InvokeIfRequired(() => this.BansSource.Append(ban));
 }
 public void OnPbGuidUnban(CBanInfo unbanned) {
     this.InvokeIfRequired(() => {
         this.BansSource.Remove(unbanned);
     
         this.OnSettingResponse("local.banlist.unban", true);
     });
 }
        public void OnUnban(FrostbiteClient sender, CBanInfo unbanned) {
            this.InvokeIfRequired(() => { 
                this.BansSource.Remove(unbanned);

                this.OnSettingResponse("local.banlist.unban", true);
            });
        }
        private void m_prcClient_PunkbusterPlayerUnbanned(PRoConClient sender, CBanInfo unbanned) {
            this.InvokeIfRequired(() => {
                this.BansSource.Remove(unbanned);

                this.OnSettingResponse("local.banlist.unban", true);
            });
        }
Example #11
0
 public override void OnBanAdded(CBanInfo ban) {
     if (!_pluginEnabled || !_UseBanEnforcer)
         return;
     //DebugWrite("OnBanAdded fired", 6);
     ExecuteCommand("procon.protected.send", "banList.list");
 }