home · contact · privacy
Remove command char configurability, hardcode '/'.
[plomrogue2-experiments] / new2 / rogue_chat_curses.py
index 9eb99c89354b9402aeddc28f857c0f1b01cd91d5..5b3a7a81ae4f5c84b699d7b97b30538c502e3d9a 100755 (executable)
@@ -219,11 +219,11 @@ class TUI:
     def help(self):
         self.log_msg("HELP:");
         self.log_msg("chat mode commands:");
-        self.log_msg("  :nick NAME - re-name yourself to NAME");
-        self.log_msg("  :msg USER TEXT - send TEXT to USER");
-        self.log_msg("  :help - show this help");
-        self.log_msg("  :P or :play - switch to play mode");
-        self.log_msg("  :? or :study - switch to study mode");
+        self.log_msg("  /nick NAME - re-name yourself to NAME");
+        self.log_msg("  /msg USER TEXT - send TEXT to USER");
+        self.log_msg("  /help - show this help");
+        self.log_msg("  /P or /play - switch to play mode");
+        self.log_msg("  /? or /study - switch to study mode");
         self.log_msg("commands common to study and play mode:");
         if type(self.game.map_geometry) == MapGeometrySquare:
             self.log_msg("  w,a,s,d - move");
@@ -455,22 +455,22 @@ class TUI:
                 self.send('LOGIN ' + quote(self.input_))
                 self.input_ = ""
             elif self.mode == self.mode_chat and key == '\n':
-                if self.input_[0] == ':':
-                    if self.input_ in {':P', ':play'}:
+                if self.input_[0] == '/':
+                    if self.input_ in {'/P', '/play'}:
                         self.switch_mode('play')
-                    elif self.input_ in {':?', ':study'}:
+                    elif self.input_ in {'/?', '/study'}:
                         self.switch_mode('study')
-                    if self.input_ == ':help':
+                    elif self.input_ == '/help':
                         self.help()
-                    if self.input_ == ':reconnect':
+                    elif self.input_ == '/reconnect':
                         reconnect()
-                    elif self.input_.startswith(':nick'):
+                    elif self.input_.startswith('/nick'):
                         tokens = self.input_.split(maxsplit=1)
                         if len(tokens) == 2:
                             self.send('LOGIN ' + quote(tokens[1]))
                         else:
                             self.log_msg('? need login name')
-                    elif self.input_.startswith(':msg'):
+                    elif self.input_.startswith('/msg'):
                         tokens = self.input_.split(maxsplit=2)
                         if len(tokens) == 3:
                             self.send('QUERY %s %s' % (quote(tokens[1]),