cmd_target

Синтаксис

stock cmd_target(id, const arg[], flags = CMDTARGET_OBEY_IMMUNITY)

Употреба

id
Client index of admin performing an action
arg
Target pattern
flags
Filtering flags, see CMDTARGET_* constants above

Описание

Processes a generic target pattern and tries to match it to a client based
on filtering flags. If no unique target is found an appropriate message is
displayed to the admin.

Забележка

The pattern is first matched case insensitively against client names.
If no match is found it is matched against client authids. If still no
match is found and the pattern starts with '#' it is finally matched
against client userids.

Забележка

Since client names are matched by substring the pattern can potentially
match multiple targets. In that case the function will return 0 and ask
the admin to provide a unique pattern.

Забележка

The filtering flags are applied after the pattern matching has
finished. That means the pattern has to be unique against all clients
on the server even if some of them are not eligible.

Връщаща стойност

Client index, or 0 if no or multiple clients matched