Raised This Month: $51 Target: $400
 12% 

Plugin request: commands based on user's hours in X game


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheTopMostDog
Member
Join Date: Jul 2012
Location: Melbourne, Australia
Old 01-03-2015 , 01:33   Plugin request: commands based on user's hours in X game
Reply With Quote #1

Howdy guys,

Myself and other CSS server owners from my area have been recently dealing with hackers on a daily basis. We have come to notice that most of them are repeat offenders on new accounts with often less than 15 hours playtime. What we're looking for to counter these guys is a plugin which grabs their hours played and allows admins to set up automatic commands to be executed on these players.

For example, using commands provided from other plugins:
A) Players with under 15 hours
sm_spectate / every 10 seconds
sm_privatemessage <string> / every 30 seconds

B) Players with under 2 hours
sm_kick <kick message> / on detect, once only

C) Players with undetectable hours (private profiles?)
sm_disarm / on round start
sm_cash 0 / every 5 seconds

D) Ignore whitelist players
My rival server owners are very interested in my idea of a plugin of this nature. None of us have come across one in our years running servers. We are willing to discuss work on commission, but if someone were to spin something up for us, or even point us in the right direction, we'd be very grateful.
TheTopMostDog is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-03-2015 , 02:13   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #2

Could do, add me on steam.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
The1Speck
SourceMod Donor
Join Date: Oct 2014
Location: USA
Old 01-03-2015 , 02:22   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #3

Probably not the easiest/best solution, but its the first that comes to mind:

This method will be mostly web-based with most of the legwork done with PHP.

On user connect, an invisible motd panel will be opened for the user with their steamID as an argument to a PHP script running on a webserver (can also be done using cURL instead of MOTD I suppose)

The PHP script will then take the steamId and run a script that queries Steam's WebAPI (http://steamcommunity.com/dev).

Once their playtime is retrieved, if the user has <15hrs, the script sends an RCON command to the server "sm_under15 #SteamID" which creates a TIMER_REPEAT which will do the punishments you described in your post on the client. If the player has over 15hours, their steamID will be logged to a database of 'whitelisted' users, this is to avoid unnecessary calls to the API. Users can be manually added to the database either through PHPmyAdmin or by a command, !whitelist <user>.
__________________

Add me on Steam for personal inquiries or direct assistance.
The1Speck is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 01-03-2015 , 08:59   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #4

@The1Speck: No.
Only reliable solution would be to use Steamworks/Steamtools (not only to do the webrequest but rather read out the stats directly).
Also cURL-Extension is evil.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 01-03-2015 at 09:00.
Dr. Greg House is offline
The1Speck
SourceMod Donor
Join Date: Oct 2014
Location: USA
Old 01-03-2015 , 14:10   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #5

Quote:
Originally Posted by Dr. Greg House View Post
@The1Speck: No.
Only reliable solution would be to use Steamworks/Steamtools (not only to do the webrequest but rather read out the stats directly).
Also cURL-Extension is evil.
Like I said, there's probably a better solution lol.
__________________

Add me on Steam for personal inquiries or direct assistance.
The1Speck is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-03-2015 , 18:05   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #6

Steamworks/steamtools has problems with http requests too.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 01-03-2015 , 18:34   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #7

Did I say to use http requests? Sorry if this was unclear.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 01-03-2015 at 18:35.
Dr. Greg House is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-04-2015 , 03:37   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #8

Ah, you're suggesting that the stats would be retrieved from steamtools/steamworks when they are not available via http where socket/curl?

From what i've seen, steamtools/steamworks has problems just as often.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 01-04-2015 , 09:45   Re: Plugin request: commands based on user's hours in X game
Reply With Quote #9

I wouldn't even go that far to use the http request. Why? The server already has the data cached, just fetch it with the extension.
And while I have no idea what you're doing, the only issue I've had with fetching data is that for some games (L4D2) you don't have a working callback that tells you when the data is ready to be fetched. Worst case, I'd poll, but I would never bother trying to use the webapi. Also I hate the webapi.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 01-04-2015 at 09:46.
Dr. Greg House is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:54.


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