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

[CS:GO] Ban Checker


Post New Thread Reply   
 
Thread Tools Display Modes
Author
CowGod
Senior Member
Join Date: Feb 2015
Plugin ID:
6480
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Notifies admins/players about users who join the server on a previously vac banned account or an account that's less than 1 week old.
    Old 03-21-2019 , 05:48   [CS:GO] Ban Checker
    Reply With Quote #1

    [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

    Attached Files
    File Type: zip BanChecker.zip (1.27 MB, 215 views)
    File Type: sp Get Plugin or Get Source (BanChecker.sp - 256 views - 6.2 KB)

    Last edited by CowGod; 11-20-2019 at 21:00.
    CowGod is offline
    Send a message via Skype™ to CowGod
    TheBOSS
    Member
    Join Date: Nov 2018
    Old 03-21-2019 , 07:40   Re: [CS:GO] Ban Checker
    Reply With Quote #2

    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

    Last edited by TheBOSS; 03-21-2019 at 07:46.
    TheBOSS is offline
    CowGod
    Senior Member
    Join Date: Feb 2015
    Old 03-21-2019 , 17:20   Re: [CS:GO] Ban Checker
    Reply With Quote #3

    Quote:
    Originally Posted by TheBOSS View Post
    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.

    Last edited by CowGod; 03-21-2019 at 17:28.
    CowGod is offline
    Send a message via Skype™ to CowGod
    TheBOSS
    Member
    Join Date: Nov 2018
    Old 03-21-2019 , 20:38   Re: [CS:GO] Ban Checker
    Reply With Quote #4

    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..
    TheBOSS is offline
    CowGod
    Senior Member
    Join Date: Feb 2015
    Old 03-22-2019 , 18:21   Re: [CS:GO] Ban Checker
    Reply With Quote #5

    Quote:
    Originally Posted by TheBOSS View Post
    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.
    CowGod is offline
    Send a message via Skype™ to CowGod
    TheBOSS
    Member
    Join Date: Nov 2018
    Old 03-24-2019 , 19:28   Re: [CS:GO] Ban Checker
    Reply With Quote #6

    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:514: Error log file session closed.
    Linux server
    TheBOSS is offline
    NomisCZ
    AlliedModders Donor
    Join Date: Mar 2014
    Location: Czech_Republic
    Old 03-25-2019 , 05:34   Re: [CS:GO] Ban Checker
    Reply With Quote #7

    Quote:
    Originally Posted by TheBOSS View Post
    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"
            
    }
        }

    __________________

    Last edited by NomisCZ; 03-25-2019 at 05:37.
    NomisCZ is offline
    wolvez04
    Senior Member
    Join Date: Feb 2016
    Location: Andora
    Old 04-18-2019 , 01:50   Re: [CS:GO] Ban Checker
    Reply With Quote #8

    Quote:
    Originally Posted by TheBOSS View Post
    Linux server
    L 04/18/2019 - 15:277: [SM] Exception reported: Could not retrieve value for key 'timecreated'
    L 04/18/2019 - 15:277: [SM] Blaming: BanChecker.smx
    L 04/18/2019 - 15:277: [SM] Call stack trace:
    L 04/18/2019 - 15:277: [SM] [0] JSONObject.GetInt
    L 04/18/2019 - 15:277: [SM] [1] Line 138, C:\Users\Desktop\scripting 1.8\Edans\BanChecker.sp::AcountCheck_OnHTTPRe sponse

    Windows server. It's just harmless error then?
    __________________
    Hiring developers of all sorts for small or big jobs.
    Paying nicely. Just PM for any available jobs.

    wolvez04 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 17:30.


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