• Announcements

    • Brentonator

      Forum Rules (Please Read)

      Hello everyone and welcome to the No More Room In Hell Forums! We greatly appreciate your interest and support. Please feel free to begin post and become a part of this community. But please make sure that you read and understand the following rules so things can stay as clean and as orderly as possible around here. These rules are expected to be follow by any and all members at all times. Disobeying these rules will result in disciplinary action by a moderator. #1. Off color remarks are acceptable but can be deemed inappropriate at the discretion of the moderators. #2. Flaming and disrespecting other members of this community or this mod is strictly prohibited. #3. Please do not post links relating to warez or illegal downloading. #4. No offensive content is to be posted (gore, dead babies, porn). #5. Please do not spam topics to increase your post count. #6. No excessively large signatures. Signatures that violate this will be modified. #7. Signatures are not to be used as a spamming tool. If your signature's sole purpose is to annoy or distract other members, it will be removed. #8. Please do your part to be as friendly, respectful, and helpful to anyone and everyone on this forum. #9. Your posts may be removed at any time at our sole discretion. #10. Remember the terms of your registration...a copy is posted below but may not represent the latest version of our terms of use. #11. No advertising other communities or products. Have fun.
Sign in to follow this  
Followers 0
RedSword

Annoying SteamWorks behaviour : fix to come ?

6 posts in this topic

Hey,

I'm using SteamWorks for a Sourcemod plugin to check Steam groups. While trying to check support for NMRiH, I notice that you seem to check if a client is in your official Steam group upon joining a server.

This seems to swallow further call to SteamWorks when the game server wants to check if a client belongs to a Steam group. Even your own group (i.e. manually checking 4458555 doesn't get triggered in my plugin's callback :o).

My questions :

1- Are developpers aware that they are possibly preventing further SteamGroups checks from being done ? (due to your request handler)

2- Is there a way to disable Steam groups handling in NMRiH ? (i.e. ConVar)

3- Do you plan on implementing a way to disable Steam groups handling in NMRiH or a work around this ? (In a way that can solve this problem)

I could do a work-around by using HTTP requests; but I'm asking you for future users who may also have the same problem. (as well as a part of me being lazy :D)

For a sample of code that shows what I'm talking about (I can't seem to find how to upload attachments so I'll let you compile) :

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"
public Plugin:myinfo =
{
name = "NMRiH SteamWorks Bug test",
author = "RedSword",
description = "NMRiH SteamWorks Bug test",
version = PLUGIN_VERSION,
}
#undef REQUIRE_EXTENSIONS
#include <steamworks>
#define REQUIRE_EXTENSIONS
//===== Forwards =====
public OnPluginStart()
{
CreateConVar( "nmrihswbug", PLUGIN_VERSION, "NMRIH SteamWorks bug plugin test version",
FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_NOTIFY | FCVAR_DONTRECORD );
RegAdminCmd("nmrihswbug_test", CommandTest, ADMFLAG_GENERIC, "Check if the admin is himself part of a Steam group given as argument");
}
public SteamWorks_OnClientGroupStatus(authid, groupAccountID, bool:groupMember, bool:groupOfficer)
{
//Get clientId if in game and print to him
new clientId = -1;
for ( new i = 1; i <= MaxClients; ++i )
{
if ( IsClientInGame( i ) && authid == GetSteamAccountID ( i ) )
{
clientId = i;
break;
}
}
if ( clientId != -1 )
PrintToChat( clientId, "\t You in group %d : Member=%d, officer=%d", groupAccountID, groupMember, groupOfficer );
PrintToServer( "\t AuthId=%d is part of group %d : Member=%d, officer=%d", authid, groupAccountID, groupMember, groupOfficer );
}
//===== Admin Commands =====
public Action:CommandTest(client, args)
{
if(args < 1)
{
ReplyToCommand( client, "[sM] Usage: nmrihswbug_test <smallSteamGroupId>" );
return Plugin_Handled;
}
decl String:szBuffer[ 20 ];
GetCmdArg( 1, szBuffer, sizeof(szBuffer) );
TrimString( szBuffer );
new groupId = StringToInt( szBuffer );
if ( groupId == -1 )
{
ReplyToCommand( client, "[sM] The group ID you're trying to check is too big. Is it a small SteamGroup id ?" );
return Plugin_Handled;
}
SteamWorks_GetUserGroupStatus( client, groupId );
return Plugin_Handled;
}

(Sorry for the formating, but your "code" tag added a shitload of <div></div> in the preview; and no tab can be placed... :( ).
You should be able to test that plugin in non NMRiH server by doing "nmrihswbug_test 4458555" in console and see it work correctly (i.e. in CSS).
You'll also need https://github.com/KyleSanderson/SteamWorks/blob/master/Pawn/includes/SteamWorks.inc'>SteamWorks.inc to compile the code (and SteamWorks SM extension to test it).
Just put .inc in the sourcemod/scripting/include/ folder, the code in a file.sp in sourcemod/scripting/ and drag & drop that file.sp on spcompile.exe and move the generated file to the sourcemod/plugin/ folder.


Red

EDIT : Can't edit title :'( ; I would have liked to mention Sourcemod

Edited by RedSword

Share this post


Link to post
Share on other sites

1- Are developpers aware that they are preventing further SteamGroups checks from being done ? (due to your request handler)

That's a pretty strong allegation. I hope you'll have more evidence other than a test plugin (off the Steamworks extension no less). Not to mention Kyle did say that it's unsupported and for good reason.

2- Is there a way to disable Steam groups handling in NMRiH ? (i.e. ConVar)

No, there is not.

3- Do you plan on implementing a way to disable Steam groups handling in NMRiH or a work around this ? (In a way that can solve this problem)

I don't know what the programmers will say, but seeing as I'm usually "rooting" for mod functionality I can't say you'd have my support here. If you can provide something more convincing then maybe I'd support this, but like you said yourself, "You can pull this off Steamcommunity's XML". Not to mention that method is more fool-proof.

Share this post


Link to post
Share on other sites

That's a pretty strong allegation. I hope you'll have more evidence other than a test plugin (off the Steamworks extension no less). Not to mention Kyle did say that it's unsupported and for good reason.

If they're hooking it could cause this. If they're just installing the callback though (which would be the sane thing :-)), it wouldn't cause this.

Share this post


Link to post
Share on other sites

I've filled an issue for this and we'll see if this can be changed.

Share this post


Link to post
Share on other sites

That's a pretty strong allegation. I hope you'll have more evidence other than a test plugin (off the Steamworks extension no less). Not to mention Kyle did say that it's unsupported and for good reason.

[...]

I don't know what the programmers will say, but seeing as I'm usually "rooting" for mod functionality I can't say you'd have my support here. If you can provide something more convincing then maybe I'd support this, but like you said yourself, "You can pull this off Steamcommunity's XML". Not to mention that method is more fool-proof.

1- I didn't mean to offend. I edited my first post and added a "possibly" to make it less direct.

2- You're right. I just tested with SteamTools and it works; while it doesn't for SteamWorks :o :$

3- I'd disagree with XML being more fool-proof, as you have to redownload if someone was recently added to a group; which is to be expected.

I apologize for the inconvenience,

Red

Edited by RedSword

Share this post


Link to post
Share on other sites

With the Steamworks request it may possibly return true for members that have a previous relationship with the group. This is why the XML method of getting them is more fool-proof, its the only way you can be 100% sure they are actually in the group.

Either way if it works with Steamtools this is probably not our fault. I'll close this out.

EDIT: Apparently Steamtools works because it's doing it a lot more low-level.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0