diff --git a/commands/wizards.py b/commands/wizards.py index 181a3bf..261fdeb 100755 --- a/commands/wizards.py +++ b/commands/wizards.py @@ -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):