self.log_msg('@ enter tile control password for "%s":' % self.tile_control_char)
elif self.mode.name == 'control_tile_draw':
self.log_msg('@ can draw tile control character "%s", turn drawing on/off with [%s], finish with [%s].' % (self.tile_control_char, self.keys['toggle_tile_draw'], self.keys['switch_to_admin_enter']))
+ self.input_ = ""
self.restore_input_values()
def loop(self, stdscr):
self.log_msg('@ aborted')
else:
self.send('SET_MAP_CONTROL_PASSWORD ' + quote(self.tile_control_char) + ' ' + quote(self.input_))
- self.input_ = ""
self.switch_mode('admin')
elif self.mode.name == 'password' and key == '\n':
if self.input_ == '':
self.input_ = ' '
self.password = self.input_
- self.input_ = ""
self.switch_mode('edit')
elif self.mode.name == 'admin_enter' and key == '\n':
self.send('BECOME_ADMIN ' + quote(self.input_))
- self.input_ = ""
self.switch_mode('play')
elif self.mode.name == 'control_pw_type' and key == '\n':
if len(self.input_) != 1:
self.log_msg('@ entered non-single-char, therefore aborted')
self.switch_mode('admin')
- self.input_ = ""
else:
self.tile_control_char = self.input_
- self.input_ = ""
self.switch_mode('control_pw_pw')
elif self.mode.name == 'control_tile_type' and key == '\n':
if len(self.input_) != 1:
self.log_msg('@ entered non-single-char, therefore aborted')
self.switch_mode('admin')
- self.input_ = ""
else:
self.tile_control_char = self.input_
- self.input_ = ""
self.switch_mode('control_tile_draw')
elif self.mode.name == 'chat' and key == '\n':
if self.input_ == '':
self.input_ = ' '
self.send('ANNOTATE %s %s %s' % (self.explorer, quote(self.input_),
quote(self.password)))
- self.input_ = ""
self.switch_mode('edit')
elif self.mode.name == 'portal' and key == '\n':
if self.input_ == '':
self.input_ = ' '
self.send('PORTAL %s %s %s' % (self.explorer, quote(self.input_),
quote(self.password)))
- self.input_ = ""
self.switch_mode('edit')
elif self.mode.name == 'study':
if self.mode.mode_switch_on_key(self, key):