--- deliantra/server/ext/dmcommands.ext 2006/12/15 19:29:18 1.1 +++ deliantra/server/ext/dmcommands.ext 2007/01/01 16:50:09 1.4 @@ -68,7 +68,27 @@ 1 }; -for my $command (qw(reset teleport summon arrest kick banish)) { +cf::register_command reset => sub { + my ($ob, $arg) = @_; + + return unless $ob->may ("command_reset"); + + my $map = $ob->map; + + cf::sync_job { + my @pl = $map->players; + + $_->enter_link for @pl; + $map->reset; + $_->leave_link for @pl; + }; + + $ob->reply (undef, $map->{path}->as_string . " was reset."); + + 1 +}; + +for my $command (qw(teleport summon arrest kick banish)) { my $method = "command_$command"; cf::register_command $command => sub {