home · contact · privacy
Fix single char chat messages.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 29 Oct 2020 16:18:31 +0000 (17:18 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 29 Oct 2020 16:18:31 +0000 (17:18 +0100)
new2/plomrogue/io.py
new2/rogue_chat_nocanvas_monochrome.html

index 908d7bf504b7c304c937729b1bb5cccb3f47538b..2c048f03b4b1b70fb47356af8cb5ecdc4e1b9c93 100644 (file)
@@ -56,6 +56,7 @@ class GameIO():
         from plomrogue.errors import GameError, ArgError, PlayError
         from plomrogue.misc import quote
 
+        print('DEBUG', input_);
         def answer(connection_id, msg):
             if connection_id:
                 self.send(msg, connection_id)
index 7f1820f976793f39f28af3d996336cd60b879ed6..0ec239426a1b5814470543f7904de03e4900761f 100644 (file)
@@ -527,9 +527,11 @@ document.addEventListener('keydown', (event) => {
                 } else {
                     tui.log_msg('? unknown command');
                 }
-            } else {
-                server.send(['ALL', tui.input]);
+           } else {
+               server.send(['ALL', tui.input]);
             }
+       } else if (tui.input.length > 0) {
+           server.send(['ALL', tui.input]);
         }
         tui.empty_input();
         tui.full_refresh();