View Single Post
Marshmallow
Member
Join Date: Nov 2018
Old 12-08-2018 , 11:57   Re: source tv kicking
Reply With Quote #18

Quote:
Originally Posted by Bacardi View Post
here is one old post... https://forums.alliedmods.net/showth...25#post1479525

But I update this little bit.
And this give only admin immunity level 98. Nothing else.

PHP Code:

#define IMMUNITY_LEVEL 98

public void OnPluginStart()
{
    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }
}

public 
void OnClientPostAdminCheck(int client)
{
    if(
IsClientReplay(client) || IsClientSourceTV(client))
    {

        
AdminId admin GetUserAdmin(client);

        if(
admin != INVALID_ADMIN_ID) return;


        
char name[MAX_NAME_LENGTH];
        
Format(namesizeof(name), "%N"client);

        
admin CreateAdmin(name);
        
SetAdminImmunityLevel(adminIMMUNITY_LEVEL);
        
SetUserAdmin(clientadmintrue);
        
PrintToServer("[SM] Immunity Level %i set to %s"IMMUNITY_LEVELname);
    }
}

public 
void OnRebuildAdminCache(AdminCachePart part)
{
    if(
part != AdminCache_Admins) return;

    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }

Second thing.
You should not grant anyone with admin flag "z" (root).


Root flag will give you more problems.
So it is better give all flags without "z" flag and set immunity below 98 they can't kick SourceTV or Replay anymore.

Hi duffy may be help me i run ip range ban in my server?

Last edited by Marshmallow; 12-08-2018 at 12:18.
Marshmallow is offline