ClientFilter
A client filter, used for sending messages to a filtered set of clients. If a rule is not specified (like not setting a tag list), the rule is ignored.
Fields:
ClientTypes ClientType[]
The types of clients to filter by. Specifying multiple tags checks that the client is of one of the specified types.
FilterType ClientFilterType
The type of logic to apply to this filter. AND means all specified rules must be matched by the client. OR means if any specified rule is matched the client will be included.
Ids number[]
A list of client ids to filter by
Tags string[]
A list of client tags to filter by. Specifying multiple tags means the client must have at least one of the tags (not all).
Constructors:
New() :
Create a new client filter. Empty filters match all clients.
New(clientType: ClientType) :
Create a new client filter that matches clients of the specified type.
Name | Type | Default | Summary |
clientType | ClientType | The client type to match |
New(clientTypes: ClientType[]) :
Create a new client filter that includes any clients with any of the specified types.
Name | Type | Default | Summary |
clientTypes | ClientType[] | The client types to match |
New(id: number) :
Create a new client filter that matches a specific client id.
Name | Type | Default | Summary |
id | number | The client id to match |
New(ids: number[]) :
Create a new client filter that includes any clients with an id in the list.
Name | Type | Default | Summary |
ids | number[] | A list of ids to match |
New(tag: string) :
Create a new client filter that matches a specified tag.
Name | Type | Default | Summary |
tag | string | That tag to match |
New(tags: string[]) :
Create a new client filter that includes any clients with any of the specified tags.
Name | Type | Default | Summary |
tags | string[] | The tags to match |
New(ids: number[], tags: string[], clientTypes: ClientType[], filterType: ClientFilterType) :
Create a new client filter and optionally specify ids, tags, client types, and logic type for multiple defined rules. Leaving any of these as null / empty will ignore that specific rule.
Name | Type | Default | Summary |
ids | number[] | A list of ids to match against | |
tags | string[] | A list of tags to match against. Specifying multiple tags will check that the client includes any of these tags. | |
clientTypes | ClientType[] | A list of client types to match against. Specifying multiple type will check that the client is a type contained in this list. | |
filterType | ClientFilterType | The type of logic to apply to this filter. AND means all specified rules must be matched by the client. OR means if any specified rule is matched the client will be included. |
Methods:
GetPropertyKeys() : string[]
Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts
HasRules() : boolean
Check if this filter has any rules specified
ToString() : string
Returns a string that represents the current object.