Ip Ban!
Credits to Ultimatum
First...Search this ( It is in General.cs )
Code:
public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.txt", true);
and under it add...
Code:
public static string BannedIP = System.IO.File.ReadAllText(Application.StartupPath + @"\IPBanList.txt");
Code:
if (Auth != 0) { General.WriteLine("Successful login for account " + ThisAcc);
Code:
if (Auth != 0) { if (BannedIP.Contains(Ip)) { Socket.Disconnect(); } Console.ForegroundColor = ConsoleColor.Blue; General.WriteLine("Successful login for account " + ThisAcc + " IP: " + Ip); Console.ResetColor(); Console.ForegroundColor = ConsoleColor.White;
called IPBanList
Now when someone logins to your server you will see their account name and also their IP so just put the ip in the text document
ONE IP PER LINE!!!
and save it and restart server and that person will not be able to login
if this doesnt work please tell me and i will see why
even though this is Ultimatums press thanks if this helped and if he posts here then press thanks to him instead of me!