mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 01:36:32 +01:00
Fixed bugs and allowed for logging in using one character. Added a simple command for creating a new character.
This commit is contained in:
parent
f1767251c6
commit
b26c3ab872
11 changed files with 204 additions and 111 deletions
|
|
@ -365,3 +365,12 @@ class ObjectManager(TypedObjectManager):
|
|||
ScriptDB.objects.copy_script(script, new_obj=new_object.dbobj)
|
||||
|
||||
return new_object
|
||||
|
||||
|
||||
def clear_all_sessids(self):
|
||||
"""
|
||||
Clear the db_sessid field of all objects having also the db_player field
|
||||
set.
|
||||
"""
|
||||
self.filter(db_sessid__isnull=False).update(db_sessid=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ class Object(TypeClass):
|
|||
ignore_errors=ignore_errors,
|
||||
player=player)
|
||||
|
||||
def execute_cmd(self, raw_string):
|
||||
def execute_cmd(self, raw_string, sessid=None):
|
||||
"""
|
||||
Do something as this object. This command transparently
|
||||
lets its typeclass execute the command. Evennia also calls
|
||||
|
|
@ -209,6 +209,7 @@ class Object(TypeClass):
|
|||
|
||||
Argument:
|
||||
raw_string (string) - raw command input
|
||||
sessid (int) - id of session executing the command. This sets the sessid property on the command.
|
||||
|
||||
Returns Deferred - this is an asynchronous Twisted object that will
|
||||
not fire until the command has actually finished executing. To overload
|
||||
|
|
@ -219,7 +220,7 @@ class Object(TypeClass):
|
|||
This return is not used at all by Evennia by default, but might be useful
|
||||
for coders intending to implement some sort of nested command structure.
|
||||
"""
|
||||
return self.dbobj.execute_cmd(raw_string)
|
||||
return self.dbobj.execute_cmd(raw_string, sessid=sessid)
|
||||
|
||||
def msg(self, message, from_obj=None, data=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue