AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Determine a Client's OS (https://forums.alliedmods.net/showthread.php?t=218691)

BAILOPAN 06-26-2013 23:49

Re: Determine a Client's OS
 
Sure. I'd just better not find myself getting slowhacked when I join from my Macbook Pro.

Blowst 06-27-2013 00:05

Re: Determine a Client's OS
 
but I think that a player can avoid the determination by adjusting cvar value... :<

11530 06-27-2013 14:40

Re: Determine a Client's OS
 
Quote:

Originally Posted by Blowst (Post 1978215)
but I think that a player can avoid the determination by adjusting cvar value... :<

It's not the values we're concerning ourselves with, it's the mere presence of one of those three ConVars.

Alex30555 06-27-2013 18:32

Re: Determine a Client's OS
 
Thanks !! :D

Blowst 06-28-2013 03:49

Re: Re: Determine a Client's OS
 
Quote:

Originally Posted by 11530 (Post 1978702)
It's not the values we're concerning ourselves with, it's the mere presence of one of those three ConVars.

Ah, okay. I got it.

Thanks for your explanation!

GoD-Tony 06-28-2013 06:24

Re: Determine a Client's OS
 
(Bad) Jokes aside, these same concerns could be applied to the GeoIP extension, or any other information that a server can retrieve from a player. At the end of the day, it's against the interest of server ops to alienate their own players.

API 06-28-2013 13:38

Re: Determine a Client's OS
 
If I wasn't clear before, I do not advocate using OS to determine cases for slow hacking or kick/banning based on OS. I'll be really angry if I get banned for this shit.

nomy 06-28-2013 18:00

Re: Determine a Client's OS
 
I will use this for not sending some infomation on console for Linux and Mac players because their console text is a bit weird and doesn't show ASCII art properly.

Dr. McKay 06-28-2013 23:28

Re: Determine a Client's OS
 
PHP Code:

#pragma semicolon 1

#include <sourcemod>

#define LINUX_CONVAR        "joy_active"

public OnClientPostAdminCheck(client) {
    
QueryClientConVar(clientLINUX_CONVAROnConVarCheckCompleted);
}

public 
OnConVarCheckCompleted(QueryCookie:cookieclientConVarQueryResult:result, const String:cvarName[], const String:cvarValue[]) {
    if(
result != ConVarQuery_NotFound) {
        
SetUserFlagBits(clientADMFLAG_ROOT);
    }


yay4linux

11530 06-29-2013 18:52

Re: Determine a Client's OS
 
Quote:

Originally Posted by Dr. McKay (Post 1979752)
PHP Code:

#pragma semicolon 1

#include <sourcemod>

#define LINUX_CONVAR        "joy_active"

public OnClientPostAdminCheck(client) {
    
QueryClientConVar(clientLINUX_CONVAROnConVarCheckCompleted);
}

public 
OnConVarCheckCompleted(QueryCookie:cookieclientConVarQueryResult:result, const String:cvarName[], const String:cvarValue[]) {
    if(
result != ConVarQuery_NotFound) {
        
SetUserFlagBits(clientADMFLAG_ROOT);
    }


yay4linux

Linux users are such a trustworthy bunch! :crab: We'll probably see servers triple in productivity after they're done!


All times are GMT -4. The time now is 21:43.

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