Commit graph

158 commits

Author SHA1 Message Date
Griatch
59ccd3eb38 Fixed a bug in exact search pattern matching. 2012-09-27 21:29:01 +02:00
Griatch
60e3f5f172 Fix to @set reducing errors during building using strings without using quotes. 2012-09-27 21:02:43 +02:00
Griatch
0b102bb07b Fixed @batchcommand access, automatically disabling procpool under SQLite3. 2012-09-27 20:51:06 +02:00
Griatch
b28d67534b Temporarily disabling procpool for @batchprocess to fix a traceback when building. 2012-09-26 08:34:54 +02:00
Griatch
a30029472b Fixes @set to be more accepting of various Python structures. It will now instead convert to string on a ValueError (commonly because a string was not enclosed in quotes) while giving a error string to the user informing of this. This should fix Issue 256. 2012-09-22 22:16:30 +02:00
Griatch
e874343387 Adjusted search() functionality to handle also a list of location(s) to search. Changed "get" command to not search inventory (which could lead to multimatch errors). 2012-09-21 08:36:59 +02:00
Adam_ASE
e748d6d5ae Addressing original issue 254 - Fixed DROP command multi-match error for similarly or identically
named items when one or more of the items are at the location but not in
character's inventory.
2012-09-20 23:50:34 -04:00
Griatch
4bd3be334d Added a warning to @delete command if trying to delete CHARACTER_DEFAULT_HOME (Limbo by default). 2012-09-20 01:42:51 +02:00
Griatch
ffcf4b3c2f Added cache-resyncing to ProcPool. This makes sure to update all affected object caches
whenever the subprocess returns (this is potentially not good enough for long-running scripts,
will have to ponder that one). Made ProcPool work with MySQL (where it works much better). Tested and fixed many
small bugs.
2012-09-03 01:11:14 +02:00
Griatch
575d7a86fa Made run_async also handle function calls through the ProcPool. 2012-09-02 16:54:07 +02:00
Griatch
f5a889e40c Added new process-pool runner based on AMPoule (integrated into Evennia).
This allows e.g. utils.utils.run_async to offload long-running functions
to a completely different subprocess entirely, offering real parallelism.

Implementation is still experimental, notably not all objects can be
transferred safely across the wire; also there is no concept of
updating caches yet - so adding an object from the subprocess side
will not be known in the main thread yet (since caches cannot yet tell
the underlying database has changed).
2012-09-02 10:10:22 +02:00
Griatch
dcc7f29a91 OBS: run migrations! This changes the Msg model to work with ManyToManyFields rather than with custom string representations for storing multiple receivers or channels. It also expands the Msg object with a "title" field and various filter options. This should make it easier to implement mail-like operations using the comms system. 2012-08-30 00:05:00 +02:00
Griatch
5117bd2a0a Minor fixes and reducing some sql calls in various managers. 2012-08-22 16:15:52 +02:00
Griatch
a35fd9018e Made some test system fixes, killing unclear fails (it seems to have been a change in the way the django test system handles instances, there are a bunch of false fails. For now, I'm hiding the failing ones, just running the command itself to make sure it runs as it should. 2012-08-19 19:20:48 +02:00
Griatch
5e33690f40 Optimization: Added caching of object contents. This makes obj.contents not have to hit
the database at all. So far there are no regressions from this, but time will tell if
there are any problems.
2012-08-19 18:48:29 +02:00
Griatch
a2e7246d15 Changed so deleting a PlayerDB object will automatically also destroy its connected User object. 2012-08-14 00:40:48 +02:00
Griatch
bc34a76173 Changed default login from email+password to the more familiar username+password.
The old system has been moved to contrib/mux-login.py.
This change was done due to the need for an email seems counterintuitive to
many new developers, giving the impression that it is actually required by
django (it is not, rather it was supposedly similar to MUX).
2012-08-13 20:25:46 +02:00
Griatch
35acad6162 Fixed a bug in @deluser when booting an already logged-in player. 2012-06-29 07:51:59 +02:00
Griatch
ec4c29b592 Fixed a bug in @delplayer. 2012-06-29 07:34:34 +02:00
Griatch
dff64215a2 Fixed a bug in the @link command. 2012-06-28 22:50:53 +02:00
Griatch
f0f240b7ce Fixed a bug in sessionhandler that erroneously caused Portal sessions to not be deleted properly at user @quit. This caused the session to be copied back to the Server side after a reload (caused "ghost" connections in e.g. the "who" command). Resolves Issue 244. 2012-06-20 23:48:19 +02:00
Griatch
9e2ad59663 Added a fix for running with postgresql-psycopg2. This does not actually resolve the problem as much as circumvent it, so I'm not marking Issue 115 as closed just yet. 2012-06-16 14:51:22 +02:00
Griatch
5f8cc5e3a6 Small fix to batchprocess output. 2012-06-12 21:03:30 +02:00
Griatch
4ce750d1ee Made some changes to the tests. All tests doesn't clear at the moment, seems to be something weird in the test system itself though, rather than an actual problem in the core. For example the test system reports an error with the @desc command that I cannot reproduce when testing that command for real in the game ... 2012-05-18 18:13:58 +02:00
Griatch
8ad4f4a9fc Changed player.search to only search for players explicitly.
Added a MuxCommandOOC class to handle the OOC commands in a more uniform way.
Fixed the @ic/@ooc and page commands. Resolves issue 233. Resolves issue 234.
2012-05-17 19:42:37 +02:00
Griatch
7058b9f210 Cleanup of API documentation. 2012-05-02 00:39:56 +02:00
Griatch
fce5c79561 A name change in a command stopped the ev API from loading. 2012-05-01 23:56:59 +02:00
Griatch
a8139feb1a Updated ReST documentation. 2012-05-01 17:37:37 +02:00
Griatch
36b15b4ad8 Made some tweaks to some default commands, such as @version, which was renamed @about and displays some more info about the system. 2012-05-01 17:31:16 +02:00
Griatch
94477b8340 Updated the reload and shutdown mecanism to avoid a loop when shutting down from inside the game. Made sure to have server sync correctly with portal at @reload (some session info were lost before). Some other cleanups. 2012-05-01 14:19:54 +02:00
Griatch
e82515f8cb Updated to a supported idmapper version. Added a method for calculating the cache usage of the idmapper, and tied it to the @system command. 2012-04-30 00:51:36 +02:00
Griatch
e92c9ac93e Edited lockhandler to pre-determine an object's superuser-status instead of re-acquiring it every lock check. This caused a surprisingly large overhead considering how often locks are checked for various reasons. 2012-04-28 15:26:52 +02:00
Griatch
2dba8ad547 Changed attribute-caching to use a string as key rather than the attribute-object itself. The latter caused the database to be invoked in order to create the hash over and over. 2012-04-28 14:47:11 +02:00
Griatch
3091587e33 Added a timeout to the attribute caching; the system will now clean cache at regular intervals once it pass a certain size defined in settings. 2012-04-28 00:37:36 +02:00
Griatch
1a6ef5d983 Added more caching to channelhandler as well as players in order to cut back on unnecessary database calls. 2012-04-26 13:38:34 +02:00
Griatch
21eed74c8d Minor fixes to various default commands. 2012-04-22 23:31:22 +02:00
Griatch
e4006bf386 Further cleanup in the error logic for commands - the system now gives resonable suggestions for all commands. 2012-04-22 20:04:24 +02:00
Griatch
181abb84a8 Cleanup of the help command, making it a lot easier to read. Also added cos-suggest algorithm to make better help entry suggestions. 2012-04-22 19:45:45 +02:00
Griatch
0c292b5ff2 Changed how command not found errors are handled by default: Implemented a cos-likeness algorithm (Coling 2008) for comparing strings, which allows for decent suggestions and speed. 2012-04-22 16:36:31 +02:00
Griatch
4678234e9a Multiple fixes to ev and utils:
Made utils.variable_from_module more generic (it can now load pretty much any form of module it's given and also supports searching and returning multiple variables).

Removed the variable-load functionality from utils.load_module; this is now purely a loader - use variable_from_module instead.

I found out that one couldn't import from src.commands.default due to the __init__ file being restrictive for the sake of the ev API. Removed that and instead imported the default commands into ev.py with the help of utils.variable_from_module instead. Some more fixes in ev followed on this.
2012-04-22 12:23:42 +02:00
Griatch
3306e36d82 Fixed a bug in @set. Unittests all clear again. 2012-04-21 18:21:38 +02:00
Griatch
8c3b49e704 Changed how the Typeclass system returns errors. Instead of echoing typeclass erros to the MUD-info channel (which is not only not only very spammy for everyone but also very hard to make clean so as to avoid recursion at a stage of typeclass failing), the system instead stores a property on itself called 'typeclass_last_errmsg' that holds eventual errors. This means that the task of reporting errors does not fall on the typeclass system itself but on the calling methods, as it should be. So src.utils.create.create_* functions now takes a new optional keyword "report_to" that holds an object to receive errors. If this keyword is given, the function msg():es that object with the error and returns None as before. If report_to is not set however, the create_* methods now return an Exception containing the error text. All default commands have been changed to accomodate for this behaviour, which allows for much more control over errors.
Also, the default ADMIN_MEDIA static files changed location in Django 1.4. The initial_setup function now accounts for this.
2012-04-21 16:15:37 +02:00
Griatch
63329f5420 Added the ability to escape colour codes with \, So using \{g in a text will now result in '{g' being printed instead of the text switching to bright green. This can be useful for documentation. 2012-04-15 23:42:57 +02:00
Griatch
5a2228763f Fixed a lingering bug with @set that made it not work when assigning normal strings without quotes. Changed so that proper Python constructs (lists, dicts etc) now requires you to entering proper Python syntax (since this is parsed). 2012-04-15 23:09:56 +02:00
Griatch
bcf214ee0d Changed so object.move_to() traverses exits by default - i.e. you will no longer end up INSIDE the exit object if you move_to the exit, but instead you will go to the exits destination. This should be the most common use. The use_destination keyword to object.move_to can be used to change this behaviour. Also @teleport (which uses move_to()) has gotten a new flag to allow for teleporting into exits if so specifically desired. Resolves issue 224. 2012-04-15 22:04:15 +02:00
Griatch
464aa8ca9e Added the ability to clear an object from the global cache. This is rarely
needed (and can be potentially dangerous if the object depends on certain
startup methods to run and/or holds temporary attributes on themselves -
these will all be lost due to a new instance being created. It is hoever
necessary when it comes to renaming Exits - since the Command on the exit
must then change name too, recaching the Exit will also update the command.
Resolves issue 223.
2012-04-15 21:46:43 +02:00
Griatch
91ec33b9a7 Fixed a spurious error happening with mud clients not properly implementing TTYPE negotiating (sending strings instead of numbers to identify their abilities). 2012-04-15 19:53:03 +02:00
Griatch
6501f30cbc Fixed an elusive bug in utils.get_variable_from_module() that caused the connection screen to sometimes not load properly, due to the imported modules being erroneously extracted and used. 2012-04-15 19:05:50 +02:00
Griatch
5264dc85bb @set now supports all forms of nested dicts and lists under Python 2.6. Python2.5 still depends on the old recursive solution that does not support nesting. Maybe time to up the python dependency number? Fixes Issue 225. 2012-04-14 10:55:56 +02:00
Griatch
551a91caef Editing the ev.py API, removing db_* manager shortcuts in favour of a 'managers' container holding them all. It makes the API slightly less "flat", but makes for a cleaner interface. 2012-03-31 16:50:53 +02:00