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
Rainbow [Release] Plugin ReservedSlot v1.3 frst_ 1 4,996 11-08-2018, 19:17
Last Post: frst_
Tongue [Release] MW3 Shop plugin Dude 56 51,301 03-25-2018, 05:18
Last Post: [email protected]
  [Release] Permission plugin Pozzuh 202 163,920 05-01-2017, 15:41
Last Post: W4R||The Hyper
  [Release] FIXED SPEED PLUGIN hillbilly 2 5,656 06-02-2016, 20:23
Last Post: clacki
  [Release] Bots Plugin For Users Casper 22 39,849 08-22-2015, 17:45
Last Post: SnapBacks
  [Release] God Plugin v5.0 [Ingame Rcon Tool] OzonE 464 335,775 06-27-2015, 15:38
Last Post: bluedot
  [Release] Anti Hardscope Plugin 8q4s8 26 27,593 06-20-2015, 22:44
Last Post: urj88419
  [Release] ProMod Plugin zxz0O0 875 761,608 03-25-2015, 22:02
Last Post: kris
  [Release] [Discontinued] Speed Plugin Pozzuh 164 121,944 10-06-2014, 12:56
Last Post: Nekochan
  [help]how create a ping plugin clacki 3 5,076 09-13-2014, 01:23
Last Post: clacki

Forum Jump:


Users browsing this thread:
1 Guest(s)

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