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

Steam Group Whitelist 2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 05-27-2023 , 19:58   Steam Group Whitelist 2.0
Reply With Quote #1

  • Description
    This plugin only allow members of the Steam Group to join your server
  • Cvars
    steam_api_key - mandatory for using the steam api
    - https://steamcommunity.com/dev/apikey
    whitelist_enable (default: 1) - toggle plugin
    steam_group - steam group id
    - steamcommunity.com/groups/<name>/edit *you must have admin access
    whitelist_flags (default: empty) - Admin flags that bypass whitelist check
    whitelist_kick_message (default: Join the Steam Group first: ) - Kick message
  • Modules
    If you're using async gRIP you need its module.
    Get it here https://github.com/In-line/grip
  • Additional information
    Great way to boost your Steam Group
    Steam API Json Response example:
    - Plugin will skip if response>success is false
    Code:
    {
      "response": {
        "success": true,
        "groups": [
          {
            "gid": "184"
          },
          {
            "gid": "567"
          }
        ]
      }
    }
  • Image
    Finding Steam Group ID (46 | 27)
Attached Files
File Type: sma Get Plugin or Get Source (steam_group_whitelist.sma - 57 views - 3.7 KB)
File Type: sma Get Plugin or Get Source (steam_group_whitelist_grip.sma - 74 views - 4.0 KB)
__________________

Last edited by bigdaddy424; 08-11-2023 at 21:39. Reason: UPDATE 2.0
bigdaddy424 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-28-2023 , 13:14   Re: Steam Group Whitelist
Reply With Quote #2

This seems pointless. No one will join the group to join the server. And if you want a private server you just set a password
__________________
Jhob94 is offline
IC3k1ng
Senior Member
Join Date: Mar 2023
Location: Argentina
Old 05-29-2023 , 16:24   Re: Steam Group Whitelist
Reply With Quote #3

This looks cool for those who had a Dev group for a testing server and for those communities who wants to grow up by joining to their Steam group. Good job.
__________________


IC3k1ng is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 05-29-2023 , 18:47   Re: Steam Group Whitelist
Reply With Quote #4

thanks for both comments. i got this idea playing pug/scrims/automix whatever. its hard to find players to play against and with and i thought that forcing them to join a steam group will also catch their interest to join its group chat where its easier to find players where you can schedule a game or setup small leagues or possibly make new friends...
__________________
bigdaddy424 is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 06-27-2023 , 21:39   Re: Steam Group Whitelist
Reply With Quote #5

if you don't have admin rights to steam group do like so:
api.steampowered.com/ISteamUser/GetUserGroupList/v0001/?key=SECRETAPIKEY&steamid=0123456789
fill your own api key and your steamid64, or someone who's a member to that group and then you can find the 8 digit steam group id

https://steamcommunity.com/groups/Va...listxml/?xml=1
this will return groupID64 and wont work
find how 8 digit is calculated here https://steamcommunity.com/discussio...4583881999457/
__________________
bigdaddy424 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 07-04-2023 , 12:58   Re: Steam Group Whitelist
Reply With Quote #6

Future JSON example in the Amxx source!

The tabs and spaces mix. Pick one or the other.
Stick with Allman indent over K&R on this forum. I worked in the same dept as K&R even.
The stock. It is unnecessary when 1 line suffices.
Code:
get_user_info(id, "*sid", sid[id], charsmax(sid[]))
DJEarthQuake is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 07-04-2023 , 20:57   Re: Steam Group Whitelist
Reply With Quote #7

i used json.inc function comments because its faster with klippys amxx ext.

vscode doesnt ask wether to insert a tab or space, just how many spaces, and i hate spaces
in my humble opinion k&r its just visibly nicer to look at. i always insert an empty line before an if else condition/for loop/ while do, but decided to not do so in this case
thanks for that, i had no idea about setinfo having any steam related information, i'll update in a minute
__________________
bigdaddy424 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 07-05-2023 , 17:17   Re: Steam Group Whitelist
Reply With Quote #8

Mixing tabs and spaces unwittingly and blaming the editor. That's a cop-out. It is sort of like a typo on a resume. There is no guarantee. At a second chance. Fix it while friends are still viewing it. Hating spaces? Interesting. All but 3 lines are in spaces. Whatever indent works, but when in Rome so to speak. This code you intend it to be read not just compiled. Keep that in mind. Then. Ask yourself would you like to rise or lower your standards?
DJEarthQuake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-05-2023 , 22:52   Re: Steam Group Whitelist
Reply With Quote #9

Quote:
Originally Posted by bigdaddy424 View Post
vscode doesnt ask wether to insert a tab or space, just how many spaces, and i hate spaces
All decent source code editors will have an option to change this and VS Code is no exception. If you look on the right side of the status bar, you can easily change the setting. Simply click on "Spaces: 4" (or "Tab Size: 4" if in tabs mode) and you'll get a menu to change indentation along with functions to convert back and forth between the two styles. I use this very often when having to copy/paste code from the forums because the HTML most often represents tabs as spaces.

There is good documentation of this in the Basic Editing documentation.
__________________

Last edited by fysiks; 07-05-2023 at 23:10.
fysiks is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 07-07-2023 , 21:01   Re: Steam Group Whitelist
Reply With Quote #10

Quote:
Originally Posted by DJEarthQuake View Post
Mixing tabs and spaces unwittingly and blaming the editor. That's a cop-out. It is sort of like a typo on a resume. There is no guarantee. At a second chance. Fix it while friends are still viewing it. Hating spaces? Interesting. All but 3 lines are in spaces. Whatever indent works, but when in Rome so to speak. This code you intend it to be read not just compiled. Keep that in mind. Then. Ask yourself would you like to rise or lower your standards?
i had no idea that i was using spaces instead of tabs this whole time. whenever i code or write in general and make grammar mistakes and such so i end up deleting the whole word by holding ctrl and pressing delete simultaneously, making me think that its in fact tabs not spaces. try it yourself and yes i blame the editor. thank you for noticing it and calling it out. i chuckled reading this. bless

Quote:
Originally Posted by fysiks View Post
All decent source code editors will have an option to change this and VS Code is no exception. If you look on the right side of the status bar, you can easily change the setting. Simply click on "Spaces: 4" (or "Tab Size: 4" if in tabs mode) and you'll get a menu to change indentation along with functions to convert back and forth between the two styles. I use this very often when having to copy/paste code from the forums because the HTML most often represents tabs as spaces.

There is good documentation of this in the Basic Editing documentation.
i thought that 4 spaces would translate to a single tab. i followed the steps and it fairly easy to switch to tabs. cheers
__________________
bigdaddy424 is offline
Reply



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 03:18.


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