self.input_ = ""
self.switch_mode('play')
elif self.mode == self.mode_chat and key == '\n':
- if self.input_[0] == '/':
+ if self.input_ == '':
+ continue
+ if self.input_[0] == '/': # FIXME fails on empty input
if self.input_ in {'/' + self.keys['switch_to_play'], '/play'}:
self.switch_mode('play')
elif self.input_ in {'/' + self.keys['switch_to_study'], '/study'}: