View Single Post
Author Message
jameless
Veteran Member
Join Date: Jan 2010
Old 07-19-2011 , 21:01   [TF2] Official SteamRep Checker
Reply With Quote #1

[TF2] SteamRep Checker
Plugin Version 1.1.5


Description:

This is a plugin that queries the SteamRep database for a player as they are joining.
If the player is a reported scammer in the database, the plugin gives you a few options for what you want to do with them.
It is intended for trade servers that trust the SteamRep website.
You can also use the command !sr or !rep to check the steamrep profile of a player in-game.

Requirements:

Sourcemod
Sockets Extension (http://forums.alliedmods.net/showthread.php?t=67640)

Cvars:

sr_scammer - How to handle the scammer. 0-Rename with [SCAMMER] tag, 1-Kick, 2-Ban for X minutes (configured by sr_bantime), 3-Same as 2 but also ban ip for Y minutes (configured by sr_baniptime)
sr_bantime - If sr_scammer is set to 2 or 3, this is where you set how long to ban the user for, in minutes
sr_baniptime - If sr_scammer is set to 3, this is where you set how long to ban the ip for, in minutes
sr_kick_renamed_scammers - Kick a scammer when the server is full. Set to 0 to disable.
sr_exclude - Comma separated value for tags you DO NOT trust for reported scammers. Input the tags here for any community whose bans you DO NOT TRUST. Ex: SR,TF2TP means you DO NOT TRUST SR or TF2TP reported scammers.
sr_checkip - Include IP address of connecting players in query. Set to 0 to disable.


Commands:

sm_sr - This will open up your MOTD panel to the SteamRep page of your target (either the player you type or the person you are aiming at).
sm_rep - This will open up your MOTD panel to the SteamRep page of your target (either the player you type or the person you are aiming at).

Install Instructions:

1. Upload steamrep.smx to your /sourcemod/plugins/ folder.
2. Set your cvar settings in steamrep.cfg in your /tf/cfg/sourcemod/ folder. (Plugin will auto-create this cfg file if it doesn't already exist.)
3. Reboot server

Special Thanks:

Azelphur for pointing me in the right direction.
FlaminSarge for not ignoring my questions about error fixes.
ASBO trading community for helping test.
Botts for helping me test.
exvel for colors.inc (https://forums.alliedmods.net/showthread.php?t=96831)
Antithasys for Simple Chat Colors (http://forums.alliedmods.net/showthread.php?p=949520) utilized a couple functions from that plugin. Recoded for use with this.
Bottiger for some good code changes (check userid instead of client, added sr_kick_renamed_scammers, helped test a lot).
Mattie for helping me remove the API key requirement.
Dr. McKay for morecolors.inc (http://forums.alliedmods.net/showthread.php?t=185016)

Changelog:
  • 1.1.5:
    • Added sr_checkip. (Include IP address of connecting players in query. Set to 0 to disable.)
      • Will allow for an upcoming feature of checking the IP of a connecting player.
    • Fixed a color inconsistency when sr_scammer is set to 0.
    • Now using morecolors.inc.
  • 1.1.4:
    • Removed sr_api. There is now no more need for an API key to run this plugin.
    • Removed sr_tags. Created a new way of excluding tags that you DO NOT trust.
    • Added sr_exclude. The plugin now trusts all tags except for the tags you enter here.
  • 1.1.3:
    • Add ability to trust EE tag.
    • Changed to BIG MOTD.
  • 1.1.2:
    • Created a way for server admins to select which community-SCAMMER tags they trust (sr_tags).
    • Added !rep command. It does the same thing as !sr.
  • 1.1.1:
    • Some more bugfixes.
    • Added a kick in the event a scammer tries to remove [SCAMMER] label.
    • Removed some timers for better performance when sr_scammer is set to 0.
  • 1.1.0:
    • Bugfixes.
  • 1.0.9:
    • Changed to check userid to make sure an improper user isn't queried. (Thanks Bottiger)
    • Added sr_kick_renamed_scammers cvar to kick a scammer when the server is full. (Thanks Bottiger)
    • Removed a check that allowed scammers to skip the tag when chatting.
  • 1.0.8:
    • Added a public api key daily limited to 100 queries so that server operators can test the plugin before requesting a key.
      • Getting an api key will allow a much higher limit to the queries and is highly recommended.
    • Changed sr_version to sr_checker_version to not conflict with other plugin.
    • Edited timer on rename to prevent rapid changes to name in order to avoid the [SCAMMER] tag when using sr_scammer 0.
  • 1.0.7:
    • Eliminated query for bots.
    • Created potential for whitelisting. ( Feature Request )
      • Add an admin override for "SkipSR" in your admin_overrides.cfg file and assign it to whatever flag you want to whitelist.
    • Added sr_version cvar to keep better tracking of which version a server is using.
    • Added error catching for someone running sm_sr from rcon.
  • 1.0.6:
    • Changed query string to match new api system.
    • Added new mode for handling scammers (sr_scammer 0) that simply renames them with a [SCAMMER] tag.
      • This was made for servers to evaluate the accuracy of SteamRep, so a decision can be made on how they would like to handle the reported Scammers.
    • Added sm_sr (!sr /sr) command. This will open up the MOTD panel to the SteamRep page of the target (the player you type or the person you are aiming at).
    • Added a bool array for simplicity and the potential for creating native functions in the future.
Attached Files
File Type: sp Get Plugin or Get Source (steamrep.sp - 1012 views - 11.3 KB)
File Type: smx steamrep.smx (15.9 KB, 1464 views)

Last edited by jameless; 11-17-2012 at 14:27. Reason: new version
jameless is offline