--- deliantra/server/ext/help.ext 2008/04/06 17:08:51 1.11 +++ deliantra/server/ext/help.ext 2008/04/11 01:15:49 1.12 @@ -2,6 +2,13 @@ our $TOPIC; +our $HELP_CHANNEL = { + id => "help", + title => "Help", + reply => "help ", + tooltip => "Online Help", +}; + sub load_topics($$) { my ($type, $path) = @_; @@ -59,7 +66,7 @@ my ($pl, $topic) = @_; if (cf::lock_active "ext::help::loading") { - $pl->reply (undef, "help files are being loaded currently, try again in a few seconds."); + $pl->send_msg ($HELP_CHANNEL => "help files are being loaded currently, try again in a few seconds.", cf::NDI_REPLY | cf::NDI_CLEAR); return; } @@ -78,14 +85,14 @@ $res .= "B<$k:>\n" . (join " ", sort @$v) . "\n\n"; } - $pl->reply (undef, $res); + $pl->send_msg ($HELP_CHANNEL => $res, cf::NDI_REPLY | cf::NDI_CLEAR); } elsif (my $item = $TOPIC->{$topic}) { my ($type, @pars) = @$item; - $pl->reply (undef, cf::pod::as_cfpod \@pars); + $pl->send_msg ($HELP_CHANNEL => (cf::pod::as_cfpod \@pars), cf::NDI_REPLY | cf::NDI_CLEAR); } else { - $pl->reply (undef, "'$topic' no such help topic, try just 'help' to get a list of topics."); + $pl->send_msg ($HELP_CHANNEL => "'$topic' no such help topic, try just 'help' to get a list of topics.", cf::NDI_REPLY); } };