--- deliantra/server/ext/help.ext 2007/04/19 21:54:41 1.4 +++ deliantra/server/ext/help.ext 2008/04/06 17:08:51 1.11 @@ -12,7 +12,7 @@ my $level = 1e9; for my $par (@$paragraphs) { - Coro::cede; + cf::cede_to_tick; if ($par->{type} eq "head2") { if ($par->{markup} =~ /^(\S+)/) { push @topics, $1 => [$type => $par]; @@ -38,11 +38,23 @@ cf::sync_job { my $guard = cf::lock_acquire "ext::help::loading"; cf::async_ext { + $Coro::current->{desc} = "help loader"; reload; undef $guard; }; }; +# for lack of a better place: "media tags" +# b bold +# i italic +# ul underlined +# fixed font +# arcane font +# hand font +# strange font +# print font (default) +# color=xxx + cf::register_command help => sub { my ($pl, $topic) = @_; @@ -63,14 +75,14 @@ my $res; while (my ($k, $v) = each %topics) { - $res .= "[b]$k:[/b]\n" . (sort join " ", @$v) . "\n\n"; + $res .= "B<$k:>\n" . (join " ", sort @$v) . "\n\n"; } $pl->reply (undef, $res); - } elsif (my $topic = $TOPIC->{$topic}) { - my ($type, @pars) = @$topic; - $pl->reply (undef, cf::pod::as_text \@pars); + } elsif (my $item = $TOPIC->{$topic}) { + my ($type, @pars) = @$item; + $pl->reply (undef, cf::pod::as_cfpod \@pars); } else { $pl->reply (undef, "'$topic' no such help topic, try just 'help' to get a list of topics.");