AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Ban Checker (https://forums.alliedmods.net/showthread.php?t=315077)

CowGod 03-21-2019 05:48

[CS:GO] Ban Checker
 
2 Attachment(s)
[CS:GO] Ban Checker

ABOUT:
This is a simple plugin that alerts admins/players about users who join the server on a previously vac banned account. It also notifies them if the account is less than 1 week old.

DEPENDENCIES:
CONVARS:
bc_admins_only - Only prints messages to admins (default: 1)
bc_steamapi - Set this as your SteamAPI Key

https://i.gyazo.com/535e5e1be99f0b4c...44706dfa8b.png

TheBOSS 03-21-2019 07:40

Re: [CS:GO] Ban Checker
 
Nice :)
you forget to add
Quote:

AutoExecConfig(true, "BanChecker");
and I suggest you add cvar "bc_week_old"
and "bc_admin_flag" // if empty prints messages to all players

CowGod 03-21-2019 17:20

Re: [CS:GO] Ban Checker
 
Quote:

Originally Posted by TheBOSS (Post 2644258)
Nice :)
you forget to add
and I suggest you add cvar "bc_week_old"
and "bc_admin_flag" // if empty prints messages to all players

There is not meant to be a config, you are supposed to put those cvars in your server.cfg because no need for cfg for 2 cvars. Also if admin flag is nothing then it should print to all players because you are not looking for players with a specific flag.

TheBOSS 03-21-2019 20:38

Re: [CS:GO] Ban Checker
 
hmm, I mean replace cvar "bc_admins_only" to "bc_admin_flag"
for example:
if empty, print message to all players
if set admin flag = b , print message for players who have admin flag b
etc..

CowGod 03-22-2019 18:21

Re: [CS:GO] Ban Checker
 
Quote:

Originally Posted by TheBOSS (Post 2644361)
hmm, I mean replace cvar "bc_admins_only" to "bc_admin_flag"
for example:
if empty, print message to all players
if set admin flag = b , print message for players who have admin flag b
etc..

Gotcha, good idea. I can do that once I am home.

TheBOSS 03-24-2019 19:28

Re: [CS:GO] Ban Checker
 
Quote:

L 03/24/2019 - 17:45:11: [SM] Exception reported: Could not retrieve value for key 'timecreated'
L 03/24/2019 - 17:45:11: [SM] Blaming: BanChecker.smx
L 03/24/2019 - 17:45:11: [SM] Call stack trace:
L 03/24/2019 - 17:45:11: [SM] [0] JSONObject.GetInt
L 03/24/2019 - 17:45:11: [SM] [1] Line 139, C:\Users\abdom\Desktop\addons\sourcemod\scrip ting\BanChecker.sp::AcountCheck_OnHTTPRespons e
L 03/24/2019 - 17:51:34: Error log file session closed.
Linux server

NomisCZ 03-25-2019 05:34

Re: [CS:GO] Ban Checker
 
Quote:

Originally Posted by TheBOSS (Post 2644815)
Linux server

The problem is ... private Steam profiles have this value hidden, so you can't get it.
@CowGod So maybe show diff message, if you don't have 'timecreated' value.
Also you can add format=vdf to get response as VDF -> KeyValues, so you don't need 'REST in Pawn' extension.

API response:
PHP Code:


// Get API response as vdf -> keyvalues, so you don't need to use JSON parser.
http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=XXXXXXXXXXXXXXXXX&steamids=76561198364662582&format=vdf

Public:
"response"
{
    
"players"
    
{
        
"0"
        
{
            
"steamid"    "76561198364662582"
            "communityvisibilitystate"    "3"
            "profilestate"    "1"
            "personaname"    "NomisCZ (-N-)"
            "lastlogoff"    "1553462945"
            "commentpermission"    "1"
            "profileurl"    "https://steamcommunity.com/id/olympic-nomis/"
            "avatar"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd.jpg"
            "avatarmedium"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd_medium.jpg"
            "avatarfull"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd_full.jpg"
            "personastate"    "0"
            "primaryclanid"    "103582791430395180"
            "timecreated"    "1486318143"
            "personastateflags"    "0"
            "loccountrycode"    "CZ"
        
}
    }
}

Private:
"response"
{
    
"players"
    
{
        
"0"
        
{
            
"steamid"    "76561198364662582"
            "communityvisibilitystate"    "1"
            "profilestate"    "1"
            "personaname"    "NomisCZ (-N-)"
            "lastlogoff"    "1553462945"
            "commentpermission"    "1"
            "profileurl"    "https://steamcommunity.com/id/olympic-nomis/"
            "avatar"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd.jpg"
            "avatarmedium"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd_medium.jpg"
            "avatarfull"    "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/fb/fbaed0beb2e56a2d30abf2e0b2aeaeb4db513dbd_full.jpg"
            "personastate"    "0"
        
}
    }



wolvez04 04-18-2019 01:50

Re: [CS:GO] Ban Checker
 
Quote:

Originally Posted by TheBOSS (Post 2644815)
Linux server

L 04/18/2019 - 15:27:37: [SM] Exception reported: Could not retrieve value for key 'timecreated'
L 04/18/2019 - 15:27:37: [SM] Blaming: BanChecker.smx
L 04/18/2019 - 15:27:37: [SM] Call stack trace:
L 04/18/2019 - 15:27:37: [SM] [0] JSONObject.GetInt
L 04/18/2019 - 15:27:37: [SM] [1] Line 138, C:\Users\Desktop\scripting 1.8\Edans\BanChecker.sp::AcountCheck_OnHTTPRe sponse

Windows server. It's just harmless error then?


All times are GMT -4. The time now is 10:14.

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