aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-03-02 03:26:01 +0300
committerRblSb <msrblsb@gmail.com>2020-03-02 03:37:30 +0300
commitfe6875904f0c8f4ed8359efe961570307d9cbae6 (patch)
treec19c6274609c88b519ab5676ace5d7665512e153 /src/client/Buttons.hx
parent2ade04273717807096a07b6eb132b7677917392d (diff)
addAdmin server command
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 51ba75d..e567331 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -209,13 +209,12 @@ class Buttons {
static function initChatInput(main:Main):Void {
final guestName:InputElement = cast ge("#guestname");
guestName.onkeydown = e -> {
- if (guestName.value.length == 0) return;
- if (e.keyCode == 13) main.send({
- type: Login,
- login: {
- clientName: guestName.value
- }
- });
+ if (e.keyCode == 13) main.guestLogin(guestName.value);
+ }
+
+ final guestPass:InputElement = cast ge("#guestpass");
+ guestPass.onkeydown = e -> {
+ if (e.keyCode == 13) main.userLogin(guestName.value, guestPass.value);
}
final chatLine:InputElement = cast ge("#chatline");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage