--- deliantra/server/lib/cf.pm 2012/11/09 02:50:50 1.594 +++ deliantra/server/lib/cf.pm 2012/11/09 16:27:55 1.595 @@ -3722,68 +3722,6 @@ } } -#d# move docstuff to help or so -our %DOCSTRING; - -sub reload_pod { - trace "loading pods $PODDIR\n"; - - %DOCSTRING = (); - my @command_list; - - for ( - [0, "command_help"], - [1, "emote_help"], - [2, "dmcommand_help"], - ) { - my ($type, $path) = @$_; - - my $paragraphs = &cf::pod::load_pod ("$PODDIR/$path.pod") - or die "unable to load $path"; - - my $level = 1e9; - my $rpar; - - for my $par (@$paragraphs) { - if ($par->{type} eq "head2") { - # this code taken almost verbatim from DC/Protocol.pm - - if ($par->{markup} =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x) { - my $cmd = $1; - my @args = split /\|/, $2; - @args = (".*") unless @args; - - $_ = $_ eq ".*" ? "" : " $_" - for @args; - - my @variants = map "$cmd$_", sort { (length $a) <=> (length $b) } @args; - - $rpar = \($DOCSTRING{"command/$cmd"} = &cf::pod::as_cfpod ([$par])); - - push @command_list, [$type, \@variants]; - $level = $par->{level}; - } else { - error "$par->{markup}: unparsable command heading"; - } - } elsif ($par->{level} > $level) { - $$rpar .= &cf::pod::as_cfpod ([$par]); - } - - cf::cede_to_tick; - } - } - - @command_list = sort { - $a->[0] <=> $b->[0] - or $a->[1] cmp $b->[1] - } @command_list; - - cf::cede_to_tick; - - add_face "res/command_list" => FT_RSRC, - JSON::XS->new->utf8->encode (\@command_list); -} - sub reload_resources { trace "reloading resource files...\n"; @@ -3794,7 +3732,6 @@ reload_archetypes; reload_regions; reload_treasures; - reload_pod; trace "finished reloading resource files\n"; }