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

Plugin that checks steam profiles and warns/kicks private profile holders


Post New Thread Reply   
 
Thread Tools Display Modes
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 07-05-2017 , 04:36   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #11

Oh OK sorry. I didn't correctly understand what you said here:

Quote:
Always check up with third parties, (e.g. if they have any terms of services / acceptable usage policies available) for their services, if they don't, ask them if you may use their API end points for things like this.
There is also no guarantee that the end point used will be available next month, next year, or even the year after that.. So in theory, there are chances that your provided plugin will break too.
His last activity was about two years ago.
So I deleted the url from code but I don't know PHP at all.

If someone can write it please do it.
WatchDogs is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 07-05-2017 , 05:21   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #12

Quote:
Originally Posted by WatchDogs View Post
I edited the post and added cfg file creation.


You should change the cvar "sm_private_kick_url" to your php script url & set sm_private_kick_gameid cvar correctly too. If you don't plugin doesn't work at all.

The php file is here

You have to forgive me but I'm not really following. I'll try and read that page on GitHub to understand what I need to do to get the plugin to work :p

EDIT:

Code:
Locate a public folder on a website capable of hosting PHP files and with "php_curl" extension enabled.
Ok does that mean I need a webspace for this plugin to work?
Maybe I can just host that PHP stuff on my own server?
__________________

Last edited by Obyboby; 07-05-2017 at 05:22.
Obyboby is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 07-05-2017 , 05:39   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #13

Yes you should upload it to a host and set the URL in plugin cvar "sm_private_kick_url to work.
WatchDogs is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 07-06-2017 , 17:08   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #14

Quote:
Originally Posted by WatchDogs View Post
Yes you should upload it to a host and set the URL in plugin cvar "sm_private_kick_url to work.
Too bad, isn't there another way to do that for free? (Legally of course)
Free webspace providers, whatever..
I can't really afford buying a webspace at the moment :/
__________________
Obyboby is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-06-2017 , 17:10   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #15

Quote:
Originally Posted by WatchDogs View Post
Oh OK sorry. I didn't correctly understand what you said here:
I didn't mean to sound rude or offending in any way, if it could be understood like that. :-) It's just that, you never know what happens to such "third party" sites... :-)

I also don't know 100% sure if the owner wants that kind of use from other plugins or not.... But, when there is no public information about using his end point.

Actually, during the night before last night, I helped someone in the Veterans thread, where the API end point wasn't giving proper data due to some strict CloudFlare security settings on the author's site. Switching to another, but temporary end point which wasn't going over CloudFlare fixed it.

I adjusted things to create a more permanent solution, and here is a link you can use as much as you like:

Code:
https://steamapi.darkserv.download/veterans/
(Yes! It is correct: There should not be any "queryPlaytime.php" on the end!)

Feel free to spam away on this API end point though. It's a mirror created for the same purpose.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 07-06-2017 at 17:12.
DarkDeviL is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 07-06-2017 , 17:12   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #16

Quote:
Originally Posted by arne1288 View Post
I didn't mean to sound rude or offending in any way, if it could be understood like that. :-) It's just that, you never know what happens to such "third party" sites... :-)

I also don't know 100% sure if the owner wants that kind of use from other plugins or not.... But, when there is no public information about using his end point.

Actually, during the night before last night, I helped someone in the Veterans thread, where the API end point wasn't giving proper data due to some strict CloudFlare security settings on the author's site. Switching to another, but temporary end point which wasn't going over CloudFlare fixed it.

I adjusted things to create a more permanent solution, and here is a link you can use as much as you like:

Code:
https://steamapi.darkserv.download/veterans/
(Yes! It is correct: There should not be any "queryPlaytime.php" on the end!)

Feel free to spam away on this API end point though. It's a mirror created for the same purpose.
I'm sorry if I got that wrong, but does that URL allow me to make this plugin work without renting a webspace?
__________________
Obyboby is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 07-06-2017 , 17:28   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #17

Quote:
Originally Posted by arne1288 View Post
I didn't mean to sound rude or offending in any way, if it could be understood like that. :-) It's just that, you never know what happens to such "third party" sites... :-)

I also don't know 100% sure if the owner wants that kind of use from other plugins or not.... But, when there is no public information about using his end point.

Actually, during the night before last night, I helped someone in the Veterans thread, where the API end point wasn't giving proper data due to some strict CloudFlare security settings on the author's site. Switching to another, but temporary end point which wasn't going over CloudFlare fixed it.

I adjusted things to create a more permanent solution, and here is a link you can use as much as you like:

Code:
https://steamapi.darkserv.download/veterans/
(Yes! It is correct: There should not be any "queryPlaytime.php" on the end!)

Feel free to spam away on this API end point though. It's a mirror created for the same purpose.
Yeah you are right !

Thank you so much for the link too


A help request please:

I received a private message from someone that plugin doesn't works.
I edited it and added some debug logs. The problem is from Body Size value (iBodySize in plugin).
It doesn't returns 0 when client profile is private so plugin does not detects it's private!

Here I uploaded the new source: https://github.com/WatchDogsDev/Test

Here are logs when client profile is private:

PHP Code:
L 07/06/2017 20:01:59: [PrivateKicker.smxHTTP Request has sent for client 1UserID2Steam2STEAM_1:1:xxxxxxxxGameID730URLxxx
L 07
/06/2017 20:02:00: [PrivateKicker.smxHTTP Request call backclient 1UserID
L 07
/06/2017 20:02:00: [PrivateKicker.smxHTTP Request call backclient 1UserID2iBodySize
L 07
/06/2017 20:02:00: [PrivateKicker.smxHTTP Request call backclient 1UserID2sBody: || 
L 07/06/2017 20:02:48: [PrivateKicker.smxHTTP Request has sent for client 1UserID3Steam2STEAM_1:1:xxxxxxxGameID730URLxxx
L 07
/06/2017 20:02:49: [PrivateKicker.smxHTTP Request call backclient 1UserID
L 07
/06/2017 20:02:49: [PrivateKicker.smxHTTP Request call backclient 1UserID3iBodySize
L 07
/06/2017 20:02:49: [PrivateKicker.smxHTTP Request call backclient 1UserID3sBody: || 
WatchDogs is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-06-2017 , 17:57   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #18

Quote:
Originally Posted by Obyboby View Post
I'm sorry if I got that wrong, but does that URL allow me to make this plugin work without renting a webspace?
I am the one operating the official DarkServ domains, including darkserv.download, so yes.


Actually, looking a little bit closer:

The Veterans seem to always return at least "||", even on private profiles, which means the body size shouldn't be 0 at all. Since the plugin is kicking if iBodySize == 0, I'm also very tempted to believe that this means that no one will ever be kicked at all, with the plugin at the current state.

That part might need some testing.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 07-06-2017 at 17:59. Reason: -your plugin+the plugin
DarkDeviL is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 07-06-2017 , 17:58   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #19

Quote:
Originally Posted by arne1288 View Post
I am the one operating the official DarkServ domains, including darkserv.download, so yes.


Actually, looking a little bit closer:

The Veterans seem to always return at least "||", even on private profiles, which means the body size shouldn't be 0 at all. Since your plugin is kicking if iBodySize == 0, I'm also very tempted to believe that this means that no one will ever be kicked at all, with your plugin at the current state.

That part might need some testing.
Well then thanks for doing this!
I am available to test.
__________________
Obyboby is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-06-2017 , 19:41   Re: Plugin that checks steam profiles and warns/kicks private profile holders
Reply With Quote #20

Quote:
Originally Posted by WatchDogs View Post
A help request please:

I received a private message from someone that plugin doesn't works.
I edited it and added some debug logs. The problem is from Body Size value (iBodySize in plugin).
It doesn't returns 0 when client profile is private so plugin does not detects it's private!
Yep, the stuff I also mentioned in the post above.

Game ID is not required to check profile status, so throw it away.

Code:
https://steamapi.darkserv.download/public/
Send steamID64 with the steamID64 to this one, e.g.:

Code:
	if(GetClientAuthId(client, AuthId_SteamID64, steamId[client], 32))
and
Code:
public void SendRequest(int client, char[] steamID64)
{
[...]
	SteamWorks_SetHTTPRequestGetOrPostParameter(hRequest, "steamID64", steamID64);
Private profile:
Code:
$ curl -s -D - -o - "https://steamapi.darkserv.download/public/?steamID64=76561197961798171"
HTTP/1.1 406 Not Acceptable
Public profile:
Code:
$ curl -s -D - -o - "https://steamapi.darkserv.download/public/?steamID64=76561197961798171"
HTTP/1.1 202 Accepted
then the HTTP callback could be like this:

Code:
public HTTP_RequestComplete(Handle HTTPRequest, bool bFailure, bool bRequestSuccessful, EHTTPStatusCode eStatusCode, any userid)
{
	int client = GetClientOfUserId(userid);

	PrintToServer("HTTP Request call back =>> client %i, UserID: %i, eStatusCode: %d, bRequestSuccessful: %i", client, userid, eStatusCode, bRequestSuccessful);

	if(bRequestSuccessful)
	{
		if(eStatusCode == k_EHTTPStatusCode202Accepted) {
			/* 202 Accepted	           == Steam Profile is PUBLIC */
			PrintToServer("Yes: %N has a PUBLIC profile.", client);
		}
		else if(eStatusCode == k_EHTTPStatusCode406NotAcceptable) {
		{
			/* 406 Not Acceptable      == Steam Profile is PRIVATE */
			PrintToServer("NO : %N has a PRIVATE profile.", client);
		}
		if(eStatusCode == k_EHTTPStatusCode503ServiceUnavailable) {
			/* 503 Service Unavailable == Steam network is down, or some connectivity issues; try again in a minute or two? */
			PrintToServer("BOO: %N checking failed, please try again later...", client);
		}
	}
}
  • A status code of "202 Accepted" means that the Steam ID has a PUBLIC profile.
  • A status code of "406 Not Acceptable" means that the Steam ID has a PRIVATE profile.
  • Any other codes would normally indicate that there was an error during the lookup.
    And in that case, I suggest you wait a minute or two and then re-try the API call.

Quote:
Originally Posted by WatchDogs View Post
Here I uploaded the new source: https://github.com/WatchDogsDev/Test
Hrmf, somehow, I like the code in post #6 better than the GitHub one.

Quote:
Originally Posted by Obyboby View Post
Well then thanks for doing this!
NP!
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 07-06-2017 at 20:18.
DarkDeviL 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 06:51.


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