… | |
… | |
158 | |
158 | |
159 | cf::register_command whereami => sub { |
159 | cf::register_command whereami => sub { |
160 | my ($ob) = @_; |
160 | my ($ob) = @_; |
161 | |
161 | |
162 | my $reg = $ob->contr->observe->region; |
162 | my $reg = $ob->contr->observe->region; |
163 | $ob->send_msg ("c/mapinfo" => (sprintf "You are %s.\n%s", $reg->longname, $reg->msg), cf::NDI_REPLY | cf::NDI_CLEAR); |
163 | $ob->send_msg ("c/who" => (sprintf "You are %s.\n%s", $reg->longname, $reg->msg), cf::NDI_REPLY | cf::NDI_CLEAR); |
164 | }; |
164 | }; |
165 | |
165 | |
166 | cf::register_command whereabouts => sub { |
166 | cf::register_command whereabouts => sub { |
167 | my ($ob, $arg) = @_; |
167 | my ($ob, $arg) = @_; |
168 | |
168 | |
… | |
… | |
173 | } |
173 | } |
174 | |
174 | |
175 | my $msg = "In the world currently there are:\n\n" |
175 | my $msg = "In the world currently there are:\n\n" |
176 | . join "", map "$count{$_} player(s) $_\n\n", sort keys %count; |
176 | . join "", map "$count{$_} player(s) $_\n\n", sort keys %count; |
177 | |
177 | |
178 | $ob->send_msg ("c/mapinfo" => $msg, cf::NDI_REPLY | cf::NDI_CLEAR); |
178 | $ob->send_msg ("c/who" => $msg, cf::NDI_REPLY | cf::NDI_CLEAR); |
179 | }; |
179 | }; |
180 | |
180 | |
181 | cf::register_command hiscore => sub { |
181 | cf::register_command hiscore => sub { |
182 | my ($ob, $arg) = @_; |
182 | my ($ob, $arg) = @_; |
183 | |
183 | |
… | |
… | |
374 | my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400; |
374 | my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400; |
375 | $ob->send_msg ("c/uptime" => "server started $startup, uptime ${runtime}\d", cf::NDI_REPLY | cf::NDI_CLEAR); |
375 | $ob->send_msg ("c/uptime" => "server started $startup, uptime ${runtime}\d", cf::NDI_REPLY | cf::NDI_CLEAR); |
376 | }; |
376 | }; |
377 | |
377 | |
378 | my %IN_MEMORY = ( |
378 | my %IN_MEMORY = ( |
379 | cf::MAP_IN_MEMORY => "I", |
379 | cf::MAP_ACTIVE => "I", |
380 | cf::MAP_SWAPPED => "S", |
380 | cf::MAP_SWAPPED => "S", |
381 | cf::MAP_LOADING => "L", |
381 | cf::MAP_LOADING => "L", |
382 | ); |
382 | ); |
383 | |
383 | |
384 | cf::register_command maps => sub { |
384 | cf::register_command maps => sub { |