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

How to ban players that enter my server with no steam id?


Post New Thread Reply   
 
Thread Tools Display Modes
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 04-08-2015 , 16:41   Re: How to ban players that enter my server with no steam id?
Reply With Quote #11

Revemu is used for hosting nonsteam servers, Its illegal and opens your servers up to a variety of different exploits and problems. I'm with psychonic on this one, you should get rid of it.

As for your question, you need an Internet Connection for the first run I believe, and then after that you can play the game in offline mode.
SM9 is offline
Cuban_Dota
Member
Join Date: Jan 2015
Old 04-09-2015 , 12:29   Re: How to ban players that enter my server with no steam id?
Reply With Quote #12

Quote:
Originally Posted by xCoderx View Post
Revemu is used for hosting nonsteam servers, Its illegal and opens your servers up to a variety of different exploits and problems. I'm with psychonic on this one, you should get rid of it.

As for your question, you need an Internet Connection for the first run I believe, and then after that you can play the game in offline mode.
Revemu is illegal?? are u sure?. An for the first run, forget it, it is impossible.Thx for your reply
Cuban_Dota is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 04-09-2015 , 18:24   Re: How to ban players that enter my server with no steam id?
Reply With Quote #13

PHP Code:
char chRestrictedIds[][] = 
{
    
"",
    
"STEAM_ID_LAN",
    
"STEAM_ID_VALVE",
    
"VALVE_ID_LAN",
    
"STEAM_1:0:0",
    
"STEAM_0:0:0",
    
"[I:0:0]",
    
};

public 
Plugin:myinfo 
{
    
name "Null Auth Ban",
    
author "SM9 (xCoderx)",
}

public 
void OnClientAuthorized(int iClient, const char[] chAuthId)
{
    
char chAuthId2[30], chAuthId3[30]
    
    
GetClientAuthId(iClientAuthId_Steam2chAuthId2sizeof(chAuthId2))
    
GetClientAuthId(iClientAuthId_Steam3chAuthId3sizeof(chAuthId3))
    
    for(
int isizeof(chRestrictedIds); i++)
    {
        if(
StrEqual(chAuthId2chRestrictedIds[i], false) || StrEqual(chAuthId3chRestrictedIds[i], false) || StrEqual(chAuthIdchRestrictedIds[i], false))
        {
            
BanClient(iClient0BANFLAG_IP"Null / Invalid AuthId (%s)""Null / Invalid AuthId");
            if(
IsClientInGame(iClient)) KickClient(iClient"Null / Invalid AuthId");
            break;
        }
        
        continue;
    }
    
    if(!
IsClientAuthorized(iClient)) KickClient(iClient"Authorize failure, please retry.");

Try this, you can add your own ids to the top aswell.
Attached Files
File Type: sp Get Plugin or Get Source (NullAuthBan.sp - 115 views - 1,008 Bytes)
SM9 is offline
Cuban_Dota
Member
Join Date: Jan 2015
Old 04-10-2015 , 15:05   Re: How to ban players that enter my server with no steam id?
Reply With Quote #14

Quote:
Originally Posted by xCoderx View Post
PHP Code:
char chRestrictedIds[][] = 
{
    
"",
    
"STEAM_ID_LAN",
    
"STEAM_ID_VALVE",
    
"VALVE_ID_LAN",
    
"STEAM_1:0:0",
    
"STEAM_0:0:0",
    
"[I:0:0]",
    
};

public 
Plugin:myinfo 
{
    
name "Null Auth Ban",
    
author "SM9 (xCoderx)",
}

public 
void OnClientAuthorized(int iClient, const char[] chAuthId)
{
    
char chAuthId2[30], chAuthId3[30]
    
    
GetClientAuthId(iClientAuthId_Steam2chAuthId2sizeof(chAuthId2))
    
GetClientAuthId(iClientAuthId_Steam3chAuthId3sizeof(chAuthId3))
    
    for(
int isizeof(chRestrictedIds); i++)
    {
        if(
StrEqual(chAuthId2chRestrictedIds[i], false) || StrEqual(chAuthId3chRestrictedIds[i], false) || StrEqual(chAuthIdchRestrictedIds[i], false))
        {
            
BanClient(iClient0BANFLAG_IP"Null / Invalid AuthId (%s)""Null / Invalid AuthId");
            if(
IsClientInGame(iClient)) KickClient(iClient"Null / Invalid AuthId");
            break;
        }
        
        continue;
    }
    
    if(!
IsClientAuthorized(iClient)) KickClient(iClient"Authorize failure, please retry.");

Try this, you can add your own ids to the top aswell.
thxxx a lot i will try it. I have a question, i have been trying something like this but in the player_activate event (Dota 2) and the server craches sometimes, do you know why???
Cuban_Dota is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 04-10-2015 , 17:17   Re: How to ban players that enter my server with no steam id?
Reply With Quote #15

Quote:
Originally Posted by Cuban_Dota View Post
thxxx a lot i will try it. I have a question, i have been trying something like this but in the player_activate event (Dota 2) and the server craches sometimes, do you know why???
Any error logs?
__________________
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].
DarkDeviL 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 07:22.


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