diff --git a/src/commands/comsys.py b/src/commands/comsys.py index 6835dbce46..ca65d0a4ce 100644 --- a/src/commands/comsys.py +++ b/src/commands/comsys.py @@ -20,11 +20,12 @@ def cmd_addcom(command): """ session = command.session pobject = session.get_pobject() - eq_args = command.command_argument.split('=', 1) - + if not command.command_argument: session.msg("You need to specify a channel alias and name.") return + + eq_args = command.command_argument.split('=', 1) chan_alias = eq_args[0] chan_name = eq_args[1] @@ -62,7 +63,7 @@ def cmd_delcom(command): session = command.session pobject = session.get_pobject() - if len(command.command_argument) == 0: + if not command.command_argument: session.msg("You must specify a channel alias.") return diff --git a/src/objects/models.py b/src/objects/models.py index 8881439a80..5c9c9295aa 100755 --- a/src/objects/models.py +++ b/src/objects/models.py @@ -748,8 +748,9 @@ class Object(models.Model): self.get_location().emit_to_contents(arrival_message, exclude=self) if self.location.is_player(): self.location.emit_to("%s is now in your inventory." % (self.get_name())) - - if force_look and self.is_player(): + + session = self.get_session() + if force_look and self.is_player() and session: self.get_session().execute_cmd('look') def dbref_match(self, oname):