Fix trigger when no one is around.
This commit is contained in:
parent
a1e852c8a8
commit
e7cd87c0c9
1 changed files with 9 additions and 2 deletions
|
|
@ -238,11 +238,18 @@ class CmdGMTrigger(Command):
|
|||
element goes to 'dests' and the second goes to the room
|
||||
(based on the caller's location).
|
||||
"""
|
||||
target = None
|
||||
if len(self.send_to) > 0:
|
||||
target = self.send_to[0]
|
||||
else:
|
||||
target = choice(self.caller.characters_here())
|
||||
name = target.db._sdesc or target.key or ""
|
||||
targets = self.caller.characters_here()
|
||||
if targets:
|
||||
target = choice(targets)
|
||||
|
||||
if target:
|
||||
name = target.db._sdesc or target.key
|
||||
else:
|
||||
name = ''
|
||||
|
||||
for idx, event in enumerate(events):
|
||||
if isinstance(event, str):
|
||||
|
|
|
|||
Loading…
Reference in a new issue