diff options
| author | RblSb <msrblsb@gmail.com> | 2025-03-06 07:53:55 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-03-06 07:53:55 +0300 |
| commit | 54eca03ba433c57f451fa3dfb72d72ae4d1877cd (patch) | |
| tree | fdcde2922e18ccd9b4d0188edfb887abd6c6d56c /src/client | |
| parent | b37c8485f2a2b04860c36bed5c59e76971714a03 (diff) | |
More informative permission errors
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/Main.hx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx index 8ed519b..e7f8f30 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -506,6 +506,15 @@ class Main { final text = switch (id) { case "usernameError": Lang.get(id).replace("$MAX", '${config.maxLoginLength}'); + case id if (id.startsWith("accessError")): + final args = id.split("|"); + final err = Lang.get(args[0]); + if (args[1] == null) { + '$err.'; + } else { + final permErr = Lang.get("noPermission").replace("$PERMISSION", args[1]); + '$err: $permErr'; + } default: Lang.get(id); } |
