03-04-2012, 18:42
Code:
using System.Collections.Generic;
using System.IO;
using Addon;
namespace YuBan
{
public class PPack : CPlugin
{
List<string> banned = new List<string>();
public override void OnServerLoad()
{
ServerPrint("Yurio Ban Plugin v1.0 loaded");
}
public override void OnMapChange()
{
banned.Clear();
foreach(string str in File.ReadAllLines(@"main\permanent.ban"))
if (str.Length > 15) { banned.Add(str.Substring(0, 16)); }
}
public override void OnPlayerConnect(ServerClient Client)
{
if (banned.Contains(Client.XUID))
{
ServerCommand("dropclient " + Client.ClientNum);
ServerPrint("Illegal access attempt: " + Client.Name + " with " + Client.XUID);
}
}
}
}

![[Image: banqm.jpg]](http://img849.imageshack.us/img849/6591/banqm.jpg)

