mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 14:07:16 +02:00
Fixed a bug in @open (issue104). Some other refinements.
This commit is contained in:
parent
cbdeae5334
commit
1ed013dc11
4 changed files with 10 additions and 8 deletions
|
|
@ -741,9 +741,6 @@ class CmdPage(MuxCommand):
|
|||
# get last messages we've got
|
||||
pages_we_got = list(Msg.objects.get_messages_by_receiver(player))
|
||||
|
||||
print "we sent:", pages_we_sent
|
||||
print "we_got:", pages_we_got
|
||||
|
||||
if 'list' in self.switches:
|
||||
pages = pages_we_sent + pages_we_got
|
||||
pages.sort(lambda x,y: cmp(x.date_sent, y.date_sent))
|
||||
|
|
@ -812,12 +809,13 @@ class CmdPage(MuxCommand):
|
|||
message = self.rhs
|
||||
|
||||
# if message begins with a :, we assume it is a 'page-pose'
|
||||
if message[0] == ":":
|
||||
message = message.replace(':', "%s " % caller.key, 1)
|
||||
if message.startswith(":"):
|
||||
message = "%s %s" % (caller.key, message.strip(':').strip())
|
||||
|
||||
# create the persistent message object
|
||||
msg = create.create_message(player, message,
|
||||
receivers=recobjs)
|
||||
|
||||
# tell the players they got a message.
|
||||
received = []
|
||||
for pobj in recobjs:
|
||||
|
|
|
|||
|
|
@ -719,8 +719,8 @@ class CmdOpen(ObjManipCommand):
|
|||
# give error message and return
|
||||
caller.search(exit_name)
|
||||
return
|
||||
exit_obj = exit_obj[0]
|
||||
if exit_obj:
|
||||
exit_obj = exit_obj
|
||||
if exit_obj:
|
||||
if not exit_obj.db._destination:
|
||||
# we are trying to link a non-exit
|
||||
string = "'%s' already exists and is not an exit!\nIf you want to convert it "
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ class CmdPerm(MuxCommand):
|
|||
caller.msg(string)
|
||||
return
|
||||
|
||||
# locate the object
|
||||
# locate the object/player
|
||||
obj = caller.search(self.lhs, global_search=True)
|
||||
if not obj:
|
||||
return
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ def returns_player_list(method):
|
|||
try:
|
||||
players.append(user.get_profile())
|
||||
except Exception:
|
||||
print players
|
||||
print user, user.__class__
|
||||
logger.log_trace("User has no profile(), maybe database was partially reset?")
|
||||
return players
|
||||
return func
|
||||
|
|
@ -56,6 +58,8 @@ class PlayerManager(models.Manager):
|
|||
Custom manager for the player profile model. We use this
|
||||
to wrap users in general in evennia, and supply some useful
|
||||
search/statistics methods.
|
||||
|
||||
Note how ALL these commands return character objects if possible.
|
||||
"""
|
||||
def num_total_players(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue