#!/usr/bin/perl
# This is stackless because anyone can run it to open a container.
#
#use Fcntl q{:flock};
#use Mooix::Thing;
run sub {
	my $this=shift;
	%_=@_;
	my $avatar=$_{avatar};
	
	my $lock = $this->getlock(LOCK_EX, "closed"); # lock field
	if (! $this->closed) {
		fail "It's already open.";
	}
	if ($this->locked || $this->closed(0) != 0) {
		fail "You can't open that.";
	}
	if (ref $this->messagefilters && ref $this->closed_filter) {
		$this->messagefilters->remove(object => $this->closed_filter);
	}
	$this->msg('open', %_);
}
