--- deliantra/server/ext/dmcommands.ext 2007/01/01 13:31:47 1.2 +++ deliantra/server/ext/dmcommands.ext 2007/01/02 11:08:35 1.6 @@ -68,31 +68,22 @@ 1 }; -cf::register_command maps => 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"; - - for (sort keys %cf::MAP) { - my $map = $cf::MAP{$_} - or next; - - $msg - } - - 1 -}; - cf::register_command reset => sub { my ($ob, $arg) = @_; return unless $ob->may ("command_reset"); - $ob->reply (undef, "You can temporarily see through walls."); + my $map = $ob->map; + + my @pl = $map->players; + $_->enter_link for @pl; + Coro::async { + Coro::Timer::sleep 10; + $map->reset; + $_->leave_link for @pl; + + $ob->reply (undef, $map->{path}->as_string . " was reset."); + }; 1 };