Raised This Month: $32 Target: $400
 8% 

[TF2] Official SteamRep Checker


Post New Thread Reply   
 
Thread Tools Display Modes
jameless
Veteran Member
Join Date: Jan 2010
Old 07-13-2012 , 09:03   Re: [TF2] Official SteamRep Checker
Reply With Quote #51

Where do you get the error? In rcon/console? Or your logs?
jameless is offline
jameless
Veteran Member
Join Date: Jan 2010
Old 11-17-2012 , 14:30   Re: [TF2] Official SteamRep Checker
Reply With Quote #52

UPDATE RELEASE
  • 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.
jameless is offline
Puddleboy
New Member
Join Date: Dec 2012
Old 12-27-2012 , 10:00   Re: [TF2] Official SteamRep Checker
Reply With Quote #53

Hi jameless!

I wanted to use this utility on my server, but my host doesn't allow the sockets extension. They do allow the SteamTools extension though, so I modified the original to use SteamTools rather than Sockets. I've attached the source, hope it can help someone other than me!

Edit: To compile this you will need the SteamTools.inc, I've attached a compiled version since the built in one doesn't seem able to compile.

Last edited by Puddleboy; 01-09-2013 at 18:37.
Puddleboy is offline
jameless
Veteran Member
Join Date: Jan 2010
Old 12-27-2012 , 19:16   Re: [TF2] Official SteamRep Checker
Reply With Quote #54

Hey there. Code looks good so far. Only change I might request you make is to change the url to remove the www. In any case I will test it out, if successful, I could make this an official secondary version so any changes made in the future, I can make on it as well. This way servers have more options for using the plugin besides just the socket extension. Thanks for the efforts!
jameless is offline
Puddleboy
New Member
Join Date: Dec 2012
Old 12-27-2012 , 21:17   Re: [TF2] Official SteamRep Checker
Reply With Quote #55

I've updated the GET to use http://steamrep without the subdomain, I also noticed that version had a typo in the request (verssion) and fixed that.

The corrections are in the source below along with a new compiled version, it's been running on my trade server all day and seems to be working correctly.

A SR admin by the name of CanadianInvasion was kind enough to temporarily flag one of my idle accounts to test the scammer flagging functionality and all went well!

Thanks much for the original plugin, SteamRep is an awesome service to the community!

Last edited by Puddleboy; 01-09-2013 at 18:39.
Puddleboy is offline
Puddleboy
New Member
Join Date: Dec 2012
Old 12-27-2012 , 22:03   Re: [TF2] Official SteamRep Checker
Reply With Quote #56

I made a few more updates you may or may not be interested in.

Below is a merged version which will use sockets if it's available, steamtools if it isn't. It may be easier than managing two versions of the plugin. It does compile, however I have not had an opportunity to test this on a server.

EDIT: Had some time to test, fixed some issues, seems to be working, new files attached below.

Last edited by Puddleboy; 01-09-2013 at 18:39.
Puddleboy is offline
Puddleboy
New Member
Join Date: Dec 2012
Old 01-09-2013 , 18:41   Re: [TF2] Official SteamRep Checker
Reply With Quote #57

Ok, so here's a final version which has been tested, and up and running on my server for a while, the previous versions (which I removed) had a bug in detecting the client which I fixed.

This should work for either Sockets or SteamTools.
Attached Files
File Type: sp Get Plugin or Get Source (steamrep_merged.sp - 84 views - 14.7 KB)
File Type: smx steamrep_merged.smx (17.3 KB, 87 views)
Puddleboy is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-28-2013 , 23:53   Re: [TF2] Official SteamRep Checker
Reply With Quote #58

Hi! I was looking through the source and I noticed a few problems.
  • new maxplayers = GetConVarInt(FindConVar("sv_visiblemaxplayers "));
    • Line 50
    • You should cache the result of FindConVar("sv_visiblemaxplayers") in a global variable, as FindConVar is very expensive
  • RegConsoleCmd("say", Command_Say);
    • Lines 82-83
    • AddCommandListener should be used instead of RegConsoleCmd to hook existing commands
    • Additionally, OnConfigsExecuted is called once per map, you are hooking say and say_team once every mapchange
  • decl String:ip[17]="";
    • Line 100
    • The point of decl is to avoid initalization. If you want to initialize the String to null, you should use new.
  • In ProcessMessage, you are suppressing the original chat message and using CPrintToChat*Ex to print a new message. For chat processing like this, Simple Chat Processor (Redux) should be used, otherwise it can cause issues with other plugins.
  • Non-callbacks don't need to be public
  • StartsWithScammer is unnecessary, just check if StrContains(str, "[SCAMMER]") == 0.
  • ServerCommand("sm_ban . . .
    • Lines 163, 168, and 169
    • ServerCommand is evil and should be avoided whenever possible. SourceBans has a native that can be used.

Also, something that concerned me is that every client's IP address is being sent to steamrep.com (unless the cvar is set to 0). To protect users' privacy, I would recommend only sending SteamRep the IP address if the client is marked as a scammer. (By the way, what exactly does SteamRep do with these IP addresses?)
__________________

Last edited by Dr. McKay; 01-28-2013 at 23:53.
Dr. McKay is offline
jameless
Veteran Member
Join Date: Jan 2010
Old 01-29-2013 , 07:03   Re: [TF2] Official SteamRep Checker
Reply With Quote #59

Hey there. Thanks for taking a look at the code and offering some fixes. I do appreciate that. However, I am leaving the SR project, and someone should be taking over coding up the plugin in the near future. Hopefully they add some of these fixes in. I will try to explain just a couple that had a specific reasoning.
Quote:
Originally Posted by Dr. McKay View Post
  • StartsWithScammer is unnecessary, just check if StrContains(str, "[SCAMMER]") == 0.
  • ServerCommand("sm_ban . . .
    • Lines 163, 168, and 169
    • ServerCommand is evil and should be avoided whenever possible. SourceBans has a native that can be used.
StartsWithScammer was added because of RTL languages. Some people would get away with renaming the tag away if they used RTL to get around StrContains.

I might be wrong but when I first coded I searched for a native in SourceBans. I'm glad to see there's one. The intention was to make it compatible with/without SourceBans. I totally agree about ServerCommand and I was quite upset at the time, that I couldn't determine a different solution for it. If it's been there since before I coded this, then I apologize but I had searched for hours and asked many people about it.

Quote:
Originally Posted by Dr. McKay View Post
Also, something that concerned me is that every client's IP address is being sent to steamrep.com (unless the cvar is set to 0). To protect users' privacy, I would recommend only sending SteamRep the IP address if the client is marked as a scammer. (By the way, what exactly does SteamRep do with these IP addresses?)
I understand your concern. It was requested from the site that I add this to the plugin for a potentially upcoming feature that would allow a server to check the IP of the connecting user to see if it matches the IP of a 'scammer'. It is still being coded on the backend. I respect people's privacy and I wouldn't add a feature like this without a way of turning it off easily, and the site agreed.

As I stated, I am leaving the SR project, not with bad blood, but IRL is consuming my time. Thanks again for taking a look at the code. I know I am FAR from the best coder, and I appreciate learning from my mistakes.
jameless is offline
TonyBaretta
Senior Member
Join Date: Mar 2014
Location: nope.avi
Old 01-22-2015 , 07:09   Re: [TF2] Official SteamRep Checker
Reply With Quote #60

can someone fix this for csgo ?
__________________
TonyBaretta is offline
Reply


Thread Tools
Display Modes

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 04:16.


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