02-18-2010, 11:08 PM (This post was last modified: 02-18-2010, 11:12 PM by css.)
(02-18-2010, 05:12 PM)fugitif Wrote:
(02-18-2010, 05:01 PM)css Wrote: It kicks based on median.
Why not kick it then? I check the stats, and rate_median is well below 18.
This is due to code?
Code:
if ($player->{rate_median} > 17 &&
$player->{rate_median} < 18.5) {
_msg(sprintf('Alt-tab Windows immunity on low rate player ' .
'"%s" (address: %s) (rate median: %.1f) on "%s"',
$player->{uniqueid},
$player->{address},
$player->{rate_median},
$server->{name}));
next;
}
It might be. Do you see messages like "Alt-tab Windows immunity ..." in the console?
The logic in the "alt-tab immunity" is that the rate drops between 17 - 18.5 / s while in Windows. The mean rate thus drops falls to 17 - 18.5 at some point and then the player is correctly recognized as being in Windows. If the rate fluctuates in fact around 17 - 19 / s, then the chances are that the player sometimes gets median rate outside the 17 - 18.5 /s margin.
If the rate is less than 17, then the player should get kicked.
02-19-2010, 09:13 AM (This post was last modified: 02-19-2010, 09:22 AM by fugitif.)
Hello,
I did another test and it really kick anyone.
I put the samples at 10 and ratelimit to 18 and now 2 players who should be kicker when he does not.
84 samples should not be enough to kick?
Code:
Name Min Avg Median Max Last Quality Ping Sample Connected
[GB]Cyberzane 12.8 14.2 14.2 15.5 14.2 LOW 94 84 2481 sec
[GB]Lilith 21.8 26.3 27.3 29.7 26.6 OK 97 84 1331 sec
[GB]๖þHºßا 9.1 10.6 10.7 12.7 10.8 LOW 110 84 1933 sec
Does it say in the console that "Kick&banned PLAYER ....."?
Make sure you don't have $CONF = { ... monitoring => 1 ... }. Then also check the new variable %servers = { playerlimit => 1 }. The playerlimit means that the system doesn't kick anyone unless there are at least that number of players. That way your server stays populated even if someone has low rate.
02-20-2010, 03:10 AM (This post was last modified: 02-20-2010, 03:12 AM by fugitif.)
(02-20-2010, 12:15 AM)css Wrote: Does it say in the console that "Kick&banned PLAYER ....."?
Make sure you don't have $CONF = { ... monitoring => 1 ... }. Then also check the new variable %servers = { playerlimit => 1 }. The playerlimit means that the system doesn't kick anyone unless there are at least that number of players. That way your server stays populated even if someone has low rate.
No, there is no Kick&banned in the console.
Here is my config
I read through the code lines again and it seems the players were actually kicked based on rate_max. I changed it on the 'net version and on my own local version to the rate_median. However, it doesn't explain why the player wasn't kicked.
Enable debugging in the script by chaning the line "my $DEBUG = 0" to "my $DEBUG = 1". Then the system will print lots of stuff about what it is doing. You should see lines like: "Kicking player (address: 1.2.3.4:1234) from MyServer" and "Finished kicking ...". There will be also lots of other "useless" information about when the system opens rcon connection and stuff like that.
As a bright side I'm glad to see that the script is easy enough to make some small modifications to suit your own requirements. I'd be happy to hear some feedback about how easy it's been to find and reconfigure the required values to set eg. "LOW" or "OK" ratelimits. I haven't put too much stuff in the %CONF and %servers to keep the system easy to install, but now it seems maybe a normal ratetables.conf in addition to the script itself would be good idea. It could hold more configuration options. What do you think?
The "error" is that the screen is already attached from another console. Usually it happens if you have two SSH connections to the server and you've already opened the same screen. Then if the connection breaks the screen is left in "attached" state although the SSH connection is lost.
You can fix the problem by forcing the screen to be detached and reattached:
Code:
screen -r -DD rates
Also one of the most usable screen usage scenarios is to use "shared" screen. You can open the same screen with "screen -x rates" from two or more SSH connections. The "-x" option tells screen to allow the screen session to be shared.
02-22-2010, 11:51 PM (This post was last modified: 02-23-2010, 12:07 AM by fugitif.)
(02-20-2010, 04:36 AM)css Wrote: Hmm.. That is weird.
I read through the code lines again and it seems the players were actually kicked based on rate_max. I changed it on the 'net version and on my own local version to the rate_median. However, it doesn't explain why the player wasn't kicked.
Enable debugging in the script by chaning the line "my $DEBUG = 0" to "my $DEBUG = 1". Then the system will print lots of stuff about what it is doing. You should see lines like: "Kicking player (address: 1.2.3.4:1234) from MyServer" and "Finished kicking ...". There will be also lots of other "useless" information about when the system opens rcon connection and stuff like that.
As a bright side I'm glad to see that the script is easy enough to make some small modifications to suit your own requirements. I'd be happy to hear some feedback about how easy it's been to find and reconfigure the required values to set eg. "LOW" or "OK" ratelimits. I haven't put too much stuff in the %CONF and %servers to keep the system easy to install, but now it seems maybe a normal ratetables.conf in addition to the script itself would be good idea. It could hold more configuration options. What do you think?
I'll try the debug mode and see if I find the problem.
A bug that I found on ip immunity.
This conflicts with the rcon connection. When I put an ip in immunity, the script trying to connect it with rcon on this IP.
I have a firewall log full of test connections every 10 seconds on the ip immunized
Make a help file readme
Add more stats in html file to help to find the correct rate limit.
Rate min, avg, median, max
Save the stats of players in a directory /ip/$adress.dat instead of /player_$address.dat
Here is my directory ip
Quote:~/ratetables/ip root@host:~$ ls -1 | wc -l
31363
Make a tar.gz for not having a copy / paste the script
Rename your script for each version.
Example:
ratetables_0.1.pl
ratetables_0.2.pl
...
Here are my suggestions
(02-22-2010, 03:53 AM)saintjimmygd Wrote: Can we use this script on HLDS servers? Or it's strictly for SRCDS ...
It depends on the output of "status"
On L4D2 is like this
Quote:# userid name uniqueid connected ping loss state rate adr
# 16 1 "playername" STEAM_1:0:864**** 57:27 119 0 active 30000 86.201.***.***:27005
#end
In css is different
Quote:# userid name uniqueid connected ping loss state adr
# 16 "playername" STEAM_1:0:864**** 57:27 119 0 active 86.201.***.***:27005