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

	# Make sure that this command is not spoofed, just in case.
        if ($_{avatar} != $this) {
		fail "No!"; 
	}
	
	# A slight hack to support "::" emoting which does not include a
	# leading space. The first colon is converted to the emote command
	# by the parser, but this command has to deal with the second.
	# Also, support leading single quote w/o space as special case.
	if ($_{quote} =~ /^[:'](.*)/) {
		$_{quote}=$1;
	}
	else {
		$_{space}=" ";
	}

	$this->msg('emote', %_);
}
