home · contact · privacy
Improve player error messages, and log them to clients.
[plomrogue2] / rogue_chat_curses.py
index 0644a4ccc439ebda77eacce232162748a7aeabac..2dfbdd1b6b76772877ac47b9db7c04b4e199e919 100755 (executable)
@@ -138,6 +138,7 @@ def cmd_PORTAL(game, position, msg):
 cmd_PORTAL.argtypes = 'yx_tuple:nonneg string'
 
 def cmd_PLAY_ERROR(game, msg):
+    game.tui.log_msg('? ' + msg)
     game.tui.flash()
     game.tui.do_refresh = True
 cmd_PLAY_ERROR.argtypes = 'string'
@@ -689,13 +690,6 @@ class TUI:
                             self.send('NICK ' + quote(tokens[1]))
                         else:
                             self.log_msg('? need login name')
-                    #elif self.input_.startswith('/msg'):
-                    #    tokens = self.input_.split(maxsplit=2)
-                    #    if len(tokens) == 3:
-                    #        self.send('QUERY %s %s' % (quote(tokens[1]),
-                    #                                          quote(tokens[2])))
-                    #    else:
-                    #        self.log_msg('? need message target and message')
                     else:
                         self.log_msg('? unknown command')
                 else:
@@ -762,4 +756,5 @@ class TUI:
                 self.send('TASK:WRITE %s %s' % (key, quote(self.password)))
                 self.switch_mode('play')
 
-TUI('localhost:5000')
+#TUI('localhost:5000')
+TUI('wss://plomlompom.com/rogue_chat/')