--- deliantra/server/ext/dmcommands.ext 2007/01/01 13:31:47 1.2 +++ deliantra/server/ext/dmcommands.ext 2007/01/04 20:29:46 1.9 @@ -68,31 +68,23 @@ 1 }; -cf::register_command maps => sub { +cf::register_command reset => sub { my ($ob, $arg) = @_; - no re 'eval'; $arg = qr<$arg>; - - my $format = "%2s %2s %-30.30s\n"; - - my $msg = sprintf $format, "Pl", "Fl", "Reset", "Name"; + return unless $ob->may ("command_reset"); - for (sort keys %cf::MAP) { - my $map = $cf::MAP{$_} - or next; + my $map = $ob->map; - $msg - } + my @pl = $map->players; + $_->enter_link for @pl; + cf::async { + my $name = $map->{path}->as_string; - 1 -}; - -cf::register_command reset => sub { - my ($ob, $arg) = @_; - - return unless $ob->may ("command_reset"); + $map->reset; + $_->leave_link for @pl; - $ob->reply (undef, "You can temporarily see through walls."); + $ob->reply (undef, "$name was reset."); + }; 1 };