Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SM Version 1.11 - build 6968 - sm_kick @spec #2194

Open
Trice1984 opened this issue Jul 22, 2024 · 7 comments
Open

SM Version 1.11 - build 6968 - sm_kick @spec #2194

Trice1984 opened this issue Jul 22, 2024 · 7 comments

Comments

@Trice1984
Copy link

Hello everybody,

my SM Version 1.11 - build 6968
my MM Version v1.11.0-dev+1155V.

We have a Linux Server ( Ubuntu 22.04.4 LTS).
We run CSS Server, now, when we will kick all spec, sm_kick @SPEC, they kick not all specs, we diabled Plugin ... but it is a bug in SM Version?

Does anyone else have these problems? We will find nothing in Forums and so one....

Kind regards

@Mooshua
Copy link

Mooshua commented Jul 26, 2024

So, sm_kick will only kick players you are allowed to kick. Are you trying to kick other admins or something like that?

Also, it would be really helpful if you could provide any reproduction or more details. Does this happen with specific players or can it be reproduced every time with a list of steps?

@Trice1984
Copy link
Author

Hello, thank you for the answer, the Root Admin permission is set, but it doesn't work for kick normal players either.
If 10 people are spectators, he kicks 4 or 7 but never ALL of them, but most often the same players remain without rights to the spectator.

@peace-maker
Copy link
Member

I'm assuming those players aren't in the spectator team but still in the "unassigned" team. The @SPEC target filter apparently doesn't treat them the same. There are plugins which add an @unassigend too.

@Trice1984
Copy link
Author

Hello, thanks for the answer, do you have an example for @unassigend kick? I only found this https://forums.alliedmods.net/showthread.php?t=59646?t=59646......... Maybe there are better ones?

@Trice1984
Copy link
Author

Standard is use:
sm_kick @unassigend
[SM] No matching client was found.

But 3 people where there and not kicked by use: sm_kick @SPEC :-(

@ambaca
Copy link
Contributor

ambaca commented Aug 13, 2024

Standard is use: sm_kick @unassigend [SM] No matching client was found.

But 3 people where there and not kicked by use: sm_kick @SPEC :-(

Compile this SM plugin code and load on your server.
Admins who have granted "sm_kick" can use targeting @unassigned.
This admin access can be override to else, using override word "target_unassigned_players".

public void OnPluginStart()
{
	AddMultiTargetFilter("@unassigned", filter, "unassigned players", false);
}

public bool filter(const char[] pattern, ArrayList clients, int client)
{

	RequireFeature(FeatureType_Capability, FEATURECAP_MULTITARGETFILTER_CLIENTPARAM, "Plugin multitargetfilter require: ", FEATURECAP_MULTITARGETFILTER_CLIENTPARAM);

	if(client && !CheckCommandAccess(client, "target_unassigned_players", ADMFLAG_KICK))
	{
		ReplyToCommand(client, "[SM] You have no access to target @unassigned players");
		return false;
	}

	for(int i = 1; i <= MaxClients; i++)
	{
		if(!IsClientInGame(i) || GetClientTeam(i) != 0) continue;
		
		clients.Push(i);
	}
	

	return true;
}

Usage: sm_kick @unassigned works

*updated, thanks to peace-maker for pointing typos

@peace-maker
Copy link
Member

*unassigned whoops 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants