diff options
| author | RblSb <msrblsb@gmail.com> | 2020-02-22 06:35:57 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-02-22 06:35:57 +0300 |
| commit | 08d068181045f91f0aa160f9b088a18048b948ec (patch) | |
| tree | a995230c279a5a1fd849dc5202301d15474bca61 /src/ClientTools.hx | |
| parent | 4e0859a0f902e84cfafb38103e0be9f5b81d7abe (diff) | |
More client buttons
Diffstat (limited to 'src/ClientTools.hx')
| -rw-r--r-- | src/ClientTools.hx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ClientTools.hx b/src/ClientTools.hx index 4503ada..26faab6 100644 --- a/src/ClientTools.hx +++ b/src/ClientTools.hx @@ -16,11 +16,13 @@ class ClientTools { return false; } - public static function getByName(clients:Array<Client>, name:String):Null<Client> { + public static function getByName( + clients:Array<Client>, name:String, ?def:Client + ):Null<Client> { for (client in clients) { if (client.name == name) return client; } - return null; + return def; } } |
