Release Yurio Ban Plugin
#1
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); } } } }


Attached Files
.zip   YuBan.zip (Size: 1.9 KB / Downloads: 203)
Reply

#2
hi there just wondering if this is to be used with an already made cmd as in !banc or !ban or is there another trigger
or is it a plugin that reads the permanent.ban and actually bans?
sorry if it's a newbie question thanks
Reply

#3
This plugin does not demand configuring and does not use any commands. He struggles with the Big Ban Bug.

[Image: banqm.jpg]
Reply

#4
Nice work, +rep

Psst:
Code:
public override string OnCheckBan(string xuid) { if (banned.Contains(xuid)) return "banned string..."; return null; }

So instead of letting them connect & load everything, deny connection before that.

[Image: b_560_95_1.png]
Reply

#5
thanks for the quick reply yurio
Reply

#6
great!
+ rep
[Image: c2ship5_sig.png]
Reply

#7
+rep
Reply

#8
when i try this the permission plugin doesn't work?
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#9
@hillbilly
Cannot be. These plugins do not interact among themselves, they generally are not connected in any way.



(03-04-2012, 20:34)Nukem Wrote: So instead of letting them connect & load everything, deny connection before that.

Thanks @Nukem Wink
I allow them to be connected. But then they are waited by my small surprise Troll
Reply

#10
Again good work m8 +rep well deserved keep it up man Rolleyes
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,494 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,593 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,808 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,643 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,295 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 82,123 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,160 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,655 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,656 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,978 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.