diff options
| author | RblSb <msrblsb@gmail.com> | 2020-03-02 03:26:01 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-03-02 03:37:30 +0300 |
| commit | fe6875904f0c8f4ed8359efe961570307d9cbae6 (patch) | |
| tree | c19c6274609c88b519ab5676ace5d7665512e153 /src/client/Buttons.hx | |
| parent | 2ade04273717807096a07b6eb132b7677917392d (diff) | |
addAdmin server command
Diffstat (limited to 'src/client/Buttons.hx')
| -rw-r--r-- | src/client/Buttons.hx | 13 |
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"); |
