evennia.contrib.base_systems.ingame_reports.reports¶
In-Game Reporting System
This contrib provides an in-game reporting system, with player-facing commands and a staff management interface.
Installation¶
To install, just add the provided cmdset to your default AccountCmdSet:
# in commands/default_cmdset.py
from evennia.contrib.base_systems.ingame_reports import ReportsCmdSet
- class AccountCmdSet(default_cmds.AccountCmdSet):
# …
- def at_cmdset_creation(self):
# … self.add(ReportsCmdSet)
Features¶
The contrib provides three commands by default and their associated report types: CmdBug, CmdIdea, and CmdReport (which is for reporting other players).
The ReportCmdBase class holds most of the functionality for creating new reports, providing a convenient parent class for adding your own categories of reports.
The contrib can be further configured through two settings, INGAME_REPORT_TYPES and INGAME_REPORT_STATUS_TAGS
- class evennia.contrib.base_systems.ingame_reports.reports.CmdManageReports(**kwargs)[source]¶
Bases:
MuxCommandmanage the various reports
- Usage:
manage [report type]
- Available report types:
bugs ideas players
Initializes a menu for reviewing and changing the status of current reports.
- key = 'manage reports'¶
- aliases = ['manage players', 'manage ideas', 'manage bugs']¶
- locks = 'cmd:pperm(Admin)'¶
- get_help(caller, cmdset)[source]¶
Returns a help string containing the configured available report types
- func()[source]¶
- This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.
- help_category = 'general'¶
- lock_storage = 'cmd:pperm(Admin)'¶
- search_index_entry = {'aliases': 'manage players manage ideas manage bugs', 'category': 'general', 'key': 'manage reports', 'no_prefix': ' manage players manage ideas manage bugs', 'tags': '', 'text': '\nmanage the various reports\n\nUsage:\n manage [report type]\n\nAvailable report types:\n bugs\n ideas\n players\n\nInitializes a menu for reviewing and changing the status of current reports.\n'}¶
- class evennia.contrib.base_systems.ingame_reports.reports.ReportCmdBase(**kwargs)[source]¶
Bases:
MuxCommandA parent class for creating report commands. This help text may be displayed if your command’s help text is not properly configured.
- help_category = 'reports'¶
- report_locks = 'read:pperm(Admin)'¶
- require_target = False¶
- success_msg = 'Your report has been filed.'¶
- report_type = None¶
- parse()[source]¶
Parse the target and message out of the arguments.
Override if you want different syntax, but make sure to assign report_message and target_str.
- target_search(searchterm, **kwargs)[source]¶
Search for a target that matches the given search term. By default, does a normal search via the caller - a local object search for a Character, or an account search for an Account.
- Parameters:
searchterm (str)
- Returns:
result (Object, Account, or None) - the result of the search
- create_report(*args, **kwargs)[source]¶
Creates the report. By default, this creates a Msg with any provided args and kwargs.
- Returns:
success (bool) - True if the report was created successfully, or False if there was an issue.
- func()[source]¶
- This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.
- aliases = []¶
- key = 'command'¶
- lock_storage = 'cmd:all();'¶
- search_index_entry = {'aliases': '', 'category': 'reports', 'key': 'command', 'no_prefix': ' ', 'tags': '', 'text': "\nA parent class for creating report commands. This help text may be displayed if\nyour command's help text is not properly configured.\n"}¶
- class evennia.contrib.base_systems.ingame_reports.reports.CmdBug(**kwargs)[source]¶
Bases:
ReportCmdBasefile a bug
- Usage:
bug [<target> =] <message>
Note: If a specific object, location or character is bugged, please target it for the report.
Examples
bug hammer = This doesn’t work as a crafting tool but it should bug every time I go through a door I get the message twice
- key = 'bug'¶
- report_locks = 'read:pperm(Developer)'¶
- aliases = []¶
- help_category = 'reports'¶
- lock_storage = 'cmd:all();'¶
- search_index_entry = {'aliases': '', 'category': 'reports', 'key': 'bug', 'no_prefix': ' ', 'tags': '', 'text': "\nfile a bug\n\nUsage:\n bug [<target> =] <message>\n\nNote: If a specific object, location or character is bugged, please target it for the report.\n\nExamples:\n bug hammer = This doesn't work as a crafting tool but it should\n bug every time I go through a door I get the message twice\n"}¶
- class evennia.contrib.base_systems.ingame_reports.reports.CmdReport(**kwargs)[source]¶
Bases:
ReportCmdBasereport a player
- Usage:
report <player> = <message>
All player reports will be reviewed.
- key = 'report'¶
- report_type = 'player'¶
- require_target = True¶
- account_caller = True¶
- aliases = []¶
- help_category = 'reports'¶
- lock_storage = 'cmd:all();'¶
- search_index_entry = {'aliases': '', 'category': 'reports', 'key': 'report', 'no_prefix': ' ', 'tags': '', 'text': '\nreport a player\n\nUsage:\n report <player> = <message>\n\nAll player reports will be reviewed.\n'}¶
- class evennia.contrib.base_systems.ingame_reports.reports.CmdIdea(**kwargs)[source]¶
Bases:
ReportCmdBasesubmit a suggestion
- Usage:
ideas idea <message>
Example
idea wouldn’t it be cool if we had horses we could ride
- key = 'idea'¶
- aliases = ['ideas']¶
- report_locks = 'read:pperm(Builder)'¶
- success_msg = 'Thank you for your suggestion!'¶
- func()[source]¶
- This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.
- help_category = 'reports'¶
- lock_storage = 'cmd:all();'¶
- search_index_entry = {'aliases': 'ideas', 'category': 'reports', 'key': 'idea', 'no_prefix': ' ideas', 'tags': '', 'text': "\nsubmit a suggestion\n\nUsage:\n ideas\n idea <message>\n\nExample:\n idea wouldn't it be cool if we had horses we could ride\n"}¶
- class evennia.contrib.base_systems.ingame_reports.reports.ReportsCmdSet(cmdsetobj=None, key=None)[source]¶
Bases:
CmdSet- key = 'Reports CmdSet'¶
- at_cmdset_creation()[source]¶
Hook method - this should be overloaded in the inheriting class, and should take care of populating the cmdset by use of self.add().
- path = 'evennia.contrib.base_systems.ingame_reports.reports.ReportsCmdSet'¶