Commit graph

45 commits

Author SHA1 Message Date
Griatch
1fbb4c4358 Add functioning prefix-ignorer and cleanup of code. 2017-02-17 09:19:55 +01:00
Griatch
dffbf9f8d6 Rework prefix-ignorer to retain a reference to the unstripped cmdname. Currently unworking. 2017-02-17 09:19:55 +01:00
Griatch
4d14625504 Add info about the call string to the log when reporting command errors. 2017-02-06 19:35:10 +01:00
Griatch
74eebfed6d Refactor code to remove alerts as per lgtm and #1176. 2017-01-29 19:02:00 +01:00
Griatch
c6d9c0619e Refactor code for readability and compatibility. 2017-01-27 00:19:27 +01:00
Griatch
1d6873eef4 Fix caching error in new cmdset merge regime. Removed debug messages. 2016-10-15 23:22:33 +02:00
Griatch
a61a33e87d Refactor ChannelHandler. Fix issues with new cmdset merge procedures. 2016-10-15 22:48:38 +02:00
Griatch
1981f8073f Lots of debug messages. 2016-10-15 22:48:38 +02:00
Griatch
edacd58eab Refactor get_and_merge_cmdsets to merge all cmdsets in one place rather than sub-merging them separately on each object first. See #1087. Also changes the names of the auto-added _exitset to ExitCmdSet and _channelset to ChannelCmdSet. Allow Channel cmdsets to also be identified on Objects. 2016-10-15 22:48:38 +02:00
Griatch
bac6c7f234 Continue adding unit tests to cmdhandler.get_and_merge_cmdsets function. Not finished yet, unclear how to propagate the options correctly. 2016-10-15 22:48:38 +02:00
Griatch
40e1c67f88 Change how cmdset options are merged by priority - this is now a straight priority order, where the option from the higher prio goes. Also add unit tests for cmdset mergers. 2016-10-15 22:48:38 +02:00
Griatch
300758b2dd Testing a new variation on cmdset merging, as per #1087. 2016-10-15 22:48:37 +02:00
Griatch
17ee28ab6c Move COMMAND_NESTING safety handler into try..except..finally clause to avoid it ticking up accidentally due to the loop exiting from a traceback. 2016-09-03 22:52:29 +02:00
Griatch
ddd9387777 Fixed a traceback in SEARCH_AT_RESULT when getting multi-matches for commands. 2016-06-15 21:51:43 +02:00
Griatch
6a160b4204 Fix how the lock command returns strings to avoid a malformed AMP send. This (again fixes ##996. 2016-06-15 21:33:05 +02:00
Griatch
bd4ffa06f8 Fixed a misplaced comment that hid a traceback on error. 2016-05-22 20:45:41 +02:00
Griatch
4cb19bec59 Added IN_GAME_ERRORS setting for convenient debugging during development (False by default) 2016-05-22 20:45:41 +02:00
Griatch
8448b513e1 Converted msg-arguments to options 2016-05-22 20:45:06 +02:00
Ahmed Charles
921cf47731 Comment cleanup. 2015-11-15 20:29:40 +00:00
Griatch
1d78fb3d92 Fixed a lingering doc error. 2015-11-15 21:07:16 +01:00
Griatch
709f5ff5b3 Reworked most of the system to use sessions directly instead of sessids by the introduction of on-object sessionhandlers. No debugging done yet. 2015-11-14 18:36:19 +01:00
Griatch
652bb02bc7 In the wake of changes to hide away tracebacks from players, made the error report include the server log time stamp so as to make it easier to reconcile with the real traceback information. 2015-11-09 15:07:06 +01:00
Ahmed Charles
39e40bfba1 Don't show tracebacks to players.
In this case, the tracebacks are in the log.
2015-11-09 12:30:55 +01:00
Griatch
50371b6abd Merged conflicts. 2015-10-19 23:32:00 +02:00
Ahmed Charles
bc340fbf0d Remove commented out print statements. 2015-10-19 23:31:19 +02:00
Ahmed Charles
0384fcc63d Move to python3 style except. 2015-10-19 23:31:19 +02:00
Ahmed Charles
53ec675960 Add extra space between sentences. 2015-10-18 11:58:20 +02:00
Griatch
5d32d4f94e Added a command recursion limit to cmdhandler, raising a clean exception if a command calls other commands to a too nested level (10 levels down, if you use commands to that nesting level you are doing something wrong anyway). See #765. 2015-09-27 13:44:06 +02:00
Griatch
2743f98fb0 Removed SEARCH_AT_MULTIMATCH_INPUT and SEARCH_AT_MULTIMATCH_CMD settings and connected functions - these are no longer individually overloadable. SEARCH_AT_RESULT function now handles all error reporting. Also added SEARCH_MULTIMATCH_SEPARATOR to make it easy to replace the character used to separate multi-matches (1-box, 2-box is using '-' by default), in response to #795. Also moved the default SEARCH_AT_RESULT function from the cmdparser to evennia.utils.utils. 2015-09-27 13:05:29 +02:00
Jonathan Piacenti
a5887d23e2 Make command ambiguity handler pluggable. 2015-06-20 13:18:50 -05:00
Griatch
8e134af019 API change: Added no_superuser_bypass kwarg to obj.access, channel.access and player.access methods, to make the call consistent with the full lockhandler.check call. This allows the cmdhandler to use access() to check the 'call' locktype and thus make it available for overloading if so desired. Resolves #752. 2015-06-01 20:32:52 +02:00
Griatch
ae88d67548 Updated docstrings for a few modules, adopting to styles as per #709. 2015-05-15 18:43:04 +02:00
Griatch
5863ef29a8 Made cmdhandler respect an explicit True/False setting. 2015-03-22 17:22:59 +01:00
Griatch
b94bb17576 Implemented contents_cache handler for a speed boost for many situations, as per #620. 2015-02-28 11:29:05 +01:00
Jonathan Piacenti
9b7d4e656e Fix MULTISESSION_MODE = 3 2015-02-28 09:49:41 +01:00
Griatch
3db3d83d4c Fixed the ending of the tutorial and a bug in the spawner. 2015-02-22 17:46:56 +01:00
Griatch
d1cd9da6bf Extended cmdhandler error reporting with a lot - every inlineCallback needs its own internal error reporting in order to catch everything. 2015-02-22 17:46:56 +01:00
Griatch
56104d9a1d Made sure tickerhandler cleans itself of alrady-deleted objects. Some more bug fixes to reworked tutorialworld. 2015-02-22 17:46:55 +01:00
Griatch
5af3617d4e Fixed errors in bridge room. Some issues with tickerhandler starting with an invalid interval. 2015-02-22 17:46:55 +01:00
Griatch
c63ae1742f Reworked the build script and made the default tutorial_room more clever, using details and custom cmdsets. 2015-02-22 17:46:55 +01:00
Griatch
6f9042e191 Added better error reporting to cmdhandler - making a nested function to execute the command tended to hide tracebacks. 2015-02-22 17:46:55 +01:00
Griatch
27388d3dd1 Fixed a regression in cmdhandler that made systemcommands fail. 2015-02-15 09:47:19 +01:00
Griatch
eb6baf6e79 refactored cmdhandler to make sure syscmds and normal commands get called in exactly the same way, including at_pre/post_cmd hooks. 2015-02-11 08:43:57 +01:00
Griatch
3ff937a6fd Updated commands to use new evennia path. 2015-01-07 14:31:35 +01:00
Griatch
c7325a5032 Further reworking, naming the library folder 'evennia' instead of lib or src. 2015-01-07 13:36:57 +01:00
Renamed from lib/commands/cmdhandler.py (Browse further)