• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Ping block 1.3
#1
Kick high pingers requested by @choobie
Add to sv_config.ini
Code:
[Ping]
Re-Check=5
//seconds after which ping is checked again
MaxPing=200
//Ping limit
MaxWarns=5
//Number of warnings followed by a kick
UsePermission=true
//Use permission plugin to get XUID protected from kick
ProtectedXuidKey=Admin_xuids
/Key of Permission plugin section with XUID of protected players.Use only when UsePermission is true


Attached Files
.rar   Ping 1.2.rar (Size: 2.53 KB / Downloads: 37)
.rar   Ping.rar (Size: 2.46 KB / Downloads: 31)
.rar   Ping 1.3.rar (Size: 3.1 KB / Downloads: 273)
[-] The following 2 users say Thank You to archit for this post:
  • choobie, JariZ
  Reply
#2
(10-01-2012, 12:30)archit Wrote: Kick high pingers requested by @choobie
Add to sv_config.ini
Code:
[Ping]
Re-Check=5
//seconds after which ping is checked again
MaxPing=200
//Ping limit
MaxWarns=5
//Number of warnings followed by a kick
[spoiler=CODE]
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4.  
  5. namespace Ping
  6. {
  7. public class Class1:CPlugin
  8. {
  9. System.Diagnostics.Stopwatch Time;
  10. int Seconds = 10;
  11. public override void OnServerLoad()
  12. {
  13. Time = new System.Diagnostics.Stopwatch();
  14. ServerPrint("Ping plugin by Archit loaded!");
  15. Time.Start();
  16. Seconds=int.Parse(GetServerCFG("Ping", "Re-Check", "10"));
  17. }
  18.  
  19. Dictionary<int, int> Warns = new Dictionary<int, int>();
  20. public override void OnPlayerDisconnect(ServerClient Client)
  21. {
  22. if (Warns.ContainsKey(Client.ClientNum))
  23. {
  24. Warns.Remove(Client.ClientNum);
  25. }
  26. }
  27. public override void OnServerFrame()
  28. {
  29. if (GetClients() != null && Time.Elapsed.Seconds == Seconds)
  30. {
  31. Time.Reset();
  32. Time.Start();
  33. foreach (ServerClient Client in GetClients())
  34. {
  35. if (Client.Ping > int.Parse(GetServerCFG("Ping", "MaxPing", "300")))
  36. {
  37. if (!Warns.ContainsKey(Client.ClientNum))
  38. {
  39. Warns.Add(Client.ClientNum, 1);
  40. }
  41. else if (Warns.ContainsKey(Client.ClientNum) && Warns[Client.ClientNum] < int.Parse(GetServerCFG("Ping", "MaxWarns", "5")))
  42. {
  43. Warns[Client.ClientNum]++;
  44. TellClient(Client.ClientNum, "Reduce your ping else you will be kicked", true);
  45. }
  46. else if (Warns[Client.ClientNum] == int.Parse(GetServerCFG("Ping", "MaxWarns", "5")))
  47. {
  48. ServerCommand("dropclient " + Client.ClientNum + " \"You have been kicked because of excess ping\"");
  49. Warns.Remove(Client.ClientNum);
  50. }
  51.  
  52. }
  53. }
  54. }
  55. }
  56. }
  57. }

Working now!Big Grin
Thanks alot. Awesome!
[RBC] Choobie

Ratbag Clan

  Reply
#3
archit, you can remove the flood in the console?

Code:
Client 3 is not active
Client 17 is not active
Client 16 is not active
Client 15 is not active
Client 14 is not active
Client 13 is not active
Client 12 is not active
Client 11 is not active
Client 10 is not active
Client 9 is not active
Client 8 is not active
Client 7 is not active
Client 6 is not active
  Reply
#4
My plugin doesn't print anything to console except the start up line
  Reply
#5
Hi

When map changes some players are kicked at random. Not every map change just like I said at random.Even though their pings are below 100.
Using your default settings in config. also tried setting re-check time higher but still did it.

[Ping]
Re-Check=5
//seconds after which ping is checked again
MaxPing=200
//Ping limit
MaxWarns=5
//Number of warnings followed by a kick
[RBC] Choobie

Ratbag Clan

  Reply
#6
(10-02-2012, 06:51)choobie Wrote: Hi

When map changes some players are kicked at random.
Even though there pings are below 100.
Using your default settings in config. also tried setting re-check time higher but still did it.

[Ping]
Re-Check=5
//seconds after which ping is checked again
MaxPing=200
//Ping limit
MaxWarns=5
//Number of warnings followed by a kick
That's because sometimes when you get connected your ping spikes to around 200+ more than your usual ping. (100 + 200 = 300)

(10-01-2012, 15:02)korsika Wrote: archit, you can remove the flood in the console?

Code:
Client 3 is not active
Client 17 is not active
Client 16 is not active
Client 15 is not active
Client 14 is not active
Client 13 is not active
Client 12 is not active
Client 11 is not active
Client 10 is not active
Client 9 is not active
Client 8 is not active
Client 7 is not active
Client 6 is not active
It's still active after kick wat ._.?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply
#7
(10-02-2012, 06:51)choobie Wrote: Hi

When map changes some players are kicked at random.
Even though there pings are below 100.
Using your default settings in config. also tried setting re-check time higher but still did it.

[Ping]
Re-Check=5
//seconds after which ping is checked again
MaxPing=200
//Ping limit
MaxWarns=5
//Number of warnings followed by a kick
Plugin updated but couldn't test as I can't recreate random kicking
  Reply
#8
v 1.2 no messages no warnings.
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#9
checked on Addon 2-07-2012 V1.206 1.4.382 is not compatible, flood console, but works.
difficult to connect to the server at the first attempt.

[Image: NOwr2.png]

(10-02-2012, 07:53)hillbilly Wrote: v 1.2 no messages no warnings.
check this


Attached Files
.rar   Ping_1.2.rar (Size: 2.48 KB / Downloads: 11)
  Reply
#10
(10-02-2012, 10:19)korsika Wrote: checked on Addon 2-07-2012 V1.206 1.4.382 is not compatible, flood console, but works.
difficult to connect to the server at the first attempt.

[Image: NOwr2.png]

(10-02-2012, 07:53)hillbilly Wrote: v 1.2 no messages no warnings.
check this

Check your plugins folder my plugin can't flood the console
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] Ping Warn Plugin v1.1 master131 28 13,415 07-10-2013, 09:34
Last Post: spike17
  ping warn 1.1, I passed from the server kpoviv 1 901 12-13-2012, 09:47
Last Post: XxBRxX
  Black Ops II IWI block decompression/decryption function kokole 7 2,168 12-07-2012, 22:53
Last Post: master131
  [Request] Anti block Plugin | Infected Kasperle 2 1,170 10-06-2012, 18:41
Last Post: DidUknowiPwn
  High Ping block still badly needed here choobie 6 1,690 10-01-2012, 12:22
Last Post: archit
  High ping blocker choobie 5 1,657 08-21-2012, 15:16
Last Post: choobie
  DLL PING WARN1.1 kpoviv 5 2,583 07-17-2012, 20:28
Last Post: narkos
  DLL PING WARN1.1 kpoviv 2 711 07-07-2012, 23:39
Last Post: JariZ
  [Request] Ping Text visible plugin b00mmolo 2 1,181 05-14-2012, 16:23
Last Post: b00mmolo
Lightbulb [Release] Core Ping plugin [updated to v1.0.2] Nerus 11 4,125 04-18-2012, 11:29
Last Post: Nerus

Forum Jump:


Users browsing this thread: 1 Guest(s)