--- deliantra/server/ext/commands.ext 2007/03/02 14:44:52 1.31 +++ deliantra/server/ext/commands.ext 2007/03/02 14:46:29 1.32 @@ -118,13 +118,7 @@ cf::register_command mark => sub { my ($pl, $arg) = @_; - unless (length $arg) { - my $ob = $pl->find_marked_object; - - $pl->reply (undef, $ob - ? (sprintf "%s %s * is marked.", $ob->name, $ob->title) - : "You have no marked object."); - } else { + if (length $arg) { my $ob = $pl->find_best_object_match ($arg); return $pl->reply (undef, "Could not find an object that matches $arg") @@ -132,6 +126,12 @@ $pl->contr->mark ($ob); $pl->reply (undef, (sprintf "Marked item %s", $ob->name, $ob->title)); + } else { + my $ob = $pl->find_marked_object; + + $pl->reply (undef, $ob + ? (sprintf "%s %s * is marked.", $ob->name, $ob->title) + : "You have no marked object."); } 1