Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- }
- public static void CheckHWID(string currentClientData)
- {
- try
- {
- ConsoleSdtd console = CommonMappingFunctions.GetGameManager().m_GUIConsole;
- Log.Out("\n\nChecking HWID: \nClientID:" + currentClientData.m_clientID + "\nEntityID:" + currentClientData.m_entityId + "\nIP:" + currentClientData.m_ip + "\nSteamID:" + currentClientData.m_steamId + "\nName:" + currentClientData.m_name);
- //Check if player has HWID and is not banned 0 for good 1 for banned
- string result = "";
- if (currentclientdata.m_name != null)
- {
- result = netconnections.servers.web.web.getpostrn("http://www.rammnet.com/ucp/remote/public.php", "name", currentclientdata.m_name, "field", "banned");
- }
- log.out("hwid result :" + result);
- switch (result)
- {
- case "online":
- break;
- case "banned":
- case "ban_reason":
- case "banned_by":
- Command_ban banCommand = new Command_ban(console, CommonMappingFunctions.GetGameManager());
- Log.Out("Player " + currentClientData.m_name + " (" + currentClientData.m_steamId + ")" + " KICKED!");
- string[] steamidtoban = new string[3] { currentClientData.m_steamId, "1", "minutes" };
- banCommand.Run(steamidtoban);
- break;
- case "sdtd":
- break;
- case "rust":
- break;
- case "hwid":
- Command_ban banCommand = new Command_ban(console, CommonMappingFunctions.GetGameManager());
- string[] steamidtoban = new string[3] { currentClientData.m_steamId, "10", "years" };
- banCommand.Run(steamidtoban);
- Log.Out("Player " + currentClientData.m_name + " (" + currentClientData.m_steamId + ")" + " BANNED!!!");
- break;
- case "registered":
- break;
- case "Nope.":
- Command_ban banCommand = new Command_ban(console, CommonMappingFunctions.GetGameManager());
- Log.Out("Player " + currentClientData.m_name + " (" + currentClientData.m_steamId + ")" + " KICKED!");
- string[] steamidtoban = new string[3] { currentClientData.m_steamId, "1", "minutes" };
- banCommand.Run(steamidtoban);
- break;
- default:
- Log.Out("DB CONNECTION ERROR - Player " + currentClientData.m_name + " (" + currentClientData.m_steamId + ")" + " allowed");
- break;
- }
- }
- catch (Exception e)
- {
- Log.Out("Error in AllocsLogFunctions.CheckHWID: " + e);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement