- self.server = server_class(q, port)
- try:
- self.server.serve_forever()
- except KeyboardInterrupt:
- pass
- finally:
- print('Killing server')
- self.server.server_close()
-
- def handle_input(self, input_, connection_id=None):
- """Process input_ to command grammar, call command handler if found."""
- from inspect import signature
- from plomrogue.errors import GameError, ArgError
+
+ def handle_input(self, input_, connection_id=None, god_mode=False):
+ """Process input_ to command grammar, call command handler if found.
+
+ Command handlers that have no connectin_i argument in their
+ signature will only be called if god_mode is set.
+
+ """
+ from plomrogue.errors import GameError, ArgError, PlayError