--- deliantra/server/ext/commands.ext 2007/05/19 11:04:16 1.45 +++ deliantra/server/ext/commands.ext 2007/07/03 00:54:44 1.51 @@ -1,4 +1,4 @@ -#! perl # MANDATORY +#! perl # mandatory depends=irc use POSIX (); @@ -38,8 +38,6 @@ 1 } -sub ext::irc::users; # HACK: TODO: replace by signal - sub who_listing(;$$) { my ($privileged, $select) = @_; @@ -66,6 +64,7 @@ my ($pl, $ob, $ns) = ($_, $_->ob, $_->ns); "* " . $ob->name . "/" . $ob->level . " " . (length $pl->own_title ? $pl->own_title : "the " . $pl->title) + . ($pl->gender ? " [f]" : " [m]") . ($pl->peaceful ? " [peaceful]" : " [HOSTILE]") . ($ns->afk ? " [AFK]" : "") . ($ob->flag (cf::FLAG_WIZ) ? " [WIZ]" : "") @@ -188,7 +187,7 @@ cf::register_command mapinfo => sub { my ($ob) = @_; - my $map = $ob->map + my $map = $ob->contr->observe->map or return; $ob->reply (undef, (sprintf "%s (%s) %s", $map->name, $map->path, $ob->region->longname)); $ob->reply (undef, (sprintf "players: %d difficulty: %d size: %d start: %dx%d timeout: %d", @@ -202,7 +201,7 @@ cf::register_command whereami => sub { my ($ob) = @_; - my $reg = $ob->region; + my $reg = $ob->contr->observe->region; $ob->reply (undef, (sprintf "You are %s.\n%s", $reg->longname, $reg->msg)); 1 @@ -246,6 +245,14 @@ 1 }; + +cf::register_command hintmode => sub { + my ($ob, $arg) = @_; + + _set_mode "hintmode", $ob, $arg, hintmode => qw(show mark hide); + + 1 +}; cf::register_command afk => sub { my ($ob, $arg) = @_;