--- deliantra/server/ext/commands.ext 2007/01/11 01:06:02 1.16 +++ deliantra/server/ext/commands.ext 2007/03/01 13:27:52 1.19 @@ -70,7 +70,7 @@ . ($ns->afk ? " [AFK]" : "") . ($ob->flag (cf::FLAG_WIZ) ? " [WIZ]" : "") . " [" . $pl->ns->version . "]" - . " [" . ($pl->peaceful || $privileged ? $ob->map->{path}->visible_name : $ob->map->region ? $ob->map->region->name : "the unknown") . "]" + . " [" . ($pl->peaceful || $privileged ? $ob->map->visible_name : $ob->region->name) . "]" . (sprintf " [rtt %.3fs]", $pl->ns->rtt * 1e-6) . ($privileged ? " " . $pl->ns->host : "") } sort { (lc $a->ob->name) cmp (lc $b->ob->name) } @pl @@ -89,6 +89,13 @@ 1 }; +cf::register_command afk => sub { + my ($ob, $arg) = @_; + + $ob->contr->ns->afk ($ob->contr->ns->afk ? 0 : 1); + $ob->reply (undef, $ob->contr->ns->afk ? "You are now AFK" : "You are no longer AFK"); +}; + cf::register_command rename => sub { my ($ob, $arg) = @_; @@ -145,7 +152,7 @@ or next; next unless $map->path =~ $arg; - next if $map->{path}->is_style_map; + next if $map->{deny_list}; my $svd = int $cf::RUNTIME - $map->{last_save}; $svd = "++" if $svd > 99; @@ -156,7 +163,7 @@ $IN_MEMORY{$map->in_memory} || "?", $svd, (int $map->reset_at - $cf::RUNTIME), - $map->{path}->visible_name), + $map->visible_name), cf::NDI_BLACK | cf::NDI_UNIQUE); }