ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/commands.ext
(Generate patch)

Comparing deliantra/server/ext/commands.ext (file contents):
Revision 1.64 by root, Thu Oct 25 09:01:23 2007 UTC vs.
Revision 1.67 by root, Tue Apr 15 14:21:04 2008 UTC

158 158
159cf::register_command whereami => sub { 159cf::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
166cf::register_command whereabouts => sub { 166cf::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
181cf::register_command hiscore => sub { 181cf::register_command hiscore => sub {
182 my ($ob, $arg) = @_; 182 my ($ob, $arg) = @_;
183 183
370cf::register_command uptime => sub { 370cf::register_command uptime => sub {
371 my ($ob, $arg) = @_; 371 my ($ob, $arg) = @_;
372 372
373 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME; 373 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME;
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); 375 $ob->send_msg ("c/uptime" => "server started $startup, uptime ${runtime}\d", cf::NDI_REPLY | cf::NDI_CLEAR);
376}; 376};
377 377
378my %IN_MEMORY = ( 378my %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
384cf::register_command maps => sub { 384cf::register_command maps => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines