AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   High Ping Kicker - Lite Edition (https://forums.alliedmods.net/showthread.php?t=79147)

Liam 10-17-2008 18:55

High Ping Kicker - Lite Edition
 
1 Attachment(s)
/* Notes */
This plugin was written to enable server admins to enforce a maximum ping that players can have. It takes the players cmdrate and the servers tickrate into account when doing this. It will not check players who are currently connecting or are not on a team.

Server Config Information: http://forums.srcds.com/viewtopic/1094 -- Thanks to |GsX| GrimReaper for finding that article.

This plugin has been compiled and tested on both non-orange box and the orange box servers, and requires SM 1.0.x or 1.1.x. Those can be downloaded at: http://www.sourcemod.net/snapshots.php

/* Installation */
Compile the attached file and place it in the <mod>/addons/sourcemod/plugins folder and either change the map on your server or type sm plugins load hpk_lite.

The Config file is located in <mod>/cfg/sourcemod/hpk_lite.cfg. Edit the settings within that to control the variables of the plugin itself.

/* ConVars */
sm_hpk_enabled "1" Enable the HPK. 1 = On | 0 = Off
sm_maxping "150" Maximum ping allowed by clients.
sm_maxchecks "15" Number of grace checks allowed by the HPK before kicking a client.
sm_startcheck "60" Amount of time in seconds before starting to check pings on map start.
sm_adminsimmune "1" Admins immune. 1 = On | 0 = Off

/* Changelog */
1.0.0.0
---Initial Release
1.0.0.1
---Changed the default poll time to 15 seconds.
---Changed the default amount of checks to 10.

sirmoe 10-17-2008 20:41

Re: High Ping Kicker - Lite Edition
 
finally, a simple ping kicker that *hopefully* works!


Big thanks!

DataMatrix 10-18-2008 03:36

Re: High Ping Kicker - Lite Edition
 
Cheers Liam! I didn't want any choke/loss etc checking so this is perfect :)

exvel 10-18-2008 07:51

Re: High Ping Kicker - Lite Edition
 
Nice plugin.
Liam, why most part of your plugins are not multilangual? :(

CrimsonGT 10-18-2008 12:53

Re: High Ping Kicker - Lite Edition
 
Probably because he doesnt know any other languages. Im sure if you translate it he would add it.

Lebson506th 10-18-2008 13:46

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by CrimsonGT (Post 701686)
Probably because he doesnt know any other languages. Im sure if you translate it he would add it.

I think what he means is that the plugin isn't coded to be translatable.

There are no localizations built in to it.

Liam 10-18-2008 14:41

Re: High Ping Kicker - Lite Edition
 
It uses the default language pack, the rest are hard coded. If you all want me to add translations in, I'll be glad to.

tftpapst 10-18-2008 16:09

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by Liam (Post 701737)
It uses the default language pack, the rest are hard coded. If you all want me to add translations in, I'll be glad to.

We want :)

And i want the Full Edition soon :wink: (Also with translation in)

Liam 10-18-2008 18:19

Re: High Ping Kicker - Lite Edition
 
You all are needy. :P

I had to format my pc. I'll get to work on the full edition shortly.

sessus 10-18-2008 18:56

Re: High Ping Kicker - Lite Edition
 
hehe Liam.

There is no need for translations for this Lite edition. The only thing it will put out (I believe) is 'Kicked for high ping'. So you guys really want just one line to be translated.
Translations probably male more sense for the 'Advanced Edition' once Liam pumps it out.

Btw: Thanks for this lite version of the HPK. It is a mystery why SM doesn't have a built in plugin already. Anyways, keep up the great work.

Derek 10-18-2008 21:37

Re: High Ping Kicker - Lite Edition
 
Thank God! Thanks for this plugin.

exvel 10-19-2008 09:16

Re: High Ping Kicker - Lite Edition
 
Quote:

The only thing it will put out (I believe) is 'Kicked for high ping'. So you guys really want just one line to be translated.
Yes, we want. :)

Bugsy 10-19-2008 09:51

Re: High Ping Kicker - Lite Edition
 
I'm getting a compile error for the below. I don't see a missing parenthesis or semi-colon though.

PHP Code:

119    new Float:tickRate GetTickInterval();
120    new cmdRate UMIN(StringToInt(rate), 20);
121
122    ping 
-= ((0.5 cmdRate) + (tickRate 1.0)); 

Code:

SourcePawn Compiler 1.0.3
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

C:\Program Files\Pawn Studio\temp961.sp(120) : error 001: expected token: ")", but found ";"
C:\Program Files\Pawn Studio\temp961.sp(122) : error 001: expected token: ";", but found "-identifier-"

2 Errors.

Compilation Time: 0.92 sec


Stinkyfax 10-19-2008 13:54

Re: High Ping Kicker - Lite Edition
 
i put sm_maxping 200 in sourcemod.cfg but it still gives me 150 when i check in console as long as i do not exec sourcemod.cfg again.

Liam 10-19-2008 14:06

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by Bugsy (Post 702139)
I'm getting a compile error for the below. I don't see a missing parenthesis or semi-colon though.

PHP Code:

119    new Float:tickRate GetTickInterval();
120    new cmdRate UMIN(StringToInt(rate), 20);
121
122    ping 
-= ((0.5 cmdRate) + (tickRate 1.0)); 

Code:

SourcePawn Compiler 1.0.3
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
 
C:\Program Files\Pawn Studio\temp961.sp(120) : error 001: expected token: ")", but found ";"
C:\Program Files\Pawn Studio\temp961.sp(122) : error 001: expected token: ";", but found "-identifier-"
 
2 Errors.
 
Compilation Time: 0.92 sec


I had the same problem. I had to update my spcomp / compile programs with the latest version.

Liam 10-19-2008 14:07

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by Stinkyfax (Post 702251)
i put sm_maxping 200 in sourcemod.cfg but it still gives me 150 when i check in console as long as i do not exec sourcemod.cfg again.

Read the directions?

Change it in hpk_lite.cfg

Stinkyfax 10-20-2008 03:51

Re: High Ping Kicker - Lite Edition
 
oh, it might auto created hpk_lite.cfg? now it's working fine, thanks.

DataMatrix 10-20-2008 11:05

Re: High Ping Kicker - Lite Edition
 
Hi Liam.

This does not work in Zombie Panic Source.

A guy with 500 ping stayed in the server even though max ping was set to 300...

Any ideas?

Liam 10-20-2008 13:51

Re: High Ping Kicker - Lite Edition
 
Uh. Never played that. Never tested that. Dunno what to tell you?

DataMatrix 10-21-2008 05:15

Re: High Ping Kicker - Lite Edition
 
I was hoping you'd be able to fix it :P

Liam 10-21-2008 08:28

Re: High Ping Kicker - Lite Edition
 
Put some debug messages in the code and show me the output.

BrutalGoerge 10-23-2008 13:20

Re: High Ping Kicker - Lite Edition
 
what flag gets the protection?
I had an admin with abcdjkso
and an admin with z connected to my tf2 server, both on my network, and happened to be above max_ping.

The abcdjkso admin got ping-kicked, and the z admin didn't

gH0sTy 10-23-2008 15:01

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by DataMatrix (Post 702578)
Hi Liam.

This does not work in Zombie Panic Source.

A guy with 500 ping stayed in the server even though max ping was set to 300...

Any ideas?

Same for me with ZPS... switched back to the old High Ping Kicker because this one works.
Quote:

Originally Posted by BrutalGoerge (Post 703988)
what flag gets the protection?
I had an admin with abcdjkso
and an admin with z connected to my tf2 server, both on my network, and happened to be above max_ping.

The abcdjkso admin got ping-kicked, and the z admin didn't

This plugin doesn't check the flags, it simply checks if some1 is admin or not.

BrutalGoerge 10-23-2008 19:36

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by gH0sTy (Post 704051)
This plugin doesn't check the flags, it simply checks if some1 is admin or not.

In other words, the b flag. :p

After I made that post though, it kicked the root admin out for having high ping, and I have admins immune set to 1 in the hpk lite cfg.

DontWannaName 10-23-2008 23:10

Re: High Ping Kicker - Lite Edition
 
Is it possible to change the flag to reservation somewhere?

Alderman [3rd MD] 11-08-2008 18:40

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by DontWannaName (Post 704260)
Is it possible to change the flag to reservation somewhere?

The .sp file. Then recompile it.

Alderman [3rd MD] 11-08-2008 18:46

Re: High Ping Kicker - Lite Edition
 
Now I was running this on our INS server. No errors but doesn't seem to be doing anything what so ever.

DontWannaName 11-09-2008 00:31

Re: High Ping Kicker - Lite Edition
 
I think anyone with any flag is immune since its just checking admin unless thats just the general flag.

zhelev81 11-09-2008 06:45

Re: High Ping Kicker - Lite Edition
 
Liam can you please add a white list where we can put id's so non admins can also get high ping protection ?

Tnx for the great job,it's working perfect :)

sessus 11-09-2008 18:37

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by zhelev81 (Post 711907)
Liam can you please add a white list where we can put id's so non admins can also get high ping protection ?

Tnx for the great job,it's working perfect :)


You can do that yourself by edeting the custom flag that is used to give ping immunity and then adding the steam_ids with the custom flag to you admin flat file or database.

zhelev81 11-09-2008 19:26

Re: High Ping Kicker - Lite Edition
 
I'm not very good at this things :(

sessus 11-10-2008 06:58

Re: High Ping Kicker - Lite Edition
 
Just have a look through the source code of the plugin. Whenever I do that I have no idea what all the things mean but once you see something being set with 'flags' in there, just check out what flag is being used. You can change that and recompile the plugin using the compiler that is on the main page (sourcemod.com).

sessus 11-10-2008 09:32

Re: High Ping Kicker - Lite Edition
 
Quote:

Originally Posted by Lebson506th (Post 712311)
If you want to turn Warmup off, look in the code.

Find "#define WARMUP 1" and change the 1 to a 0.

Then compile it.

wrong thread? ;)

scam 11-13-2008 09:28

Re: High Ping Kicker - Lite Edition
 
I have a 2 32 man TF2 server and I am new at all this. I've been able to put all the mods on my server but reading how to install this I am lost when you state that I have to re compile your mod. And I cannot find the .cfg you are talking about?

Please don't flame, I am trying to understand all this.

scam 11-13-2008 11:20

Re: High Ping Kicker - Lite Edition
 
Nevermind I figured it out.

Thanks for all the help :P

BrutalGoerge 11-13-2008 13:39

Re: High Ping Kicker - Lite Edition
 
Someone connected last night, and was well above the maxping setting the whole time it seemed, yet it didn't kick her.

She was sometimes as high as 600ms O_o

DontWannaName 11-13-2008 17:05

Re: High Ping Kicker - Lite Edition
 
Yes but what was her real ping? sm_rates or something.

Liam 11-13-2008 18:09

Re: High Ping Kicker - Lite Edition
 
If her cmdrate is too low it'll throw it off.

retsam 11-14-2008 23:46

Re: High Ping Kicker - Lite Edition
 
Just fyi, this wont compile on SM 1.1.0.2419


//// hpk_lite.sp
// hpk_lite.sp(120) : error 001: expected token: ")", but found ";"
// hpk_lite.sp(122) : error 001: expected token: ";", but found "-identifier-"
//
// 2 Errors.
//
// Compilation Time: 0.28 sec


Which looks like this line, which I dont see what its looking at:

new cmdRate = UMIN(StringToInt(rate), 20);


and this line.

ping -= ((0.5 / cmdRate) + (tickRate * 1.0));

gH0sTy 11-15-2008 00:27

Re: High Ping Kicker - Lite Edition
 
It compiles without any errors with the latest 1.1 snapshot so get the latest snapshot to compile it.


All times are GMT -4. The time now is 07:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.