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

[ANY] Anti Private Profile & Inventory


Post New Thread Reply   
 
Thread Tools Display Modes
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 11-11-2017 , 14:37   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #11

For a long time I've been planning to rewrite those plugins, but seeing as this plugin is similar - do you think you could throw in these features?

1. Ban based on total playtime. (sm_addban, which works with sourcebans I think)
2. Ban based on total playtime, minus past 2 weeks. (Basically the thing from veteran's only)
3. Something that'll output a log specific to this plugin, and also chat messages which reveal the following data:
- All connections
- The playtime amount detected by the plugin
- The playtime minus the past 2 weeks
- Profile status (Public, Private, Not set up, Friend's-Only, etc)
- HTTP Status / Success / Failure / Errors for each call on a player or w/e
- Were they kicked or not
- Was steam up/down at the time

PHP Code:
stock CPrintToAdmins(const AdminFlag:fFlag, const String:message[], any:...)
{
    
CCheckTrie();

    
decl String:szBuffer[MAX_BUFFER_LENGTH], String:szBuffer2[MAX_BUFFER_LENGTH];

    for(new 
1<= MaxClientsi++)
    {
        if (!
IsClientInGame(i) || !GetAdminFlag(GetUserAdmin(i), fFlag) || CSkipList[i])
        {
            
CSkipList[i] = false;
            continue;
        }
        
SetGlobalTransTarget(i);
        
Format(szBuffersizeof(szBuffer), "\x01%s"message);
        
VFormat(szBuffer2sizeof(szBuffer2), szBuffer3);
        
CReplaceColorCodes(szBuffer2);
        
CSendMessage(iszBuffer2);
        
CRemoveTags(szBuffer2sizeof(szBuffer2));
        
PrintToServer(szBuffer2);
    }

^ I use that, could be useful if you use morecolors

4. Kicking based on private inventory ought to be optional (cvar). I'm okay with that, though I'd rather still kick all of the private profiles.

5. I noticed the thing about steam API's rate limit on Github.

Some quick googling says something like 100,000 per day and only 10 calls every 10s or something.

You could make a 1-2 second repeating timer and use an ADT array that gets filled when people connect and emptied as they get checked, to funnel your calls one at a time or something, which might help.

----

I looked at the plugin real quick and noticed a typo.

PHP Code:
enum FailMethod
{
    
f_KICK 1,
    
f_STAY
}

cFail CreateConVar("sm_anti_private_fail_method""1""1 - Allow them to stay on the server, 2 - Kicks them from the server"FCVAR_NONEtrue1.0true2.0);

void HandleHTTPError(int iClient)
{
    if (
iFailMethod == f_KICK)
        
KickClient(iClient"%T""Error"iClient);
        
    
LogError("Failed to send HTTP request (Is Steam Down?)");

f_kick and f_stay seem to be backwards here, when compared to the convar description.
__________________

Last edited by Chdata; 11-11-2017 at 14:45.
Chdata is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 11-11-2017 , 19:33   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #12

Quote:
Originally Posted by Chdata View Post
For a long time I've been planning to rewrite those plugins, but seeing as this plugin is similar - do you think you could throw in these features?

1. Ban based on total playtime. (sm_addban, which works with sourcebans I think)
2. Ban based on total playtime, minus past 2 weeks. (Basically the thing from veteran's only)
3. Something that'll output a log specific to this plugin, and also chat messages which reveal the following data:
- All connections
- The playtime amount detected by the plugin
- The playtime minus the past 2 weeks
- Profile status (Public, Private, Not set up, Friend's-Only, etc)
- HTTP Status / Success / Failure / Errors for each call on a player or w/e
- Were they kicked or not
- Was steam up/down at the time

PHP Code:
stock CPrintToAdmins(const AdminFlag:fFlag, const String:message[], any:...)
{
    
CCheckTrie();

    
decl String:szBuffer[MAX_BUFFER_LENGTH], String:szBuffer2[MAX_BUFFER_LENGTH];

    for(new 
1<= MaxClientsi++)
    {
        if (!
IsClientInGame(i) || !GetAdminFlag(GetUserAdmin(i), fFlag) || CSkipList[i])
        {
            
CSkipList[i] = false;
            continue;
        }
        
SetGlobalTransTarget(i);
        
Format(szBuffersizeof(szBuffer), "\x01%s"message);
        
VFormat(szBuffer2sizeof(szBuffer2), szBuffer3);
        
CReplaceColorCodes(szBuffer2);
        
CSendMessage(iszBuffer2);
        
CRemoveTags(szBuffer2sizeof(szBuffer2));
        
PrintToServer(szBuffer2);
    }

^ I use that, could be useful if you use morecolors

4. Kicking based on private inventory ought to be optional (cvar). I'm okay with that, though I'd rather still kick all of the private profiles.

5. I noticed the thing about steam API's rate limit on Github.

Some quick googling says something like 100,000 per day and only 10 calls every 10s or something.

You could make a 1-2 second repeating timer and use an ADT array that gets filled when people connect and emptied as they get checked, to funnel your calls one at a time or something, which might help.

----

I looked at the plugin real quick and noticed a typo.

PHP Code:
enum FailMethod
{
    
f_KICK 1,
    
f_STAY
}

cFail CreateConVar("sm_anti_private_fail_method""1""1 - Allow them to stay on the server, 2 - Kicks them from the server"FCVAR_NONEtrue1.0true2.0);

void HandleHTTPError(int iClient)
{
    if (
iFailMethod == f_KICK)
        
KickClient(iClient"%T""Error"iClient);
        
    
LogError("Failed to send HTTP request (Is Steam Down?)");

f_kick and f_stay seem to be backwards here, when compared to the convar description.
Thanks for suggesting those features, I, unfortunately, cannot add them as it's outside the scope of this plugin.
__________________
RumbleFrog is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 11-11-2017 , 19:36   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #13

v1.2.5
  • Fixes heap size with large inventory; assumes inventory is public by measuring the response size
  • Implements file logging within anti_private.log
  • Closes unused handles
__________________
RumbleFrog is offline
KingSmokey
Junior Member
Join Date: Aug 2017
Location: Los Angeles
Old 11-14-2017 , 14:50   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #14

Really good plugin helps to keep those private parts away! Also I joinned his discord and mange to help me out and helped himself out. Thanks sir frogo.
KingSmokey is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 11-19-2017 , 21:12   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #15

There's seem to be a weird handle error happening with one of the users, please LMK if you guys experience any errors.
__________________
RumbleFrog is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 12-10-2017 , 18:31   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #16

v1.2.6
  • Updated SteamTools build dependency for those that are experiencing native errors like the one mentioned in issue #6
__________________

Last edited by RumbleFrog; 12-10-2017 at 18:32.
RumbleFrog is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 01-03-2018 , 12:17   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #17

Happy New Year, to another year of operation
__________________
RumbleFrog is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 01-03-2018 , 17:08   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #18

Good work on re-visiting concepts that have been diminished for some time.
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

Last edited by OSWO; 01-03-2018 at 17:08.
OSWO is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 01-14-2018 , 12:36   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #19

Quote:
Originally Posted by OSWO View Post
Good work on re-visiting concepts that have been diminished for some time.
Thanks! Lots of other plugins have unnecessary features and are outdated, so I made my own and decided to release it.
__________________
RumbleFrog is offline
Hoto Cocoa
Senior Member
Join Date: Jun 2018
Location: Somewhere
Old 07-01-2018 , 10:05   Re: [ANY] Anti Private Profile & Inventory
Reply With Quote #20

Quote:
Friends-only will be considered private as long as the owner of the API key is not friend with that individual
I just want to block those who set their profile private. Friends-only is okay for my server. Is there any way to set this for the plugin?
Hoto Cocoa 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 23:13.


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