public void anticheatinc()
{
WebClient client = new WebClient();
string reply2 = client.DownloadString("http://www.anticheatinc.net/forums/bansearch.php?search=" + nombre + "&game=BF3&submit=Submit");
int firstCharacter2 = reply2.IndexOf("result found");
if (firstCharacter2 == -1)
{
string reply4 = client.DownloadString("http://www.anticheatinc.net/forums/bansearch.php?search=" + nombre + "&game=BFH&submit=Submit");
int firstCharacter4 = reply4.IndexOf("result found");
if (firstCharacter4 == -1)
{
string reply3 = client.DownloadString("http://www.anticheatinc.net/forums/bansearch.php?search=" + nombre + "&game=BF4&submit=Submit");
int firstCharacter3 = reply3.IndexOf("result found");
if (firstCharacter3 == -1)
{
if ((this.m_bDebug == true) && (dlevel >= 0)) { WriteDebugConsole(nombre + " anticheatinc.net is Clear"); }
}
else
{
where = "anticheatinc.net BF4";
this.ExecuteCommand("procon.protected.send", "banList.add", "guid", eaguid, "perm", banmsg +" (anticheatinc.net BF4)");
this.ExecuteCommand("procon.protected.send", "admin.say", "Player " + nombre + "Banned by TG Anticheat " + GetPluginVersion(), "all");
detected1();
sms();
}
}
else
{
where = "anticheatinc.net BFH";
this.ExecuteCommand("procon.protected.send", "banList.add", "guid", eaguid, "perm", banmsg +" (anticheatinc.net BFH)");
this.ExecuteCommand("procon.protected.send", "admin.say", "Player " + nombre + "Banned by TG Anticheat " + GetPluginVersion(), "all");
detected1();
sms();
}
}
else
{
where = "anticheatinc.net BF3";
this.ExecuteCommand("procon.protected.send", "banList.add", "guid", eaguid, "perm", banmsg + " (anticheatinc.net BF3)");
this.ExecuteCommand("procon.protected.send", "admin.say", "Player " + nombre + "Banned by TG Anticheat " + GetPluginVersion(), "all");
detected1();
sms();
}
}
/// <summary>
/// /////////////////////////////////////////
/// </summary>
public void whitelist()
{
System.IO.File.Delete("Plugins/BF4/TGWhitelist.ini");
for (int i = 0; i < Convert.ToInt16(lstUserList1.Count); i++)
{
StreamWriter WriteReportFile = File.AppendText("Plugins/BF4/TGWhitelist.ini");
WriteReportFile.WriteLine(lstUserList1[i]);
WriteReportFile.Close();
}
}
public override void OnServerInfo(CServerInfo csiServerInfo)
{
this.serverName = csiServerInfo.ServerName;
}
public void OnPluginLoaded(string strHostName, string strPort, string strPRoConVersion )
{
this.m_strHostName = strHostName;
this.m_strPort = strPort;
jport = strHostName;
this.m_strPRoConVersion = strPRoConVersion;
this.RegisterEvents(this.GetType().Name, "OnListPlayers", "OnServerInfo", "OnPlayerLeft", "OnPlayerJoin", "OnGlobalChat", "OnTeamChat", "OnSquadChat", "OnLevelLoaded", "OnPlayerAuthenticated", "OnPunkbusterPlayerInfo", "OnPlayerKilled", "OnPlayerSpawned" );
}
public void OnListPlayers(List<CPlayerInfo> players, CPlayerSubset subset)
{
if (subset.Subset == CPlayerSubset.PlayerSubsetType.All)
{
this.PlayerList.Clear();
foreach (CPlayerInfo p in players)
{
this.PlayerList.Add(p.SoldierName, p);
}
}
}