View Single Post
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 02-24-2018 , 12:39   Re: [CS:GO] add checker ServerID
Reply With Quote #5

Quote:
Originally Posted by arne1288 View Post
SourceBans is a GLOBAL ban database, built to work across all your servers, and not built as a "per server" ban system.

Remove SourceBans and use the game engine's own ban system if you want things on a "per server" basis.
OR just add:
PHP Code:
while(SQL_FetchRow(hndl))
{
    new 
sid SQL_FetchInt(hndl1);
    if(
serverID != sid)
    {
        
PlayerStatus[client] = true;
        return;
    }

inside the function
PHP Code:
public VerifyBan(Handle:ownerHandle:hndl, const String:error[], any:userid
between functions:
PHP Code:
SQL_TQuery(DBErrorCheckCallbackQueryclientDBPrio_High); 
and:
PHP Code:
FormatEx(buffersizeof(buffer), "banid 5 %s"clientAuth); 
Then in function:
PHP Code:
public OnClientAuthorized(client, const String:auth[]) 
modify the FormatEx string from:
PHP Code:
"SELECT bid FROM %s_bans WHERE ((type = 0 AND authid REGEXP '^STEAM_[0-9]:%s$') OR (type = 1 AND ip = '%s')) AND (length = '0' OR ends > UNIX_TIMESTAMP()) AND RemoveType IS NULL" 
to:
PHP Code:
"SELECT bid, sid FROM %s_bans WHERE ((type = 0 AND authid REGEXP '^STEAM_[0-9]:%s$') OR (type = 1 AND ip = '%s')) AND (length = '0' OR ends > UNIX_TIMESTAMP()) AND RemoveType IS NULL" 
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline