Thread Rating:
  • 6 Vote(s) - 4.17 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Yurio Ban Plugin
#1
CSHARP Code
  1. using System.Collections.Generic;
  2. using System.IO;
  3. using Addon;
  4.  
  5. namespace YuBan
  6. {
  7. public class PPack : CPlugin
  8. {
  9. List<string> banned = new List<string>();
  10.  
  11. public override void OnServerLoad()
  12. {
  13. ServerPrint("Yurio Ban Plugin v1.0 loaded");
  14. }
  15.  
  16. public override void OnMapChange()
  17. {
  18. banned.Clear();
  19. foreach(string str in File.ReadAllLines(@"main\permanent.ban"))
  20. if (str.Length > 15) { banned.Add(str.Substring(0, 16)); }
  21. }
  22.  
  23. public override void OnPlayerConnect(ServerClient Client)
  24. {
  25. if (banned.Contains(Client.XUID))
  26. {
  27. ServerCommand("dropclient " + Client.ClientNum);
  28. ServerPrint("Illegal access attempt: " + Client.Name + " with " + Client.XUID);
  29. }
  30. }
  31. }
  32. }


Attached Files
.zip   YuBan.zip (Size: 1.9 KB / Downloads: 178)
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:
CSHARP Code
  1. public override string OnCheckBan(string xuid)
  2. {
  3. if (banned.Contains(xuid))
  4. return "banned string...";
  5.  
  6. return null;
  7. }


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 3,905 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,375 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 38,471 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,276 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 4,660 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 57,916 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 17,439 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 2,536 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 30,696 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 2,863 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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