# evennia.commands.default.syscommands

System commands

These are the default commands called by the system commandhandler when various exceptions occur. If one of these commands are not implemented and part of the current cmdset, the engine falls back to a default solution instead.

Some system commands are shown in this module as a REFERENCE only (they are not all added to Evennia’s default cmdset since they don’t currently do anything differently from the default backup systems hard-wired in the engine).

Overloading these commands in a cmdset can be used to create interesting effects. An example is using the NoMatch system command to implement a line-editor where you don’t have to start each line with a command (if there is no match to a known command, the line is just added to the editor buffer).

class `evennia.commands.default.syscommands.``SystemNoInput`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  This is called when there is no input given

  `key` = '__noinput_command'
  `locks` = 'cmd:all()'
  `func`()

    Do nothing.

  `aliases` = []
  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' ', 'tags': '', 'text': '\n This is called when there is no input given\n '}

class `evennia.commands.default.syscommands.``SystemNoMatch`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  No command was found matching the given input.

  `key` = '__nomatch_command'
  `locks` = 'cmd:all()'
  `func`()

    This is given the failed raw string as input.

  `aliases` = []
  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'no_prefix': ' ', 'tags': '', 'text': '\n No command was found matching the given input.\n '}

class `evennia.commands.default.syscommands.``SystemMultimatch`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  Multiple command matches.

  The cmdhandler adds a special attribute ‘matches’ to this system command.

  > matches = [(cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname) , (cmdname, …), …]

  Here, cmdname is the command’s name and args the rest of the incoming string, without said command name. cmdobj is the Command instance, the cmdlen is the same as len(cmdname) and mratio is a measure of how big a part of the full input string the cmdname takes up - an exact match would be 1.0. Finally, the raw_cmdname is the cmdname unmodified by eventual prefix-stripping.

  `key` = '__multimatch_command'
  `locks` = 'cmd:all()'
  `func`()

    Handle multiple-matches by using the at_search_result default handler.

  `aliases` = []
  `help_category` = 'general'
  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': '', 'category': 'general', 'key': '__multimatch_command', 'no_prefix': ' ', 'tags': '', 'text': "\n Multiple command matches.\n\n The cmdhandler adds a special attribute 'matches' to this\n system command.\n\n matches = [(cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname) , (cmdname, ...), ...]\n\n Here, `cmdname` is the command's name and `args` the rest of the incoming string,\n without said command name. `cmdobj` is the Command instance, the cmdlen is\n the same as len(cmdname) and mratio is a measure of how big a part of the\n full input string the cmdname takes up - an exact match would be 1.0. Finally,\n the `raw_cmdname` is the cmdname unmodified by eventual prefix-stripping.\n\n "}