#!/usr/bin/perl
#use Mooix::Thing;
run sub {
	my $this=shift;
	%_=@_;

	if (! $this->mcpsession_enabled) {
		$this->write("Your client does not support MCP, so you cannot edit files.");
		return;
	}
	elsif (! $this->simpleedit_enabled) {
		$this->write("Your client supports MCP, but does not support the dns-org-mud-moo-simpleedit package, so you cannot edit files.");
		return;
	}
	
	my @content = map { ('content*' => $_) } split("\n", $_{input});
	return $this->simpleedit_content(reference => $_{id}, name => $_{hint},
	                                 @content);
}
