SRCDS Steam group


Player rate tracking system using Linux's firewall (iptables)
Thank you css for this useful tool!
It worked for me when I was on Linux, but I have to back on Windows. Is it possible to count number of needed packets on Widows?
Reply
Thanks.

The tool doesn't work in Windows.

I haven't had time to investigate Net:Tounguecap perl module [ http://search.cpan.org/dist/Net-Pcap/Pcap.pm ], but it seems it could be used to calculate the packets in Windows too.
Reply
Unfortunately I don't have any skill on perl. Sad May be you find time later...
Reply
Dont work for me Sad
Code:
[Thu Apr 29 13:23:42 2010] "MELEUZ™|*Sokol*" (userid: 212) (steamid: STEAM_0:0:1600726481) (min/median/max 0.0 / 0.0 / 0.
0) (0 bytes/pkt) (ping: 124) (loss: 0) (state: active) (onlinetime: 1796) (samples: 9)
Other plyers have "0" too Sad Help...
Reply
Are you running it as root?

Do you see error messages in the shell prompt when you run the program?
Reply
(04-29-2010, 09:17 PM)css Wrote:  Are you running it as root?

Do you see error messages in the shell prompt when you run the program?
Yes, i am a root. No error messages (In a first running trouble with a Date::Format - fix it).
#1 server - Perl, cssrates.pl, iptables commands.
#2 game server.

Should i do something in a game server? Or only on #1 server?

Tnx for you attention.
Reply
Ah, now I know. Unfortunately it's bad news for you.

You need to be root on the game server. You must run the script on the same server as the game server.

Now you're running the script on some other machine, which then adds all the firewall rules to track the players - but all the players are on the game server! If you have root access on the game server you should run it there.
Reply
(04-30-2010, 10:23 PM)css Wrote:  Ah, now I know. Unfortunately it's bad news for you.

You need to be root on the game server. You must run the script on the same server as the game server.

Now you're running the script on some other machine, which then adds all the firewall rules to track the players - but all the players are on the game server! If you have root access on the game server you should run it there.
This option does not suit me, because I do not want to run Perl on a machine with the game server. Thank you for your attention.
Reply
(05-05-2010, 05:57 PM)xiloid Wrote:  
(04-30-2010, 10:23 PM)css Wrote:  Ah, now I know. Unfortunately it's bad news for you.

You need to be root on the game server. You must run the script on the same server as the game server.

Now you're running the script on some other machine, which then adds all the firewall rules to track the players - but all the players are on the game server! If you have root access on the game server you should run it there.
This option does not suit me, because I do not want to run Perl on a machine with the game server. Thank you for your attention.

Is there reason besides prejudice and misconception?
Reply
Hi there,

Very nice script! I was curious, could you give me advice on adding a function to simply write to the server about bad rates? For example, a bad rate is identified, instead of kicking/banning, just print to the screen for all players to see, "Player X has a low average rate of 22.2" or something.

I write Perl/PHP myself, but before messing with this I figured I'd ask.

Thanks,

Ryan
Reply
You can modify function "rcon_kick" and do the necessary modifications on the lines:

Code:
rcon_command($server->{sock},
                 sprintf('kickid %d Your rate is too low %.1f/s',
                         $player->{userid},
                         $player->{rate_median}))
        unless ($CONF{monitoring});

Also change the _msg(sprintf(...)); functions nearby so you don't get confusing messages about someone being kicked. Then search lines:

Code:
rcon_kick($server, $player);
rcon_ban($server, $player);

Remove or uncomment rcon_ban(..).

A better way to enhance the script is actually create a new function for announcing the low raters. First create a new funciton by copying rcon_kick function. Name the function for example rcon_announce($$). Then make the necessary modifications to the function. Then find the two lines rcon_kick(..) and rcon_ban(..) and rename rcon_kick to rcon_announce(..); Comment rcon_ban(..) so players don't get banned.

You can use see the "example" in rcon_kick how to use rcon_command(..). You can send any RCON commands to the server with it. You don't have to use sprintf(..) function if you don't want to. I find it easier to read that way.

PS. Sorry for little late reply.
Reply
Does it work with l4d(1)? I've downloaded it and it only queries the server with "status" command. In the log there is only info about changelevels, when started it says that it got connected to the server but nothing else.

Please help
Reply
L4D should work also. I'm not completely sure about update rate in L4D. It's not so important to have good update rate in L4D because the game is more "arcade".

Do you have root access on the server? It's important that you run it with root access on the actual game server machine. Otherwise it can't track packet rate for players.

--

The script could use some finetuning and be more user friendly. Somebody with basic Perl / PHP / programming skills could work on the script and make it easier for normal server admins to use. It would be great boost for the script. At the current state the script is easy to understand, but it may require "server administrator" mentality Toungue PM me if interested, so we can work out the features Smile
Reply
Would be nice if the script could trigger a vote temp ban. Let the players decide if the person in question is really having a negative impact on the game. Keep up the good work
Reply
@ up
I think it is possible to trigger this kind of vote with "rcon callvote banid ID" or sth but some info for players should be given. I would try to find some free time and make it run with l4d( i really like russian players but most of them just lag).

@ CSS
Yes ive got root access to the server and im suprised that i does not work(l4d got source engine so it should). If im right it should output players rates to the html file but it doesn't. It just query servers with "status" command and doesn't take any samples. Another thing is that it sometimes says "lost connection with xxx". Script runs with l4d servers on the same machine so its kinda weird too.

Thanks 4 the reply Smile
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)